cancel
Showing results for 
Search instead for 
Did you mean: 

UPGRADING APPLICATION FIRMWARE BY USB STICK

sami
Associate II
Posted on June 13, 2013 at 17:16

HELLO

I  want to upgrade the fırware of my design by usb stick , I am using the example given with the discovery board where I need a binary image of my Project  myproject.BIN,

I am using keil so I can generate hex file of my Project , how can I convert hex file to binary file inorder to use it?

Thank you
26 REPLIES 26
John F.
Senior
Posted on June 13, 2013 at 17:26

Intel HEX to BINARY File Converter Utility

http://www.keil.com/download/docs/7.asp

http://www.hex2bin.com/hex2bin/

sami
Associate II
Posted on June 13, 2013 at 18:02

Thank you john ,

but I use 64 bit system I does not work .

Posted on June 13, 2013 at 18:10

My ELFARM tool should work from the command line, and takes AXF files and converts to hex and binary.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/converting%20.axf%20to%20.hax%20to%20flash%20on%20to%20STM3240G-EVAL%20Board&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=594]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2Fconverting%20.axf%20to%20.hax%20to%20flash%20on%20to%20STM3240G-EVAL%20Board&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=594

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sami
Associate II
Posted on June 13, 2013 at 18:24

Thank you Clive   I could  not make it work , could you explain a little how to do that ?

Posted on June 13, 2013 at 18:32

It runs from the command line, thus

ELFARM C:\STM32Seminar\32L152CDISCOVERY\Firmware\STM32L_Discovery_FW\Projects\HelloWorld\MDK-ARM\STM32L-Discovery\STM32L-Discovery.axf

This will generate a bunch of screen output, it's an ELF file dumping tool, when it finishes there will be the files ELFARM.BIN/.HEX/.MOT/.TEK in the directory from which you ran the tool.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sami
Associate II
Posted on June 13, 2013 at 18:46

Thank you now I could generate the bin file , but after downloading the program did not work !

Do I need to set something related to the address in myproject firware ?

Posted on June 13, 2013 at 19:38

The base address for the data in the .BIN will be whatever you set up the compiler/linker to generate.

You could examine the file with your preferred file viewer or hex editor.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sami
Associate II
Posted on June 13, 2013 at 19:46

In keil .. options -linker I set R/O base to 0x08008000, but no way .. still not working .

Any suggestion please ?

Posted on June 13, 2013 at 20:32

Break out the debugger for your boot loader and step in. Follow the transition from the boot loader into the app code. Make a more clear determination of what is going wrong.

Check what's stored at 0x08008000 and confirm it matches what you expect.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..