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.

Tiva C project hex file generate issue in TI v5.1.1

Hi,

I have add a Post-build steps to convert the bin file to intel hex file, and configure Specify maximum number of data items per line of output as 16. But the generated hex file is 32bytes per line. 

hex file as follow:

:2001E0003504010035040100350401000000000000000000350401003504010035040100A3
:20020000350401003504010000000000000000003504010035040100350401003504010082
:200220003504010035040100350401003504010035040100350401003504010035040100EE
:200240003504010035040100350401003504010035040100350401003504010035040100CE
:0C026000350401003504010035040100E4
:20026C002DE9F04306462DED018A7079ADF1100D16F002FFAFA20CCA11F0FCFF14F068FE00

command:

"${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

&

"${CG_TOOL_ROOT}/bin/armhex" -i "${BuildArtifactFileName}" -o="${BuildArtifactFileBaseName}.hex" -memwidth=8 -romwidth=32 -olength=16 

Is this a compiler issue? Or TI has another tools to convert?

  • felix zhong said:
    I have add a Post-build steps to convert the bin file to intel hex file

    That is not what happens.  These two post-build steps produce different results from the same input.  The ${BuildArtifactFileName} is the .out file produced by the linker.  The tiobj2bin step takes that .out file as input and produces a .bin file.  The armhex step takes that .out file as input and produces the Intel hex file.  The .bin file is not an input to the armhex step.  If you don't use the .bin file for anything else, then you can remove that step.

    The length of the data in one line of the Intel hex file is not part of the specification for the format.  Why do you need to limit line length to 16 bytes?  The -olength option does not work.  Please see this thread about that.  It discusses use of the C2000 tools, but the exact same explanation applies here as well.

    Thanks and regards,

    -George