You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many MSP430 have an info segment. In particular, the MSP430i20x1 has an info segment at address 0x1000 that is 1 KB in length. It would make sense to create a linker segment or perhaps allow this linker segment to be provided by the PAC to msp430-rt so that it can be included in the sections. This would allow global statics to be instantiated which can be located in the info segment without any handling of pointers. I think using linker segments is the right way to handle this. I think one large linker segment is probably sufficient. Any handling of block erasure needs to be carefully handled anyways, and this would only be useful for the process of reading the data and writing the data post erasure.
If anyone else has an alternative concept for how the info segment should be dealt with, please chime in. I am currently just using a raw address in my code, but I think that a more robust solution would use the linker since then it should be possible to have the size of the data placed into the segment be limited at link time and then the user wont need to worry about the underlying address (except when erasing, which they have to do anyways).
The text was updated successfully, but these errors were encountered:
Please see postcard-infomem, specifically the examples crate for my take on this exact topic :). I would advise using my crate; actually getting the API even somewhat close to ergonomic was much more difficult than I thought, and I could use the feedback.
The example working properly on msp430 is blocked on rust-lang/compiler-builtins#520, but I can confirm writing/reading infomem works at least.
Also see the msprun command for an ergonomic way to program information memory in one command.
I do not plan on adding infomem functionality to this crate specifically. So I think this is more of a question and should be closed.
Many MSP430 have an info segment. In particular, the MSP430i20x1 has an info segment at address
0x1000
that is 1 KB in length. It would make sense to create a linker segment or perhaps allow this linker segment to be provided by the PAC tomsp430-rt
so that it can be included in the sections. This would allow global statics to be instantiated which can be located in the info segment without any handling of pointers. I think using linker segments is the right way to handle this. I think one large linker segment is probably sufficient. Any handling of block erasure needs to be carefully handled anyways, and this would only be useful for the process of reading the data and writing the data post erasure.If anyone else has an alternative concept for how the info segment should be dealt with, please chime in. I am currently just using a raw address in my code, but I think that a more robust solution would use the linker since then it should be possible to have the size of the data placed into the segment be limited at link time and then the user wont need to worry about the underlying address (except when erasing, which they have to do anyways).
The text was updated successfully, but these errors were encountered: