cancel
Showing results for 
Search instead for 
Did you mean: 

converting .axf to .hax to flash on to STM3240G-EVAL Board

sunilpatil423
Associate II
Posted on April 30, 2012 at 08:59

Hi all,

I have generated a .axf file using ARM DS-5. I want to convert it into .hex file and flash to STM3240G-EVAL board.

I tried using arm comiler's 'fromelf' utility and one more tool ''ronetix-gnutools-arm-elf'' which runs on linux and got the .hex files. But these .hex files are not running when I flashed to the board. I am using STM32 ST-Link Utility to flash.

Anybody have tried this? Any suggestions?

Thanks in advance. 
4 REPLIES 4
frankmeyer9
Associate II
Posted on April 30, 2012 at 14:01

Shouldn't any

arm-none-eabi-objcopy

do the job ?

Posted on April 30, 2012 at 17:03

In Keil or RealView, you'd have to think you just need to check a box in the Output options to get HEX.

Perhaps your real problem is that the code is no good, or compiled at the wrong address. Attach AXF & HEX if you want someone to review.

The use of GNU tools has also been mentioned a couple of times on the forum.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32VLDiscovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32VLDiscovery/Exporting flash files from atollic&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000491D59B8574F8049B5DFA3E8B21CBA51&currentviews=1066]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32VLDiscovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32VLDiscovery%2FExporting%20flash%20files%20from%20atollic&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000491D59B8574F8049B5DFA3E8B21CBA51¤tviews=1066

I also posted a tool which converts AXF/ELF to three different standard hex formats.

''

Currently the hex output is a generated by my ELF dumping utility. It will generate ELFARM.HEX (Intel Hex), ELFARM.MOT (Motorola S-Record), ELFARM.TEK (Tektronix Hex), and ELFARM.BIN (Binary) automatically. At some point I'll clean it up a bit, but it should work well enough for testing purposes.

The command syntax is ELFARM filename.ELF The ZIP file is signed, and can be checked with PKUNZIP -t ELFARM.ZIP ''

https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32VLDiscovery/Attachments/240/ELFARM.ZIP

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sunilpatil423
Associate II
Posted on May 02, 2012 at 07:25

Clive, I tried your '' ELF dumping utility'' to get elfarm.hex. But still its not running on the board when I flash it. Something may be wrong in my code itself.

I have attached both my .axf and .hex. Please have look and see if you can make out any mistakes.

Thank you all.

________________

Attachments :

elfarm.hex : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtU7&d=%2Fa%2F0X0000000aQe%2FwhQ9v7HqQseFbLKIWaDFmgoCaZ24YoiYl.4U9h9ucrY&asPdf=false
Posted on May 02, 2012 at 18:26

The most apparent failure mode is that vector#0, which should be the stack pointer, points to an address in FLASH.

Check the source code for the startup.s (stm32f4xx.s), or equivalent file.

Check how the memory is being mapped via GUI, scatter file or linker script.

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