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/LAUNCHXL2-RM46: CAN Bootloader - Huge .bin Size from tiobj2bin

Part Number: LAUNCHXL2-RM46
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

I'm using the TI CAN bootloader referenced in Application Report SPNA241 and I'd like to be able to load the CAN bootloader onto our boards using UniFlash instead of installing CCS on another machine.

When I add the post build tiobj2bin incantation to create the .bin file, the result is about 4 Gb in size!

I did not make any changes to the linker command file (bl_link.cmd), and it does contain a couple of lines with vfill:

MEMORY
{
    VECTORS    (X)   : origin=0x00000000 length=0x00000020      vfill = 0xffffffff
    FLASH0     (RX)  : origin=0x00000020 length=0x00140000-0x20 vfill = 0xffffffff
    SRAM       (RW)  : origin=0x08002000 length=0x0002D000
    STACK      (RW)  : origin=0x08000000 length=0x00002000
/* USER CODE BEGIN (2) */
#if 1
    ECC_VEC  (R) : origin=(0xf0400000 + (start(VECTORS) >> 3))
                   length=(size(VECTORS) >> 3)
                   ECC={algorithm=algoL2R4F021, input_range=VECTORS}

    ECC_FLA0 (R) : origin=(0xf0400000 + (start(FLASH0)  >> 3))
                   length=(size(FLASH0)  >> 3)
                   ECC={algorithm=algoL2R4F021, input_range=FLASH0 }
#endif
/* USER CODE END */
}

The file size obviously greatly exceeds the size of the flash, and is way out of line with the 603 kb size of the .out file.

How can I create a reasonably sized .bin?

Thanks!

- Tom

  • The bin format can't support gaps between the initialised sections, and if the out file contains the contents of the flash and ECC regions then the bin file will have to include the 4,029,415,424 byte gap between the addresses of the flash and ECC regions.

    Uniflash supports programming TI ELF format files, so instead of programming a bin file can you use Uniflash to program the .out file instead?

  • Well now I feel silly. I did try that, but received the error "[ERROR] CortexR4: File Loader: Verification failed: Values at address 0x00000000 do not match Please verify target memory and memory map." It's been a while since I worked on getting the bootloader working, but your mention of the ECC reminded me that "Auto ECC Generation" needed to be unchecked, and None selected for "Flash Verification settings" in the Flash Settings. That allowed the programming with the .out file to go forward.

    Thanks for the swift reply!

    - Tom