cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 .elf to .bin conversion problem

nikhil2399
Associate
Posted on September 12, 2012 at 15:49

Hi all,

I am using Ride gcc compiler for STM32F105RC, after compilation I get .elf file , I converted it to .bin using ''arm-none-eabi-objcopy'' utility, if I flash .bin file using Flash loader utility provided by ST, but nothing is working. The strange thing is if I flash the .elf file using Keil U-LINK2 code works perfectly fine.

Dose any one know what may be the reason for this?

#.elf-to-.bin
5 REPLIES 5
mithil
Associate
Posted on September 12, 2012 at 17:00

If by ''nothing is working'' you mean its not at all booting up, then may be you can check the reset handler address in .map file and check if it is same in the bin  file generated and verify if its actually reaching to the reset handler and then to your application.

mithil
Associate
Posted on September 12, 2012 at 17:00

If by ''nothing is working'' you mean its not at all booting up, then may be you can check the reset handler address in .map file and check if it is same in the bin  file generated and verify if its actually reaching to the reset handler and then to your application.

nikhil2399
Associate
Posted on September 12, 2012 at 17:17

Hi Myths,

I verified the reset vector address its same

David Littell
Senior III
Posted on September 12, 2012 at 17:53

Please post your Makefile.

stforum.tormod9
Associate II
Posted on September 13, 2012 at 23:41

Do you download the .bin to the right address? The .elf file contains address information, so when you flash it directly your flash utility will write it to the right place. When you convert it to a .bin file, you strip away all address information, so you will have to tell the flash utility where it should go. If you don't, some default address will be used, which might be wrong for your code.