Skip to content

Commit ec6c7ef

Browse files
committed
Document compatibility of the cm7-r0p1 feature.
The `cm7-r0p1` feature only works with the plateform feature `armv7em`. I added a compile error to help someone figure that out more redily if they accidentally combine those features.
1 parent 78fc04a commit ec6c7ef

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cortex-m/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@
9494
// Don't warn about feature(asm) being stable on Rust >= 1.59.0
9595
#![allow(stable_features)]
9696

97+
#[cfg(all(feature = "cm7-r0p1", not(armv7em)))]
98+
compile_error!("The feature \"cm7-r0p1\" is only compatible with the armv7em target");
99+
97100
extern crate bare_metal;
98101
extern crate volatile_register;
99102

0 commit comments

Comments
 (0)