I'm adding flip-link-like functionality to a project using a Cortex-M33, so I plan to set MSPLIM to the end of statically
allocated RAM. I checked the cortex-m-rt crate for available public symbols to set MSPLIM, and I want to set it to __euninit, which is where the stack and statically allocated memory collide. However, there isn't a public symbol for this. Moreover, double-underscore symbols are private as stated here:
To me it seems that either one adds a feature like set-msplim to cortex-m to extend cortex_m::register::msplim with a method that uses the internal symbol from cortex-m-rt, or add a public symbol in cortex-m-rt to indicate "end of statically allocated memory" so users can setup MSPLIM themselves in pre_init.
Right now I'll do the following, but it is technically allowed to break in any patch release (even if we don't do that in practice):
Hi all,
I'm adding
flip-link
-like functionality to a project using a Cortex-M33, so I plan to set MSPLIM to the end of statically allocated RAM. I checked thecortex-m-rt
crate for available public symbols to set MSPLIM, and I want to set it to__euninit
, which is where the stack and statically allocated memory collide. However, there isn't a public symbol for this. Moreover, double-underscore symbols are private as stated here:https://github.com/rust-embedded/cortex-m/blob/6a324a830fd3040181d18ce59ae05bd44e4759a6/cortex-m-rt/link.x.in#L3-L7
What would be the best course of action here?
To me it seems that either one adds a feature like
set-msplim
tocortex-m
to extendcortex_m::register::msplim
with a method that uses the internal symbol fromcortex-m-rt
, or add a public symbol incortex-m-rt
to indicate "end of statically allocated memory" so users can setup MSPLIM themselves inpre_init
.Right now I'll do the following, but it is technically allowed to break in any patch release (even if we don't do that in practice):