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 issue

Part Number: TMS570LC4357

Tool/software:

Hello Dear TI Team

As shown below, I used the official website routine UART_Bootloader_LC4357_New to boot the App program, the boot program size is 39KB, and the App program size is 15.9 KB

Several problems were encountered:

1. Why after booting the app, reset directly into the app, boot program was erased?

2. The address range of the boot program in flash is 0x00000 ~ 0x0020020

3. I want to put the bootloader in bank0 of flash and the app in bank1 and bank7 of flash. Please help me guide how to do this.

4. Why Bootstrap Can't Boot FreeRTOS App?

  • Hi Sam,

    1. Why after booting the app, reset directly into the app, boot program was erased?

    I don't understand your point.

    After booting the app, and if we did any reset the core will first execute bootloader only.

    The bootloader will verify whether application present or not and it will call the application only if there is a valid application present in the flash.

    2. The address range of the boot program in flash is 0x00000 ~ 0x0020020

    The boot program present till the address 0x0020000 address only.

    And the next 0x20 bytes will be used for signature bytes, i mean if these bytes have the below highlighted value (0x5A5A5A5A) then that means we have valid application from the 0x20020 address.

    The bootloader will verify this address and if it has the value 0x5A5A5A5A then it will call the application.

    3. I want to put the bootloader in bank0 of flash and the app in bank1 and bank7 of flash. Please help me guide how to do this.

    Just try to change the addresses carefully to bank-1 then it should work, meanwhile i will also check whether i had direct example for this or not. If i had then i will share with you.

    4. Why Bootstrap Can't Boot FreeRTOS App?

    It should, exactly what error you are getting?

    Please share some screenshots for the error.

    --
    Thanks & regards,
    Jagadish.

  • Hi, Mr. Gundavarapu

    According to your second point of the explanation of the instructions, it seems that after burning the APP program, the board re-upped to go directly to the APP program is correct, I thought the bootloader had been deleted, sorry!

    But if you want to load a new APP program again after bootstrapping the APP program through the serial port, what should you do?

    It would be better to use SPI as a bootstrap in the project.

    Is there a bootloader for SPI?

  • Hi Sam,

    But if you want to load a new APP program again after bootstrapping the APP program through the serial port, what should you do?

    You can do following thing, if you want to update the application with new program then you can do this:

    Erase the signature bytes of the application and do the core reset from application.

    Once you do this the bootloader code again gets call and it will execute again, now when the bootloader verifies for the signature there won't be any valid signature so now bootloader will not call the application, and it's just wait for new application to receive.

    Once it's programs new application then it will rewrite the valid signature and calls the application again.

    Is there a bootloader for SPI?

    CAN you please download the CAN bootloader example in below link:

    (+) [FAQ] TMS570LC4357: Examples and Demos available for Hercules Controllers (E.g. TMS570x, RM57x and RM46x etc) - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    Actually, this CAN bootloader demo also consists of other bootloaders like SPI and UART, here you just need to enable the corresponding MACRO.

    --
    Thanks & regards,
    Jagadish.

  • Thank you very much, your reply has helped me a lot!

    I have another question, is the program executed on power up only available at address 0. Can I burn the Bootload in the OTP area of flash bank0?

  • I checked the manual and found that the flash bank0 OTP of the TMS570LC4357 is only 4KB and the Bootloader compiles out to 30KB, which doesn't seem to be feasible.

    Our scenario requires high security, can we make a small jump program, burned in the OTP area, power on directly jump to flash bank0 or bank1 to execute?

    If possible, consider adding a subsequent triple-mode redundancy action, where 3 copies of the APP program are stored in flash, and the OTP performs a triple-take to get a reliable copy of the APP program prior to a small jump action.

    Looking forward to your reply, thank you very much!

  • I have compressed the compiled binary to 7KB by compilation option optimization, then I tried to disable some features like PMU, Vectored Floating, but the code size is still not reduced, is there any other way to compress the program size to less than 4KB?

  • Hi Sam,

    is the program executed on power up only available at address 0. Can I burn the Bootload in the OTP area of flash bank0?

    Yes, the program execution will always start from address 0.

    We never used OTP for program flashing, i don't have any examples to share.

    I have compressed the compiled binary to 7KB by compilation option optimization, then I tried to disable some features like PMU, Vectored Floating, but the code size is still not reduced, is there any other way to compress the program size to less than 4KB?

    I could see two customer OTP banks and each of 4KB and total becoming 8KB of OTP area.

    --
    Thanks & regards,
    Jagadish.

  • HI Jagadish
    Thank you very much for your reply, it solved my problem!

  • Thank you very much for your reply, it solved my problem!

    Good to hear that Sam!