In RTIC, we run (effectively) the following test:
cargo test -p rtic --features thumbv7-backend --target host-tuple
in this setup, rtic uses basepri and basepri_max from cortex-m, i.e. it contains (effectively)
#[cfg(feature = "thumbv7-backend")]
use cortex_m::register::{basepri, basepri_max};
somewhere in the compiled code.
However, in the latest release, those two modules have (correctly) been feature gated to only exist for armv7m and armv8m_main. Adam Greig mentioned that compiling for non-cortex-m platforms was actually a goal, so I figured I'd open an issue to indicate that this doesn't really work directly.
The fix (as far as I can tell) is to change the #[cfg(any(armv7m, armv8m_main))] on those modules (and perhaps others?) to #[cfg(any(armv7m, armv8m_main, native))]. The actually-platform-dependent items within those modules are already feature gated the same way.
We can, of course, work around this with similar cfgs in RTIC, but I wanted to post this here in case cortex-m would be up for fixing it. I can absolutely create a PR, this issue is mostly for discussing whether we actually want this.
In RTIC, we run (effectively) the following test:
in this setup,
rticusesbasepriandbasepri_maxfromcortex-m, i.e. it contains (effectively)somewhere in the compiled code.
However, in the latest release, those two modules have (correctly) been feature gated to only exist for
armv7mandarmv8m_main. Adam Greig mentioned that compiling for non-cortex-mplatforms was actually a goal, so I figured I'd open an issue to indicate that this doesn't really work directly.The fix (as far as I can tell) is to change the
#[cfg(any(armv7m, armv8m_main))]on those modules (and perhaps others?) to#[cfg(any(armv7m, armv8m_main, native))]. The actually-platform-dependent items within those modules are already feature gated the same way.We can, of course, work around this with similar
cfgs in RTIC, but I wanted to post this here in case cortex-m would be up for fixing it. I can absolutely create a PR, this issue is mostly for discussing whether we actually want this.