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.

Intel Hex image files - generating with CCSv6 and flashing using uniflash

Other Parts Discussed in Thread: UNIFLASH

Hi.

I have some problems flashing the MCU using Intel Hex files generated by the CCSv6.

MCU: TMS570LS033

CCSv6.1

Uniflash v3.4

XDS100v2 USB Debug probe.

I am generating the hex file by enabling the ARM Hex Utility in the properties of the project in CCS.and I have set the Output format to Intel Hex Format. The hex file is generated.

After that I am trying to use UniFlash to flash the target MCU. I have tried several options and none seem to work:

1. Using Uniflash->Program->Load Program, choosing the hex file. The program indicates that it is Writing Flash Memory. It reaches 90% on progress bar and gets infinitely stuck (no errors)

2. Using Uniflash->Program->Load Binary, choosing the hex file. The program indicates that the Writing Flash Memory completes, However the program is not running after that and the nERROR pin is activated. After that using Verify Binary returns that program verification is successful.

3. Using UniFlash->Programs and adding the hex file to list and using Program button. The programming is started but the progress is infinitely stuck on Processing #0: hex_file_name.

When flashing this program to the MCU using CCS inbuilt debug interface the program is working fine. It also works if I am using the .out file to flash the MCU via UniFlash.

Could you please give any suggestions? Maybe it has something to do with how checksums are generated? Because option 2 seems to work to some extent since it actually finishes the process. I have set the "Auto ECC Generation" in UniFlash. Do I need to configure any additional settings?

  • Can you zip up the hex file you are trying to load and attach it here so we can take a look at it?

  • I will send it to you in private message.
  • Ringolds,

    I took a look at the files you sent (specially the hex file), and here are my feedback:

    1. First off, you can use either 'Uniflash->Program->Load Program' OR 'UniFlash->Programs' to load Hex files. You should NOT use Load Binary to load Hex files.
    2. UniFlash does not actually get stuck when loading the Hex file. The problem is that the progress bar percentage calculation is incorrect, and therefore it looks like it stopped at ~90%, but the program load operation is still running in the background. You should be able to confirm this by turning on 'verbose mode' (scroll to the bottom of the Flash Settings, the checkbox should be there), and you will see that it is still programming, and you can leave it for a while for it to finish programming (takes a very long time).
    3. The data in the Hex file is quite different from the .out file you provided. If you look at the verbose information, you can see that the Hex file is writing only 0x20 memory every 0x80 memory ranges. And because there is so many discontinuous data segments, it takes a long time to load to Flash memory.

    This leads me to believe the generated Hex file is incorrect. Unfortunately, I don't know too much about the Hex generator tool, so I can't really help with debugging that.

    Thanks,
    Ricky
  • Thanks for the answer Ricky! I find it weird that flashing a hex file takes so long time, because I gave it some 5 minutes or so, that's why I assumed that it hanged there. I will check with the verbose mode.

    However, I still need assistance figuring out how to generate the hex file properly (because yes, I looked more in depth into the hex file and it does seems as you say, that the file is not fully generated and has a lot of "holes" in it). In my original post I mentioned the settings that I configured (Enable Hex Utility and set the Output format to Intel Hex). Maybe I might need to tick some of the check boxes in there, however I can't seem to find proper documentation for that part so I am not sure what exactly each does.

    Could you please forward this to someone who might be able to help me with the issue as it is rather urgent?

    Ringolds.
  • Ringolds Jargans said:
    However, I still need assistance figuring out how to generate the hex file properly (because yes, I looked more in depth into the hex file and it does seems as you say, that the file is not fully generated and has a lot of "holes" in it). In my original post I mentioned the settings that I configured (Enable Hex Utility and set the Output format to Intel Hex). Maybe I might need to tick some of the check boxes in there, however I can't seem to find proper documentation for that part so I am not sure what exactly each does.

    After reading this information, I suspect that your hex output comprises of multiple hex files, with the .hex file being only one among them. If you take a look at the /Debug (or equivalent build configuration) directory in your CCS project, do you see 3 other files with .i1, .i2, .i3 extensions? If so, that confirms that the hex output has been split into four output files.

    The number of output files generated can be controlled using the --romwidth option (in combination with the --memory_width option). Please see the ARM Assembly Language Tools Users Guide for more information on these options. If left to their default values, memwidth will be set to 32 and romwidth to 8 for Intel hex format. In this case, if you set the --romwidth to 32, that will generate one single .hex file output. Could you set that option and check if it helps address the issue?

  • Thanks a lot for the help AartiG and Ricky!
    Changing the romwidth and memwidth to 32 did the trick.

    Best regards,
    Ringolds