This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Binary dump of EABI initialized sections



I'm trying to get a binary dump of whatever the debugger would write to flash (e.g. .text, .cinit, .init_array, .const), by postprocessing the ELF output of my compilation.

The application is a bootloader; I'd send it the binary data over some bus, and then it would write the binary data to whatever the application region of flash was.

It looks like hex470 is meant to do this, but it doesn't appear to have any way to write out raw binary data; it only seems to output ascii files.  I can write a script to take a TI-TXT file and turn it into a binary file, but that seems silly if I'm just missing a flag somewhere.  Is there a TI-recommended way to do this?

  • Hi Tom,

    The easiest is probably to load the test to your target and use nowFlash "save as a binary" option.

    If you don't want to load the test then postprocessing the hexadecimal file is probably the best way, hex470 doesn't have a save as binary option.

    Best regards,

    TI Forum Support team

  • Hi Luc,

    Some further googling informed me of a convenient TI utility to do this: http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/t/110517.aspx?pi23648=1.  There's a script in ccs4v\utils\tiobj2bin\ that does exactly what I'd like to do, and has comments explaining how to add it as a post-build step.

    I've only seen this referenced from a forum post, and it uses the undocumented hex470 -b feature, but as it's included with the CCS distribution I'll assume I can rely on it.

    Thanks!