Skip to content

Commit dd12a6a

Browse files
committed
Auto merge of #61 - japaric:cm7-r0p1, r=japaric
add a Cargo feature, cm7-r0p1, to fix a Cortex-M7 BASEPRI erratum closes #53 alternative solution to #54 depends on rust-embedded/cortex-m#72
2 parents 8a396c5 + f695bdb commit dd12a6a

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ rtfm-core = { git = "https://github.com/japaric/rtfm-core" }
2020
cortex-m-rtfm-macros = { path = "macros" }
2121

2222
[target.'cfg(target_arch = "x86_64")'.dev-dependencies]
23-
# compiletest_rs = "0.3.4"
24-
compiletest_rs = { git = "https://github.com/dwrensha/compiletest-rs", branch = "rustup" }
23+
compiletest_rs = "0.3.5"
2524

2625
[dev-dependencies.cortex-m-rt]
2726
features = ["abort-on-panic"]
@@ -32,5 +31,8 @@ features = ["rt"]
3231
git = "https://github.com/japaric/stm32f103xx"
3332
# version = "0.8.0"
3433

34+
[features]
35+
cm7-r0p1 = ["cortex-m/cm7-r0p1"]
36+
3537
[profile.release]
3638
lto = true

ci/script.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ main() {
77
return
88
fi
99

10-
xargo build --target $TARGET
10+
case $TARGET in
11+
thumbv7em-none-eabi*)
12+
xargo check --target $TARGET --features cm7-r0p1
13+
xargo check --target $TARGET --features cm7-r0p1 --examples
14+
;;
15+
esac
16+
17+
xargo check --target $TARGET
1118
xargo check --target $TARGET --examples
1219
}
1320

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
//!
5151
//! [here]: https://docs.rs/cortex-m-rtfm-macros/0.2.0/cortex_m_rtfm_macros/fn.app.html
5252
//!
53+
//! # Important: Cortex-M7 devices
54+
//!
55+
//! If targeting a Cortex-M7 device with revision r0p1 then you MUST enable the `cm7-r0p1` Cargo
56+
//! feature of this crate or the `Resource.claim` and `Resource.claim_mut` methods WILL misbehave.
57+
//!
5358
//! # Examples
5459
//!
5560
//! In increasing grade of complexity. See the [examples](./examples/index.html)

0 commit comments

Comments
 (0)