Author Topic: Extensions for embedded executables  (Read 6195 times)

Offline oscar

  • Single posting newcomer
  • *
  • Posts: 6
Extensions for embedded executables
« on: June 24, 2011, 03:06:29 pm »
Hi,

I'm using Code::Blocks on Windows to generate executables for an embedded microcontroller. I'm using a custom C compiler and most things are working really well - but this particular compiler always generates executable files with extensions of .binary or .eeprom (i.e. not .exe or .sys)

Is there any way to tell Code::Blocks that the files with these extensions are the final executables? At present, whenever I "build" the project, Code::Blocks always relinks even when the project is up to date. I think it is looking for an output file with a .exe extension, and when it doesn't find one it assumes it needs to relink to generate it.

Thanks,

Oscar.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11827
    • Travis build status
Re: Extensions for embedded executables
« Reply #1 on: June 24, 2011, 03:18:34 pm »
Disable the "auto-generate filename extension" and make sure the output file is the one produced by the compiler
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Extensions for embedded executables
« Reply #2 on: June 24, 2011, 05:30:18 pm »
U can try setting the 'project->properties->build targets' type to 'native'. But be aware that 'native' setting doesn't start the debugger on v10.05 if u're using one.

Offline oscar

  • Single posting newcomer
  • *
  • Posts: 6
Re: Extensions for embedded executables
« Reply #3 on: June 25, 2011, 02:46:05 am »
Disable the "auto-generate filename extension" and make sure the output file is the one produced by the compiler
Hi oBFusCATed

I had already disabled "auto-generate filename extension" but manually setting the extension of the output filename prevents the rebuild - thanks.


Offline oscar

  • Single posting newcomer
  • *
  • Posts: 6
Re: Extensions for embedded executables
« Reply #4 on: June 25, 2011, 02:47:35 am »
U can try setting the 'project->properties->build targets' type to 'native'. But be aware that 'native' setting doesn't start the debugger on v10.05 if u're using one.


Hi scarphin

Thanks for the suggestion. I will look at adding my own "type" (using "Native" changes the extension to ".sys", but I want ".binary"). I don't need the debugger, so that's ok.


Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Extensions for embedded executables
« Reply #5 on: June 25, 2011, 08:48:07 am »
U can change the extension by hand, also from the advanced settings of the compiler u're using u can also change the command scripts to add the extension u want but u have to be very careful with that. And if u need debugger support in the future u can try the debugger branch latest nightly.