User forums > Embedded development

output file extension .bin/.hex

<< < (3/4) > >>

christobal:

--- Quote from: anandamu16 on March 06, 2017, 12:41:08 pm ---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.

--- End quote ---

You should use the objcopy tool to convert elf to hex. Try at first from the command line without Code::Blocks post-build step. If you know how to generate the hex file, you can bring it into the post-build steps.
The call should be something like:


--- Code: ---objcopy.exe -O ihex ElfFile.elf HexFile.hex
--- End code ---

If you get errors, please post the command you're executing and the error message.

anandamu16:
Yeah... I am able to build up hex file successfully from .elf file. The corresponding build commands is here arm-eabi-objcopy.exe -O ihex elfFile.elf hexfile.hex

I am thinking, is there any way to create a binary file also? I tried to chenge ihex to ibin and .hex to .bin in above file but it didn't work.
Any idea?

anandamu16:
Updating.. yeah I checked.
To get a binary file as output, I need to use 'binary' instead of 'ihex'.
So now I can convert it into binary file also
Post build command is: arm-eabi-objcopy.exe -O binary elfFile.elf binFile.bin
May be anyone working with ARM Compiler can use these build commands directly.
Anyways thanks a lot for your help. :)

anandamu16:
Is there any way to also get a .map file as output, Any post build step.?
I checked through binutils of GNU GCC Compiler for ARM document and there was no information on how to get a .map extension file as output

yvesdm3000:
http://forums.codeblocks.org/index.php?topic=13024.0

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version