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.

TMS570LS0332: How to get bootloader to fit

Part Number: TMS570LS0332
Other Parts Discussed in Thread: TMS570LS0432

We need to write a bootloader for this part and need to confirm a few things in order to do it:

* RAM limited to 16KB

* Flash limited to 2 Banks (Bank 7 = 16KB and cant be executed, Bank 0 =384KB)

* Cant execute the bootloader in Bank 0 because that is the only place we can load the application code which we are flashing, therefore, if bootloader is in Bank 0 along with application code being flashed, bootloader will need to be copied to RAM before executing.

One other question too - can you tell me how may bytes the Flash library takes up?

Thanks

Larry

  • Hi Larry,

    You don't need copy all the bootloader code to SRAM for execution. The only files you need to copy to SRAM are:

    Fapi_UserDefinedFunctions.obj (.text)

    bl_flash.obj (.text)

    --library= ..\..\..\lib\F021_API_CortexR4_BE.lib (.text)

     Which are defined in cmd file.

    Based on the CAN bootloader example, the Flash API is less than 4KB, and whole bootloader is around 15KB.

     

    Regards,

    QJ

     

     

  • Also, please note that the SRAM size in the LS0332 device is 32KB. FEE size is 16KB.

    Also note that even though the FEE area of BANK7 is not executable, you could certainly store a binary in that area and copy it to RAM for execution from RAM when needed. This would help preserve memory space in Flash since Flash is limited to 256KB in the LS0332.
  • Thank you. We are actually booting over SPI for this processor. Is there an SPI bootloader example available?
  • Hello Larry,

    There is a SPI application note and example code located in the application notes section of the product page for this device.

    Here is a link to the application note: 

    Note that the app note and demo are written specifically for the TMS570LS0432 but the code is compatible with the LS0332 as well given that the LS0332 is a memory subset of the LS0432. The only difference is the flash size so the linker command file may need to be updated for the port.