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.

RM57: Bootloader and .bin generation with ECC

Other Parts Discussed in Thread: TMS570LC4357, NOWECC

Hi,

a customer has a ported a bootloader similar to the

For getting the .out file of the code to be bootloaded, generating the ECC, the customer is using the Linker ECC generation as recommended in

Then the idea is to use the tiobj2bin utility to take the .out file and generate a .bin file and let the bootloader FAPI write that to flash.

Is that the right approach?

The .bin file when generated from the .out file somehow has an incredible large size and we are still looking into this. But if someone could comment on the right approach with linker generated ECC and using a bootloader to flash a .bin, that would be great.

Thanks!

--Gunter

  • It sounds reasonable except I don't know much about the .bin file format. That's something that came from Stellaris and it's not what I would have used because there's no CRC or error checking. I think QJ may have used it though for the bootloader demo. So I'd suggest contacting him directly on the bootloader appnote questions. He's really the only one on the team that understands the specifics.

    The object file size should have expanded to cover the ECC (512K bytes on the RM57L) plus the application. If they used VFILL then it shouldn't be 4.5Mbytes. If they used FILL instead of VFILL it would be 4.5MBytes.
    Now that assumes tiobj2bin doesn't balloon VFILLs into FILLS .. It might. I don't know about the utility.
    If it's around 4.5Mybtes then this is probably what it is doing.
  • Anthony F. Seely said:
    It sounds reasonable except I don't know much about the .bin file format.

    The .bin file format contains a binary dump of the initialized sections from the lowest start address to the highest end address of the initialized sections, and if there are gaps in addresses between the initialized sections the size of the bin file includes the gaps between the initialized sections.

    For a TMS570LC4357 with flash starting at address 0x00000000 and the flash data space ECC starting at address 0xF0400000 I would expect the .bin file generation with ECC to create a file of size 0xF0480000 bytes, i.e. 3844.5 Mbytes.

  • Hi Gillon,

    The raw binary file doesn't include the address, so all the memory holes are filled with zero. The ECC address is at 0xF040_0000. The binary file contains the zeros filled to all the unused address among flash (0x00xxxxxx), SRAM (0x08xxxxxx) and 0xF040_0000.

    The Flash API has an option to calculate and program the ECC automatically, so you don't need to generate ECC using nowECC. The sample code (bl_flash.c) in TI bootloader has enabled this option.

    Regards,

    QJ