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.

holes in hex file

Other Parts Discussed in Thread: TMS570LS20216

Hi,

Processor : TMS570LS20216 (Cortex R4), Code Composer Studio : 4.2.0.10018,  TMS470 C/C++ CODE GENERATION TOOLS 4.6.3

I am working on a tool which appends the CRC32 value at known location for the output file generated out of CCS. I am facing some issue with the holes in the memory while calculating CRC32.

I am generating output hex file from the CCS. When i analyze hex file, i found that there are some holes in between. See the below sanpshot of hex file for example. No values are mentioned for address range 0x1E0C to 0x1E10 (i.e for 8 bytes)

:101DFC0000001A00000000000000000000000000BD
:201E100001010110FF0120000110FF0000008B0000009C0000009D000000290000008300FF

[ options used for generating hex file : hex470.exe -o "output.hex" -romwidth  8 -memwidth 8 -i "input.out"]

I found an Run time Environment option in the linker to fill the holes with known values i.e --fill_value = 0xFFFFFFFF (Reference : Table 2-25. Run-Time Environment Options Summary of SPNU151G). When i use this option, i expect that address range 0x1E0C to 0x1E10 should fill with 0xFFFFFFFF. But i dont see the value, instead i observe all zeros (observed in debugging mode).As per my understanding hex file should also list these values. i.e the generated hex file should be like below for example.

:101DFC0000001A00000000000000000000000000FFFFFFFFC1

Is that my understanding correct ? Suggestions are welcome.

  • I received your post. I will check it on my bench and get back to you.

    Regards,

    Haixiao

  • It works in my bench.

    The .out without fill: http://e2e.ti.com/cfs-file.ashx/__key/CommunityServer-Discussions-Components-Files/312/6355.TMS570M_5F00_DCAN_5F00_wofill.out

    The .out with fill:http://e2e.ti.com/cfs-file.ashx/__key/CommunityServer-Discussions-Components-Files/312/6116.TMS570M_5F00_DCAN_5F00_wfill.out

    The difference in the .cmd linkcmd file:

    VECTORS (X) : origin=0x00000000 length=0x00000030 fill =0xFFFFFFFF

    The command I use to generate hex file:

    hex470.exe -o "output.hex" -romwidth  32 -i "C:\whx\Catlog\Sample_Code\TMS570M_DCAN\Debug\TMS570M_DCAN.out"

    The hex files that I generated: http://e2e.ti.com/cfs-file.ashx/__key/CommunityServer-Discussions-Components-Files/312/4401.output_5F00_wfill.hex, http://e2e.ti.com/cfs-file.ashx/__key/CommunityServer-Discussions-Components-Files/312/2804.output_5F00_wofill.hex

    PLEASE LOOK at the 2nd line of the file with fill.

    Regards,

    Haixiao

  • Hi Hiaxio,

    I have used the below option in the project properties for filling the holes instead of linker command file. The below option is not working. Why ?

    C/C++ Build -> TMS470 Linker -> Runtime Environement -> --fill_value.

    The holes i observe is in the text section of the hex file. So i tried as you mentioned above. i.e update in the linker command file.

    FLASH0 (RX) :origin=0x00000020 length=0x0007FFE0 fill =0x0000000

    The above command fills the holes in between the program if present as i expected. But also fills unused memory in the FLASH0 to 0x000000 which i dont want. How to handle this problem ?

    Can you please explain the options romwidth and memwidth avaiable for the hex470.exe ? Why did you choose romwidth as 32 ? And how to read the hex file with this option ?

  • Bindu Tanguturi said:

    Hi Hiaxio,

    I have used the below option in the project properties for filling the holes instead of linker command file. The below option is not working. Why ?

    HW: I don't know. I never try this option. 

    C/C++ Build -> TMS470 Linker -> Runtime Environement -> --fill_value.

    The holes i observe is in the text section of the hex file. So i tried as you mentioned above. i.e update in the linker command file.

    FLASH0 (RX) :origin=0x00000020 length=0x0007FFE0 fill =0x0000000

    The above command fills the holes in between the program if present as i expected. But also fills unused memory in the FLASH0 to 0x000000 which i dont want. How to handle this problem ?

    HW: You can shrink the "length" to fit your case. Actually, if you enable ECC, please fill ALL the Flash area to avoid Specular Fetch.

    Can you please explain the options romwidth and memwidth avaiable for the hex470.exe ? Why did you choose romwidth as 32 ? And how to read the hex file with this option ?

    HW: I think it is option to break the file into several files to fit into different physical ROMs. For example, you use 4 8-bit flash chips, and want to program them seperately... Anyway, I think you should use -romwidth 32 option.  rom means the rom that defined in the link cmd file. The format depends on what you choose, ascii, Intel ..... I think you get the answer from another post.