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.

TMS320F28035: FW upgrade through OTA

Part Number: TMS320F28035
Other Parts Discussed in Thread: UNIFLASH

Hi,

We are working on Firmware upgrade through OTA and need your support. We want to implement it with two images. Flash will be divided into 3 parts for bootloader, image-1 and image-2. When we receive FW upgrade command through serial port, image received will be stored @another image location(if image-1 is running at present, the new image will be store at image-2 memory locations and vice versa).

1. Is there any document describing FW upgrade with two images?

2. with every FW upgrade, need to switch between images which are stored @ different memory locations. To implement this, generating relocatable binary file with offset address and storing in flash @start of image address + offset address and jump to image start address will run the new image? Is this correct approach?

3. If so, what is the file format I need to generate? and how to generate it in CCS?

Please clarify.

Thanks,

Hari Priya

  • Hello

    1. No, there is no specific document on that.
    We have our general serial flash programming doc: www.ti.com/.../sprabv4b.pdf
    Additionally Uniflash can program more than one image but might not be applicable for your use case of OTA update.

    2. I'm not clear on what you are describing. Maybe a flow chart would help. I've seen solutions that use a single flash entry point with code located there to determine where the newest application was installed.

    3. Are talking about the HEX format? Refer to the serial flash programming section 3.1 about generating that.

    Best regards
    Chris
  • OTA FW Update Flowchart.pdfHi Chris,

    Sorry for not providing sufficient information.

    2. Please find in the attachment, high level flow chart of FW update implementation idea. Our idea is also to implement with single flash entry point where it always enters custom bootloader and from there it jumps to recent image address location. Please suggest if there is any other method to implement it.

    3. Not hex format because the addresses are fixed(absolute addresses as per the linker file) in hex file. But in our case address where the image need to be stored changes every time we do FW update. It depends on which image is running at present and which is spare image. i.e it could be at either image-1 or image-2.

    4. How this can be achieved? As per my understanding, we should generate a relocatable file with offset addresses and to be used to receive through serial port and store it in flash(image-1 or image-2) based on the offset address in the file. If this is correct, in which format we need to generate the file which need to be programmed through application FW? We need to copy the data section wise, like .text, .data etc or receive byte by byte and store as per the offset address?

    Also do we need to use two linker files for two images.

    5. I have gone through flash_kernel example code in which only one image is written(using serial flash programmer application) and the .b00 binary file is used. But when I see .b00 file it also has addresses fixed.

    Please help.

    Thanks,

    Hari Priya

  • Hari

    Thank you for the additional information! Let me review and think on this, then I'll get back to you tomorrow.

    Best regards
    Chris
  • Hari

    2. I agree with that method
    3, 4, 5. I'm not familiar with generating a relocatable file.
    From the following post, I'm not sure it is really feasible with what the C2000 compiler provides.
    e2e.ti.com/.../342657

    Our ROM bootloaders (if you use it or build your own based on it) use the HEX format. This generated using the C2000 HEX Utility.
    In your bootloader, you may (as I haven't done it), be able to identify the memory destination addresses and modify the locations that code gets copied to. So you generate your static images and then use your bootloader to adjust the destination memory location.

    Yes, you'll need two linkers for two seperate images going to different memories.

    Best regards
    Chris
  • Hi Chris,

    Thanks for your inputs.

    1. So with your inputs I want to implement in my code to read binary file(.b00), parse it and store 2nd image section wise @ another flash address(need to see if .b00 file is section wise divided with related addresses). Is it possible with reading binary file?

    2. Suppose say I have implemented loader functionality as said above and copied 2nd image from another memory location, doing SW reset and jump to second image from bootloader runs 2nd image? If so why 2 linker files are needed in this case? And how to switch between linker files at run time?

    Thanks,
    Hari Priya
  • Hello

    1. I would assume the binary file breaks down similar in structure to the HEX so you should be able to parse it.
    2. Linkers are building the image and not used at run time. All I'm saying is you're building two images and want them to be allocated to different memory regions, then you'll need a different linker for each. If you're going to try the bootloader method that alters the destination memory, then you can build both with the same linker. I would still recommend, if you can, building the two images with separate linkers so that you don't have to edit the destination memories as part of the bootloader parsing. If that is an option you can make work.

    Best regards
    Chris