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.

CCS GUI built hex file is different from post command line build hex file, what is the problem?

I'm using Version: 6.1.1.00022.

I build a hex file from CCS GUI: property ==> Enable ARM Hex Utility ==> Output Intel hex format (--intel, -i). Builds fine and download hex file to device using flash programmer 2. But the device doesn't work as expected. 

I build again, this time in the Build Steps, post-build steps (ARM Hex Utility is disabled), : "${CG_TOOL_HEX}" -order MS --memwidth=8 --romwidth=8 --intel -o "${ProjName}.hex" "${ProjName}.out" . Builds fine and download hex file to device using flash programmer 2, device works as expected.

The hex file size generated from two different methods are very different. What is the GUI ARM Hex Utility problem?

Screen shots of build and generated hex file using Build Steps command line method and using  GUI Enable ARM hex utility method are in attached file. I noticed in the command line method there is a "-order MS" but in GUI hex utility way I cannot find a place to have this added in. Is this the reason for the hex file difference?

It takes a lot of time to figure this out and hope answer can save other people time.

hex_build_problem.rtf

  • Graham Deng said:
    The hex file size generated from two different methods are very different.

    The explanation for the difference is in this post

    In summary, the GUI Hex utility does not explicitly set any values for romwidth and memwidth, hence they default to memwidth=32 for ARM devices and romwidth=8 for Intel hex format. This combination generates 4 output hex files. 

    If you set the romwidth and memwidth options in the GUI utility to match what you have in the post-build command line (both set to 8), then you should get a single output hex file similar to the command line build. 

    Let us know if this helps.