User forums > Embedded development

output file extension .bin/.hex

<< < (2/4) > >>

christobal:

--- Quote from: anandamu16 on March 03, 2017, 11:42:46 am ---I know there are pre/post build steps, but where to know about the post build steps, I mean what to enter.?

--- End quote ---
The GCC objcopy documentation should tell you what to do.

For Tricore GCC projects I use:

--- Code: ---tricore-objcopy -O ihex  ..\result\$(PROJECT_NAME).elf ..\result\$(PROJECT_NAME).hex

--- End code ---

Note: $(PROJECT_NAME) is a Code::Blocks enviroment variable, that expands to the Project name


--- Quote from: anandamu16 on March 03, 2017, 11:42:46 am ---Did you mean "Project->Build Options->Linker Settings ->Other Linker options"?

--- End quote ---
Yes. Again, the Linker documentation should tell you what to add.

In my case it is:

--- Code: ----Wl,-Map=..\output\$(PROJECT_NAME).map

--- End code ---

anandamu16:

--- Quote ---You have to install and use the compiler for your TARGET DEVICE. Only then will it produce the right format. You are getting .exe, because you are using a windows compiler. And since Windows runs .exe...
--- End quote ---
Ok thanks. What I understood is.... If I am building my code specific to ARM, I must use "GNU GCC Compiler for ARM" and enable debugging symbols into it. I t will generate an elf file. Am I right?

--- Quote ---it would help if you tell us for what platform you are developing (arm, avr, pic, nxp...)
--- End quote ---
ARM cortex m0
Any particular lead will be helpful.

Thanks christobl, I will refer GCC document

BlueHazzard:

--- Quote ---Ok thanks. What I understood is.... If I am building my code specific to ARM, I must use "GNU GCC Compiler for ARM" and enable debugging symbols into it. I t will generate an elf file. Am I right?
--- End quote ---
Yes, but you have to install it to, codeblocks does not ship with the arm compiler...

christobal:

--- Quote from: anandamu16 on March 03, 2017, 02:33:05 pm ---Ok thanks. What I understood is.... If I am building my code specific to ARM, I must use "GNU GCC Compiler for ARM" and enable debugging symbols into it. I t will generate an elf file. Am I right?

--- End quote ---
In general: Yes, but debugging symbols are not relevant for producing an elf file.

As your target device is a Cortex M0, I assume that you'll not run an OS on your target and therefore need a bare metal GCC Compiler for ARM (aka "gcc-arm-none-eabi"). I did a quick search and found one one here: https://launchpad.net/gcc-arm-embedded/+download

anandamu16:

--- Quote ---In general: Yes, but debugging symbols are not relevant for producing an elf file
--- End quote ---
Ok thanks, I used to think that to produce elf file, 1 need to enable debug symbols. Thanks for clarification.

--- Quote ---Yes, but you have to install it to, codeblocks does not ship with the arm compiler...
--- End quote ---
I know that.. anyway thanks :)

--- Quote ---I did a quick search and found one one here: https://launchpad.net/gcc-arm-embedded/+download

--- End quote ---
Thanks for searching, I already had.

I successful build elf file, but still I am not able to get .hex file as output from this elf, I mean I am not getting proper post build commands to do the job. I search on google but no relevent information. If anyone have worked to convert elf file into binary for ARMplz let me know.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version