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.

TMS570LS1224: Flashing multiple identical SW images possible?

Part Number: TMS570LS1224
Other Parts Discussed in Thread: UNIFLASH

Dear TI experts,

What I am trying to achieve is to have two identical copies of a SW image flashed to the internal non-volatile storage of a TI TMS570LS1224.

My first question is - What is the best practice of achieving this?

How I am imagining it to work, as of this moment, is in the following manner:

  1. Create a project in CCS which will hold a bootloader application capable of reprogramming Flash.
  2. Have a separate CCS project for the SW Image.
  3. A user would then have to send the desired SW image over a serial communications interface like SCI (UART), or CAN.
  4. The bootloader application would then use the F021 API to reprogram the received image to a corresponding (hard-coded) address in Flash.
  5. After receiving and reprogramming both SW images into Flash memory, the bootloader will branch to the desired SW image by calling ((void (*)(void))ADDR_OF_SW_IMAGE)();

My second question is - How does one circumvent the redefinition of symbols (functions, variables, ...) when having two identical SW images residing in Flash?

My third and last question is - How can the HEX Utility be used as a leverage in this situation? Does it make sense to generate the two SW Images using the HEX Utility, then send them over to the MCU, and finally flash them into non-volatile memory?

 

Thank you in advance!

 

Kind regards,

Mihail

  • Hi Mihail,

    If the image is the first image in flash, you have to use CCS or uniflash to program. If there is a bootloader (UART, CAN, etc) in flash already, you can use bootloader to program the image to the flash.

    If the image2 is just a backup of the image1, will not be executed from flash. The DCAN bootloader accepts the start address for the application image, so you can use different start address for image2. But the images can not be executed from flash since the INTVEC address is mapped to the location of image1.

    If you want to execute the 2nd image from flash, you need to change the INTVEC memory address in the linker cmd file. The UART bootloader example don't accept the start address, the start address is hard-coded in bootloader.

  • Hello and sorry for the late response!

    From your answer I understood the following:

    1. It is possible to program 1 SW-Image to Flash, provided that a Bootloader application exists already on the Flash and is capable of receiving a SW-Image over some communication interface.

    2. It is not possible to flash an identical copy of that SW-Image because the addresses in the INTVECS file can only point to 1 SW-Image.
      1. Can these images be modified somehow to be different in such a way that there is no problems with their INTVECS?
      2. Would it be possible to point the addresses of the INTVECS to the Bootloader image? Would this allow for two images to be programmed and executed individually from the same Flash bank?

    Thank you in advance, and please correct me if I am wrong in my understanding!

     

    Kind regards,

    Mihail Milchev

  • Hi Mihail,

    You can load the 2nd image to flash through bootloader,and bootloader is able to jump to 2nd image. 

    1. Bootloader has the feature to accept the start address from the bootloader host ( for example PC), so the bootloader knows where to program the 2nd image.

    2. For exceptions (UNDEF, SVC, DAbort, PAbort),  use a separate handler in bootloader to bridge the exceptions with the 2 images: if the application is 1st image, bridge to image 1. If the application is the 2nd image, bridge to image 2.

    b imagex_start_address - 0x8

  • This answers my question.

    Thank you for the response!