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.

TMS320F280049C: Uniflash export byte swap issue

Part Number: TMS320F280049C
Other Parts Discussed in Thread: UNIFLASH

Using Uniflash 6.0.0.2710 and F280049C.  With a given Hex file, the F280049 can be programmed and operates correctly.  However, when you export in Uniflash, it will swap the bytes in the exported file.  In CCS, you can export the memory and it provides an option to swap.  This does not appear to be available in Uniflash, so believe there is an issue here.  Desire is to program the F280049, export, and reprogram from exported file without the need to byte swap via a hex utility.  Please let me know if more details are needed.

Thanks,

Eric

  • Eric,

    16-bit data that you see in UniFlash memory window when exported will be represented in bytes in little-endian order.

    When you reload the binary file (that you exported from UniFlash) using UniFlash again, the bytes will be interpreted in the little-endian order and the 16-bit data will be reconstructed correctly. 

    You can simply try to load the exported file and confirm this. Please let me know if that is not the case.

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    Thanks for the information.  I believe that the uniflash tool is programming correctly, but there may be some sort of viewing issue.  The following steps were taken:

    Step 1 : Load original.hex file and it’s file contents will be 00 48, using first 16-bits as example

     

    Step 2 : Read from memory browser and Hex file contents will be 48 00

     

    Step 3 : Export the original.hex into .bin format. Then exported.bin file contents will be 48 00(Contents are swapped here)

     

    Step 4 : Reflash exported.bin file

     

    Step 5 : Read from memory browser .bin file contents will be 00 48

     

    Step 6 : Export the .bin file again . Now the .bin file contents will be 48 00.

     

    Step 7: Comparison of files is done with Step 4(same as step 3) and Step 6 .bin files and both appear to be same.

     

    So it seems that the original hex file and bin file formats cause the Uniflash memory view behavior to be different (bytes swapped depending on format used to flash).  For example, like there is some sort of inherent byte swap as a function of file type.  Will try viewing the memory with CCS to see if this same behavior exists.  Please let me know if you need additional information.

    Thanks,

    Eric

  • Eric,

    Thank you for confirming that UniFlash is programming correctly and the details you provided.

    I will look in to the dependence on file type.

    Thanks and regards,
    Vamsi

  • Eric, Vamsi,

    I recall a discussion earlier in the year on a similar topic. I'll see if I can dig up the details

    ki

  • Ki said:
    I recall a discussion earlier in the year on a similar topic. I'll see if I can dig up the details

    I believe it may be related to this thread:

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/882558/3266922#3266922