Developer forums (C::B DEVELOPMENT STRICTLY!) > Compiler Framework Redesign
XML based compilers
Alpha:
Some questions.
Here (compilerKeilC51.cpp):
--- Code: --- wxRegKey key; // defaults to HKCR
key.SetName(wxT("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Keil \265Vision3"));
if (key.Exists() && key.Open(wxRegKey::Read)) // found; read it
key.QueryValue(wxT("LastInstallDir"), m_MasterPath);
--- End code ---
did you mean:
--- Code: --- key.SetName(wxT("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Keil\\265Vision3"));
--- End code ---
Here (options_keilcx51.xml):
--- Code: --- <if platform="windows">
<Program name="LD" value="LX51.exe"/>
<Program name="LIB" value="LIBX51.exe"/>
</if>
<else>
<Program name="LD" value="LX51"/>
<Program name="LIB" value="LIBX51"/>
</else>
--- End code ---
did you intend to have:
--- Code: --- <if platform="windows">
<Program name="CPP" value="CX51.exe"/>
<Program name="LD" value="LX51.exe"/>
<Program name="LIB" value="LIBX51.exe"/>
</if>
<else>
<Program name="CPP" value="CX51"/>
<Program name="LD" value="LX51"/>
<Program name="LIB" value="LIBX51"/>
</else>
--- End code ---
Alpha:
Attached is a modified version of your patch. [[Edit: use the version in the later post.]] There are some changes to formatting, removal of sections that appeared to have no purpose, and tweaks/fixes. Could you please test and let me know if it still works as intended?
--- Quote from: tomjnx on December 27, 2012, 05:26:43 am ---I don't think it ever has changed or become irrelevant. The SDCC manual
http://sdcc.sourceforge.net/doc/sdccman.pdf states on p.24 that the object file extension is .rel.
Looking at the sourceforge SVN source code of SDCC, it's slightly more complicated. AVR, DS390, HC08, MCS51, XA51 and Z80 ports use .rel as object extension, only the PIC14 and PIC16 backends use .o as object extension (see sdcc/src/*/main.c, the PORT structs). I'd consider the PIC backends as of the lesser stable/mature backends - so it seems strange to break the stable backends because of a few unstable ones...
So it seems the correct fix would be (apart from convincing SDCC developers to use the same extension for all backends) to select the object file extension based on which architecture switch was selected...
--- End quote ---
According to PM with user squalyl, PIC port produces *.o because it uses gpasm and gplink. The easier solution would be to duplicate SDCC to create SDCC-PIC, however, I would prefer to instead detect the correct option. Do you have a list of the specific flags that switch it to PIC (is it -mpic14 and -mpic16)? (I plan to revert the default to *.rel.)
[attachment deleted by admin]
tomjnx:
Thanks for your effort!
--- Quote from: Alpha on December 28, 2012, 06:23:10 am ---did you mean:
--- Code: --- key.SetName(wxT("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Keil\\265Vision3"));
--- End code ---
--- End quote ---
Um, no, I meant the lowercase greek letter mu, µ. So the directory component should be "Keil µVision3" (µVision being the name of their IDE)
--- Quote from: Alpha on December 28, 2012, 06:23:10 am ---Here (options_keilcx51.xml):
--- Code: --- <if platform="windows">
<Program name="LD" value="LX51.exe"/>
<Program name="LIB" value="LIBX51.exe"/>
</if>
<else>
<Program name="LD" value="LX51"/>
<Program name="LIB" value="LIBX51"/>
</else>
--- End code ---
did you intend to have:
--- Code: --- <if platform="windows">
<Program name="CPP" value="CX51.exe"/>
<Program name="LD" value="LX51.exe"/>
<Program name="LIB" value="LIBX51.exe"/>
</if>
<else>
<Program name="CPP" value="CX51"/>
<Program name="LD" value="LX51"/>
<Program name="LIB" value="LIBX51"/>
</else>
--- End code ---
--- End quote ---
Yes. Thanks for the fix. On second thought, the conditional could be removed and only the windows version be retained, as keil doesn't offer their tools for anything other than windows, and apparently the have absolutely no plans to change this.
tomjnx:
--- Quote from: Alpha on December 28, 2012, 10:08:05 pm ---Attached is a modified version of your patch. There are some changes to formatting, removal of sections that appeared to have no purpose, and tweaks/fixes. Could you please test and let me know if it still works as intended?
--- End quote ---
I will do that, but it will most likely be after new year.
--- Quote from: Alpha on December 28, 2012, 10:08:05 pm ---Do you have a list of the specific flags that switch it to PIC (is it -mpic14 and -mpic16)? (I plan to revert the default to *.rel.)
--- End quote ---
Yes, exactly.
Alpha:
--- Quote from: tomjnx on December 29, 2012, 12:20:16 am ---Um, no, I meant the lowercase greek letter mu, µ. So the directory component should be "Keil µVision3" (µVision being the name of their IDE)
--- End quote ---
Ah, okay.
--- Quote from: tomjnx on December 29, 2012, 12:26:31 am ---I will do that, but it will most likely be after new year.
--- End quote ---
Sure; when you do, use the version attached here (it formats a little more, and reverts my change to mu).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version