Topic : how to generate *.bin

Forum : ARM

Original Post
Post Information Post
June 4, 2010 - 2:47am
Guest

i try to use the Ride7 for STM3210C on windows XP
the demo code(STM32F107_ETH_LwIP_V1.0.0) default only generate *.hex file

Bruno sad:
>Q : How can I create a .bin or .hex file?
>A : Go to 'Options | Project | RL(ST6 | XA | 51) | Linker'. Check the boxes 'Generate a Hex file' >and/or 'Generate a Binary file'. Then, every time you make the project, a new *.aof, *.bin and/or *.hex will >be generated. The *.bin and/or *.hex file will be located in the same directory as the *.aof file.

but i can't find the 'Options | Project | RL(ST6 | XA | 51) | Linker' for my project.
so if i want to generate *.bin how do i do? thanks.

Replies
Post Information Post
+1
0
-1
June 4, 2010 - 9:34am
Raisonance Support Team

Hi Sam,

You must use the command-line tool arm-none-eabi-objcopy.exe with its "-O" option to transform your output ELF file to another format, such as binary.
The list of available formats can be retrieved with the command:
arm-none-eabi-objdump.exe -i

In your case, to convert to binary, you can use the command
arm-none-eabi-objcopy.exe -O binary myfile.elf myoutputfile.bin

(note that the output file name is necessary, or your input file will be replaced by the output of the command)

Lots of options are available; use the utility's built-in help, available through its command-line option "-h".

I hope this helps,
Bruno