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.

Difference between .hex and .out

Hi team,

I am building a code example and came across a few questions:

  • What does the .out file include that makes it so much bigger than the .hex file?
    • My .out file is 2395 KB while the .hex file is only 44 KB.
  • I see that the FLASH + SRAM size totals to approximately 26 KB. What is in the other ~18 KB of the .hex file?
  • Is there a way to make the .hex file even smaller?

Thank you,

Akash Patel

  • The .out file is an executable object file. It contains various meta-information, especially debugging information.

    Use the command-line tool "armofd" to inspect the .out file. First look at the section table. The column "alloc" tells you whether that section is in target memory or not. Sections which are not in target memory contribute to making the .out file much larger than the .hex file.

    The program as it lives in target memory is a compact binary representation. The Hex file is a less compact ASCII representation, plus spacing, plus an address column. This necessarily makes the .hex file significantly larger than the target memory footprint.
  • Hello,

    Thank you for the quick response. I tried to do a search for the armofd tool but could find a download. Do we have a link available for this?

    Regards,
    Akash Patel
  • Akash Patel said:
    I tried to do a search for the armofd tool but could find a download. Do we have a link available for this?

    armofd is yet another executable that comes with the compiler.  If you have CCS installed, you will find it at a location similar to ...

    C:\ti\ccsv6\tools\compiler\ti-cgt-arm_15.12.3.LTS\bin

    Thanks and regards,

    -George