diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d44da60..c4a4a2d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Deprecation + +- Deprecated incorrectly included registers (`BASPRI`, `BASEPRI_MAX`, `FAULTMASK`) on `thumbv8.base` + ## [v0.6.1] - 2019-08-21 ### Fixed diff --git a/build.rs b/build.rs index 3ca7ddf3..cf820cbf 100644 --- a/build.rs +++ b/build.rs @@ -29,6 +29,7 @@ fn main() { } else if target.starts_with("thumbv8m.base") { println!("cargo:rustc-cfg=cortex_m"); println!("cargo:rustc-cfg=armv8m"); + println!("cargo:rustc-cfg=armv8m_base"); } else if target.starts_with("thumbv8m.main") { println!("cargo:rustc-cfg=cortex_m"); println!("cargo:rustc-cfg=armv8m"); diff --git a/src/register/mod.rs b/src/register/mod.rs index 854d7256..e7879c5c 100644 --- a/src/register/mod.rs +++ b/src/register/mod.rs @@ -26,15 +26,36 @@ //! //! - Cortex-M* Devices Generic User Guide - Section 2.1.3 Core registers -#[cfg(not(armv6m))] +#[cfg(all(not(armv6m), not(armv8m_base)))] pub mod basepri; -#[cfg(not(armv6m))] +#[cfg(armv8m_base)] +#[deprecated( + since = "0.6.2", + note = "basepri is unavailable on thumbv8.base, and will be removed in the next release" +)] +pub mod basepri; + +#[cfg(all(not(armv6m), not(armv8m_base)))] +pub mod basepri_max; + +#[cfg(armv8m_base)] +#[deprecated( + since = "0.6.2", + note = "basepri is unavailable on thumbv8m.base, and will be removed in the next release" +)] pub mod basepri_max; pub mod control; -#[cfg(not(armv6m))] +#[cfg(all(not(armv6m), not(armv8m_base)))] +pub mod faultmask; + +#[cfg(armv8m_base)] +#[deprecated( + since = "0.6.2", + note = "faultmask is unavailable on thumbv8m.base, and will be removed in the next release" +)] pub mod faultmask; pub mod msp;