Incorrect usage of `cm7` feature
Almeida-Oco opened this issue · 0 comments
I believe in #352, the incorrect #[cfg(...)] was used for the cm7 feature. The cm7 feature was added but it doesn't actually activate anything because #[cfg(cm7)] instead of #[cfg(feature = "cm7")]
For example:
cortex-m/cortex-m/src/peripheral/mod.rs
Lines 95 to 98 in 549e951
This is fairly easy to workaround at the moment by simply defining the cfg either by:
println!("cargo:rustc-cfg=cm7")- in the build.rs script
rustflags = [ "--cfg", "cm7"]- in Cargo config.toml
Maybe this behavior was changed in some Rust version and I'm not aware of it, but at least for me with the "rustc 1.78.0-nightly (f4b771bf1 2024-03-14)" version its how I described and by activating the cm7 feature it fails to compile when trying to access the AC field or module.
Fix is very simply, just replacing #[cfg(cm7)] -> #[cfg(feature = "cm7")], I can open PR for it, would just need to figure out what's the PR process here :)