2012-04-29 11:59 PM
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.2012-04-30 05:01 AM
Shouldn't any
arm-none-eabi-objcopy
do the job ?2012-04-30 08:03 AM
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¤tviews=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
2012-05-01 10:25 PM
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=false2012-05-02 09:26 AM
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.