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.

MSP430F5342: Problem with Fixed Address Function that never been erased

Part Number: MSP430F5342

Hello TI experts,

Assume that I have funtion called void TestMine(void).

I set this function at fixed address which may be 0x14400 in the flash of MSP430F5342 by modify the statement in the lnk430f5342.xcl.

This function is used as the OAD bootloader by trickery.And I can ensure there is no function or const data located in the flash which may be erased.

However,I'm still worrying about this trick.

First,this function will never be replaced after our products released beacuse it plays the role of  bootloader.After a successful upgrade,the project reset and I want to know whether the Local Variable in this 

function will be reset by the init operation like cstartup.s43?Furthermore,all the ram used by this function will be cleared and won't confuse with the new upgrade program?

Second,this function use function like __data20_read_char and __data20_write_char and __no_operation which are declared in intrinsics.h,would these functions' location in flash changed after upgrade?

After TestMine downloaded to flash,the BINARY is fixed,functions been called have fixed address,if these called functions' address changed after upgrade.It may be a disaster.

 

Can I use this trick with only ram and intrinsics function used to replace bootloader?Thanks in advance!

 

Best Regards

 

  • Hi,

    the topic you're touching is a quite complex one.

    Probably the best approach from a top level point of view would be setting up two completely independent projects, allocating certain memory ranges for code an variable in separate sections, on one side for the part, which should always stay the same, and on the other hand the part, which probably will be updated over time. Of course the resources defined in the projects linker command files should not be overlapping. This is the easier part.

    The most critical part is on the variables, which shall be used by both parts. Here you need to work with fixed allocations also for the variables.

    Probably, as based on your description, you're thinking about an RF application, and would like to use the RF interface for application and firmware update purpose, a good example from TI would be the application report of implementing an over the air FW update with the CC430. This is a different device, but the core of the problem and the handling of it should be the same or very similar.

    Or there is one for FRAM

    Also in general the implementation of a customized boot loader might face similar problems, so the other probably useful source of information is our main BSL landing page .

    I hope this gives you some helpful hints.

    Best regards

    Peter

  • Hello,

    I assume your question has been answered sufficiently, I am closing the thread.

    Best regards

    Peter

**Attention** This is a public forum