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.

MSPM0L1306: Flash write example linker section for data

Part Number: MSPM0L1306

Hello,

I noticed that in the flash multi size write example there's no separate section in the linker command file for the data. The example just defines an area in flash and writes to it. This is not good practice because a customer an easily integrate this code into their application and have the application accidentally clobber its own code space by writing to the area in flash. 

Can we get this example updated so that it includes a separate data section in the linker command file so that the linker knows not to place code in the data storage area?

It would also be good if this example dynamically places this data section at the end of flash memory so that it automatically scales with the size of the flash on the device.

Munan

  • Hi Munan,

    Can we get this example updated so that it includes a separate data section in the linker command file so that the linker knows not to place code in the data storage area?

    I assume it requires customer to define the specific region for the Flash writing. Due to there is not exactly the same demand for different customer application.

    It would also be good if this example dynamically places this data section at the end of flash memory so that it automatically scales with the size of the flash on the device.

    I will recommend customer to put the section in lower 32KB Flash area, because it has larger erase cycles than higher 32KB.

    Meanwhile, different memory device has a different memory size, I think it is inconvenient to manage the different devices' .cmd file.

    B.R.

    Sal

  • Hi Sal,

    Can you find a way to solve the problem instead of just saying it's different or difficult to support? 

    I understand that this is just an example but if we want customers to use these examples as a basis for their applications we have to show best practices in our examples.

    We have FRAM examples for NV storage which implement this, and have guides for the linker command file on how to point something to the end of the application or to the end of the memory on that particular device. These are items that the MSP team has supported in the past so I would expect that we can do the same here.

    Munan

  • Hi Munan,

    I think it has lower priority for find a perfect way to supporting it, becuase all the reason that I list here.

    have guides for the linker command file on how to point something to the end of the application or to the end of the memory on that particular device.

    Can you share me with that? I think maybe we can add some clarifications on the ReadMe file of the code example. 

    B.R.

    Sal

  • Sal,

    The MSP430FRboot is a good example of how we've created linker files that can scale to different memory sizes. There are still things that are somewhat manually defined, but then we generate hooks into the linker file that we can use in code for data placement.

    https://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430FRBoot/latest/index_FDS.html

    Munan

  • Hi Munan,

    Thanks for sharing, I have gone through it and curretly we will not support it.

    Now we only have L and G series and the cmd linker file of currently device is quite simple. Maybe for the 512KB device later with dual bank Flash, there will be more instructions.

    I still insists that it is a application usage and users should be aware of it on their own. Is there many customers confused by this? If it is please give me some clarification, I will forward this thrad to our software team and suggest add more instructions.

    B.R.

    Sal

  • Hi Munan,

    An update from our software team: They think it a good feedback, and consider process it in future version iterations.

    Thanks for your feedback.

    B.R.

    Sal