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.

hex2000 --load_image file format

I am looking for the format of the file generated by the hex2000 utility when the --load_image option is selected. This format is efficient (i.e. not ASCII) and has all the information required for a custom boot loader to parse an image stored in flash and copy it from on-board flash to RAM. I can 'guess' at the format but I would really like to be certain. I can easily write a parser for the --load_image format if I only knew exactly what the format is. If there is sample code, that would also be sufficient.

I would appreciate this not turning into a long discussion of why I need it, just suffice it to say that I will be putting multiple application images in the on-board flash with a table (also in flash) to indicate which ones are valid and where they are, so I need a good way to store them efficiently and boot the selected image.

By the way, I have used the rprc file format with the c6x before and thought that maybe I could use the same utility to convert the F28335 .out file to .rprc format but that utility is written for 8-bit data so the output file only includes half of the F28335 data.

  • Please see this wiki article about combining executable files.  You will see that the output format of --load_image matches the format of the input files.

    Thanks and regards,

    -George

  • Yes,  I see that,  but what exactly is the byte-by-byte format. I need sufficient information to parse the load image myself. Maybe I looked right at it but I didn't see it in the wiki page.

  • Somehow, I overlooked the fact you are building for C2000.  That simplifies the answer.  I should have realized this sooner.

    The output format is COFF.  Please see this wiki article for more background on working with object files (both COFF and ELF format).

    A more elaborate answer ... The hex utility (speaking generally across all devices supported by TI, not just C2000) accepts both COFF and ELF format files as input.  When you use the option --load_image, the format of the output file matches that of the input files.  So, the output could be COFF or ELF.  At this time, though, the C2000 tools only support COFF, and not ELF (though that will change soon).  Therefore, with C2000, the output can only be COFF.

    Thanks and regards,

    -George