cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting flash files from atollic

izua
Associate II
Posted on September 27, 2010 at 18:53

Is it possible to export flash files from atollic TrueStudio using a separate tool rather than the stock ''flash converter - not included with the lite version'' ?

13 REPLIES 13
adrian239955_stm1_st
Associate II
Posted on October 19, 2010 at 22:10

I'd be very interested to hear an answer to this question too.

Atollic Lite+ST-Link has to be the most accessible (least cost) option for hobbyist STM32 development by far. I have been monitoring these forums in the hope of finding community solutions to the two work-arounds needed for printf and .hex file generation but there don't seem to be many people going down this route. I find this surprising given that even I have managed to get a STM32F103 on a scrap of PCB, and debugged via ST-link all for under £20! This extreme low-budget approach may seem peculiar to some people, but it's par for the course in the 8-bit PIC world.

see also:

https://my.st.com/public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Program%20chip%20using%20st-link%20in%20Atollic%20IDE

Posted on October 21, 2010 at 06:31

Generates an ELF file, should be pretty simple to spit out the sections in Intel Hex, or Motorola S-Records.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
adrian239955_stm1_st
Associate II
Posted on October 22, 2010 at 10:32

Clive, I've googled for the format for .elf and not been able to find any indication that it's a simple container for text in .hex format - was this what you meant? If it were I agree it would be fairly simple to extract.

Posted on October 22, 2010 at 14:57

Clive, I've googled for the format for .elf and not been able to find any indication that it's a simple container for text in .hex format - was this what you meant? If it were I agree it would be fairly simple to extract.

The ELF format is reasonably simple, the form used by Atollic is a fixed form (ie not relocatable), it is in binary. The Intel Hex format is trivial. I don't think it would take more than 30 minutes to demonstrate if a direct conversion would be possible, or not.

I'll take a look later if I find some time.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on October 22, 2010 at 18:58

Here's a quick conversion of the demo I got Atollic to build (I don't know if the demo works, but the HEX is valid for the ELF), attach you own working .ELF if you want to test the conversion.

Edit : Added a complete set of binaries and hex files (Intel, Motorola, Tektronix) for the VL demo application.

Edit : Fixed static initialization

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
adrian239955_stm1_st
Associate II
Posted on October 23, 2010 at 12:06

Very Good Clive! Are you willing/able to share the tool you created to extract .hex from .elf?

Posted on October 23, 2010 at 13:44

Very Good Clive! Are you willing/able to share the tool you created to extract .hex from .elf?

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on October 23, 2010 at 15:51

The standard GNU utilities objcopy and objdump can be used for inspecting, manipulating, and converting many ''object'' file formats - including ELF and AXF

http://www.gnu.org/software/binutils/

Also, srecord is a collection of powerful tools for manipulating EPROM load files - including both Intel Hex and Motorola S-Records

http://srecord.sourceforge.net/

Posted on October 23, 2010 at 16:52

Or bake from scratch, none of the formats are what I'd class as hard.

The TIS ELF/DWARF documentation is the classic reference.

http://refspecs.freestandards.org/elf/elf.pdf

But Andrew is right, there are probably other tools that can get you to the data, or output/mangle it in a form you want.

I would have much preferred the tool chain to have done this, and perhaps have a code size limit for the demo/eval. Instead it removed things like projects, and the UI is murderously complicated, slow and inflexible.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/ARM CortexM3 STM32/Program chip using st-link in Atollic IDE&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000626BE2B829C32145B9EB5739142DC17E&currentviews=532]FYI Thread on objcopy

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