Author Topic: Special compiler syntax (KEIL)  (Read 7372 times)

Offline Schlumie

  • Multiple posting newcomer
  • *
  • Posts: 12
Special compiler syntax (KEIL)
« on: October 11, 2006, 10:40:18 am »
I try to use KEIL C166 compiler with CodeBlocks. There are a view problems i faced, maybe someone could help me, and/or add a feature to get those kind of compiler to work.
Problem 1: Include dirs are specified with   INCDIR(Path)   so if a define INCDIR( as Includedirective, the ) is then missing....  I did a workaround and give those INCDIRs into the "OTHER OPTIONS" tab....  so not a really big problem..this works allready for me..
Problem 2: The linker need the objectfiles seperated with , not with space...  this is a problem, beause theres no way to define a objectfile seperation character.....

Is there a possible workaround, or is it possible to add such a feature ?
PS:
A also use the Metware ARC Compiler with codeblocks, and it works perfect!!!

Offline Schlumie

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Special compiler syntax (KEIL)
« Reply #1 on: October 11, 2006, 11:21:35 am »
I allread copied a compiler and changed everything so far. Compiling works, but i cant find a option for a object seperator.... my command line macro for the linker is:
$linker $libdirs $link_objects TO $exe_output $link_resobjects $link_options $libs
The $link_objects get translated to the objs seperated by spaces...  i didnt find a option for that, only for the whole option prefixes etc. ...
There should be an option in the Others tab to specifiy such a seperator....
There is also only a option for a "Add header file search path" PREFIX and not a pattern a need ... i need "INCDIR(%O)" to be able to specify the ) and not only "-L" like for the GNU GCC.... this would also be a nice feature....

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Special compiler syntax (KEIL)
« Reply #2 on: October 11, 2006, 11:24:21 am »
just saw that too

an idea, can't you put the comma ',' in the libs list (adding ',' to the library name) ?

in the Linker tab, e.g.

lib1,
lib2,
lib3
« Last Edit: October 11, 2006, 11:26:56 am by tiwag »

Offline Schlumie

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Special compiler syntax (KEIL)
« Reply #3 on: October 11, 2006, 11:55:27 am »
This could be an workaround for the libs, but a dont have any libs just objects. This objectlist is automaticly created from codeblocks from the projectlist. I think a have to add this features myself...(like the union codecompl. support..)

Offline Schlumie

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Special compiler syntax (KEIL)
« Reply #4 on: October 11, 2006, 02:32:41 pm »
I looked into the source and saw, that there is a possibility to add an + or - before objectfilenames... i think i will expand this feature to the nedded , .

Offline Pete317

  • Single posting newcomer
  • *
  • Posts: 3
Re: Special compiler syntax (KEIL)
« Reply #5 on: August 30, 2008, 09:47:38 pm »
My workaround for the linker problem is to create a linker command file,  and use: $linker @$(PROJECT_NAME).lnk as the linker command line macro.
It's not very elegant, and you have to manually edit the linker command file, but it works.

Hope this helps.

Offline Schlumie

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Special compiler syntax (KEIL)
« Reply #6 on: September 08, 2008, 07:56:11 am »
Thank you! But my topic is 2 years old. I made a special token like the + and - (like i menditioned before). It is working, but I stoped using codeblocks for Keil, just for my other special compilers like Metaware ARC (Codeblocks is really create on this!). Your solution has the drawback, that you allways have to change the linker file if you add new files. I just want to use as much features from codeblocks for the keil compiler...