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.

MSP430 Firmware upgrade with internal memory

Other Parts Discussed in Thread: MSP430FR5949

Good day everyone!

I am facing a problem here which I am unsure on which keywords I need to search for.

Heres what I have:

MSP430FR5949 + wireless module + custom wireless protocol

Program size < 50% memory

CCS 6.0.1

What I want to do:

Final goal is a wireless firmware update.

Steps:

1) Generate a hex file, as small as possible but with everything I need

2) Transfer the file in small blocks to the MCU and store it in FRAM (including CRCs etc. to make sure everything is correct)

3) Set a Flag in FRAM that a new firmware is availible and reset the MCU

4) Let the MCU copy the new firmware into the correct memory areas

Point 2) and 3) are simple and almost done. My problems currently are Step 1) und and Step 4) How can I achieve this? What would I need to pay attention to? What are good keywords to goole for?

Heres my current memory map. Will I have to copy the whole RAM section as well?

Any help is appreciated.

Kind regards,

Tim

  • Hello Tim,

    TI is planning to release OTA solutions for MSP30 FRAM devices by the end of this year. But for now, the best solution offered is the OTA Update With the MSP430FR57xx App Report (SLAA511): www.ti.com/.../slaa511a.pdf

    You will probably find the MSPBoot App Report (SLAA600) useful regarding how to create a bootloader that resides in main memory: www.ti.com.cn/.../slaa600a.pdf

    Regards,
    Ryan
  • Hello Ryan,

    thank you for your information. The examples you provided were extremely helpful.

    While trying to implement my solution and while examining the examples, I got some more questions:

    Regarding the examples in SLAA600:
    How does the compiler know, which parts of the code belong to the bootloader and which to the regular application? When I look at the linker command file. I only see a ".text >> FLASH | INFOBOOT" so I would expect the boot code to be marked with "#pragma SET_DATA_SECTION" but I cant seem to find anything related.

    Second question is, where exactly is the the value for the reset vector set? I created a special section in my FRAM for the boot code and want the reset vector to point to that area. How can I achieve that?

    Kind regards,
    Tim
  • Tim,

    Are you looking for the command linker file for the MSPBoot or App[x]_MSPBoot project? I ask because FLASH is defined separately in each. MSPBoot is the base target bootloader code and by default does not have an application program pre-loaded into the flash space, hence FLASH is defined as the bootloader space and typically occupies the upper 1 to 2 kB of memory up to 0xFFFF. The App[x]_MSPBoot command linker files are expected to be uploaded to the target via the host board through the MSPBootHost project and therefore its FLASH space is defined as the rest of flash memory not already reserved for the bootloader.

    For MSPBoot (target) RESET is located at 0xFFFE, for App[x]MSPBoot (application) it is set at the byte prior to the start of the bootloader space.

    Regards,
    Ryan
  • Hello Ryan!

    Thank you for all your support.
    I totally ignored that concept with two differnt projects residing inside the same controller :) I think I understand this part now.

    Theres on final question I have right now:
    Based on the example code. I also separated my code into two projects. A bootloader project which will do nothing but copy the code from the "image" area to the final destination (excluding the reset vector) and my application project. I have now the problem, that my bootloader wont be able to communicate as our wireless protocol is too complex to put it into the bootcode as well. When I program my controllers for the first time. I would ike to include the .hex of the application code at least into the "image" area.
    Is there a way I can tell this to the linker?

    Kind regards,
    Tim
  • Hi!

    I would just like to post a short follow up. The code is running now, everything working. The linked projects and documentation helped a lot and were basically everything I needed.

    Regarding my last question: I just manually copied the two ti-txt files into one image which is working fine.

    Thanks for all your help Ryan!

    Regards,
    Tim

**Attention** This is a public forum