So Can i do something like this:
- Select type as console application and set the output file extension as xxx.hex
Will it be ok?
Also is there any way to generate a .map file as output ?
For GCC, you need to build an "console application". This will generate an .elf FileI am getting .exe file only but no .elf, although I have checked Compiler flag to "produce debugging symbols [-d]" still I am getting .exe file
.elf File, which you have to convert to a HEX file in a post build step. You can use gcc objectcopy to accomplish this.(I am using GCC Compiler 5.3.0 on windows7)
The linker usually provides a command line switch to produce a map file. Just add this to the linker options.Did you mean "Project->Build Options->Linker Settings ->Other Linker options"?
I am getting .exe file only but no .elf, although I have checked Compiler flag to "produce debugging symbols [-d]" still I am getting .exe fileYou 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...
(I am using GCC Compiler 5.3.0 on windows7)
I know there are pre/post build steps, but where to know about the post build steps, I mean what to enter.?The GCC objcopy documentation should tell you what to do.
tricore-objcopy -O ihex ..\result\$(PROJECT_NAME).elf ..\result\$(PROJECT_NAME).hex
Did you mean "Project->Build Options->Linker Settings ->Other Linker options"?Yes. Again, the Linker documentation should tell you what to add.
-Wl,-Map=..\output\$(PROJECT_NAME).map
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...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?
it would help if you tell us for what platform you are developing (arm, avr, pic, nxp...)ARM cortex m0
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?Yes, but you have to install it to, codeblocks does not ship with the arm compiler...
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?In general: Yes, but debugging symbols are not relevant for producing an elf file.
In general: Yes, but debugging symbols are not relevant for producing an elf fileOk thanks, I used to think that to produce elf file, 1 need to enable debug symbols. Thanks for clarification.
Yes, but you have to install it to, codeblocks does not ship with the arm compiler...I know that.. anyway thanks :)
I did a quick search and found one one here: https://launchpad.net/gcc-arm-embedded/+downloadThanks 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.
objcopy.exe -O ihex ElfFile.elf HexFile.hex