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.

TMS320C6678: The length of the section in the btbl file does not match the length of the section shown in the map file

Part Number: TMS320C6678

Hi team,

Here's an issue from the customer may need your help:

Regarding SPI boot, the entire boot process has been done.

However, when generating a multicore burned image file, the multicore uses the same project and requires a different cmd file as well. To resolve this issue, the customer wrote a program that found the address of each section to the btbl file generated by Hex6x and then regenerated the new btbl file by modifying it to the global address according to the nuclear number. Because the format of program storage in the btbl file is fixed, it should be byte-length, destination-address, and byte-length data. The addresses of each program section can be found by traversing the entire file in this fixed format.

While it found that only some of the files could generate the correct burn files. Troubleshooting the cause of the error found that the length of the btbl file section generated using the Hex6x tool does not match the length of the section shown in the map file.

The .const section in the .out file of the project is 0x1326 long in the map file, but the actual text in the generated btbl file is 0x1328 long, with two more bytes, resulting in a new btbl file error generated.

The RMD text used to call hex6x is as follows:

core0.out
-a
-boot
-e _c_int00
-map core0.map
ROMS
{
FLASH: org = 0x0C000000, length = 0x100000, memwidth = 32, romwidth = 32
files = {core0.btbl}
}

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Cheery,

    Please post the  btbl file error message as a snapshot.

    Also, please upload the files they have used along with the procedures they followed to generate the image.

    ---

    Mean while some tips.

    ---

    Try converting some example ".out" file and make sure it is properly converted, then from that example, try modifying the files one by one.

    ---

    For example, consider, I have a sample "spiboot.out" file and run the following script. "spiboot.bat" to create a bootable-burn image.

    spiboot.bat - Script file to invoke and run all the utilities.

    set IBL_UTIL=C:\ti\pdk_c665x_2_0_16\packages\ti\boot\ibl\src\util
    hex6x spiboot.rmd
    b2i2c spiboot.btbl spiboot.btbl.i2c
    %IBL_UTIL%\btoccs\b2ccs spiboot.btbl.i2c spiboot.i2c.ccs
    %IBL_UTIL%\romparse\romparse nysh.spi.map
    copy i2crom.ccs spirom_le.dat
    byteswapccs i2crom.ccs spirom_le_swap.dat
    %IBL_UTIL%\btoccs\ccs2bin i2crom.ccs spirom_le.bin
    %IBL_UTIL%\btoccs\ccs2bin -swap i2crom.ccs spirom_le_swap.bin

    Regards

    Shankari G

  • Hi Shankari G,

    Thanks for your support.

    The batch text that generates the btbl file is hex6x.exe core0.RMD, where the core0.RMD text is as shown above. The resulting map file is shown in the following figure, where the .const section length is 0x1396:

    The resulting btbl file .const section begins with the section as shown in the following figure, starting at 8065 lines: 

    The .const section ends with 8274 lines as shown in the following figure: 

    Each line of 24 bytes, the total byte length can be calculated as 0x1398, which is inconsistent with 0x1396 in the map file, with two more bytes. 

    Thanks and regards,

    Cherry

  • Cherry,

    Is it the ---- " direct-SPI boot " or the "booting with IBL" ?

    Please give details about the name of the software package, you use.. Is it Processor SDK 6.3? 

     If yes, 

    Please follow the below faq to boot the application from SPI with IBL.

    ===================================================

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1073147/faq-tms320c6678-how-to-flash-the-ibl-intermediate-boot-loader-into-eeprom-and-how-to-flash-the-application-binary-into-nor-how-to-boot-the-ibl-application-binary

    --

    If we follow the steps carefully, given in the above link, we will be able to flash and boot the application from SPI-NOR

    Regards

    Shankari G

  • Cherry,

    Additionally, try this option, if you are doing direct boot from SPI without IBL...

    https://www.ti.com/lit/an/spracn2/spracn2.pdf - KeystoneI Bootloader Resources and FAQ

    4.4 SPI Boot

    4.4.1      I am Able to Boot Direct SPI NOR Example, however, it Fails to Boot With Complex .out (big .out file) File. How to Solve This Issue?

    If you are using the b2i2c utilities in the MCSDK, please look at the source for the B2i2c function in the ~/tools/ibl/src/util folder. The default max size configured in the tool is 0x20000 .

    You can change the macro SIZE to be able to process your image.

       #define SIZE 0x20000

    Regards

    Shankari G