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.

TMS570LC4357: UART bootloader

Part Number: TMS570LC4357

Hi,

My customer has below questions for TMS570LC43x bootloader.

1) Documentation
According to below E2E thread, there is no official document for LC43x bootloader.
http://e2e.ti.com/support/microcontrollers/hercules/f/312/t/810562
I guess the bootloader function is similar to other devices.
Can we use documents for other devices(ex. LS31x) as a reference?

2) Source code
There is an UART source code posted on below E2E. Is this the latest one?
https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/699892

3) Loading file format
According to UART bootloader documents, the bootloader accepts “binary file” from PC.
The “binary file” means COFF(*.out) file or *.bin file ?
In case of *.bin file, *.out file needs to be converted to *.bin by tool (tiobj2bin), right ?

Thanks and regards,
Koichiro Tashiro

  • Hello Tashiro,

    1. You are right. The same document can be used for LC4357 bootloader. In this example, the bootloader is located in flash bank 0, and the application is assumed in bank 1. If your customer wants to program the application to bank0, they need to copy the F021 flash API to SRAM. Please refer to the code in TMS570LS31x UART bootloader.

    2. The source code is just an example. I haven't updated it. Sorry for that.

    3. It is raw binary file. CCS is able to generate this binary file through a post build step.

    "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

  • Hi QJ,

    Thanks for your answers.
    Could you confirm below two points?

    - The LS31x UART bootloader and LC4357 UART bootloader have same functionalities?

    QJ Wang said:

    2. The source code is just an example. I haven't updated it. Sorry for that.


    - I thought all Hercules bootloaders are just examples(i.e. customer can modify them freely). Do you mean LC4357 bootloader has missing functions compared to others?

    Thanks and regards,
    Koichiro Tashiro

  • Hello Tashiro,

    The example code for TMS570LC43x only works for programming the application to BANK1. To program the application to BANK0 (bootloader is located in BANK0), the F021 flash APIs must execute from SRAM. L4357 example code doesn't copy the flash APIs to SRAM and execute APIs from SRAM.

    Following code is used to copy flash API from flash to SRAM:

    Linker CMD file:

    • flashAPI :
    • {
    • Fapi_UserDefinedFunctions.obj (.text)
    • bl_flash.obj (.text)
    • --library= ..\flash_api\lib\F021_API_CortexR4_BE_L2FMC_V3D16.lib (.text)
    • } load = FLASH_API, run = RAM, LOAD_START(api_load), RUN_START(api_run), SIZE(api_size)


    Assembly code:

    • ;-------------------------------------------------------------------------------
    • ; Copy the Flash API from flash to SRAM.
    • .def _copyAPI2RAM_
    • .asmfunc
    • _copyAPI2RAM_
    • .ref api_load
    • flash_load .word api_load
    • .ref api_run
    • flash_run .word api_run
    • .ref api_size
    • flash_size .word api_size
    • ldr r0, flash_load
    • ldr r1, flash_run
    • ldr r2, flash_size
    • add r2, r1, r2
    • copy_loop1:
    • ldr r3, [r0], #4
    • str r3, [r1], #4
    • cmp r1, r2
    • blt copy_loop1
    • bx lr
    • .endasmfunc