diff options
-rw-r--r-- | Cargo.toml | 1 | ||||
-rw-r--r-- | book/en/src/SUMMARY.md | 2 | ||||
-rw-r--r-- | book/en/src/heterogeneous.md | 6 | ||||
-rw-r--r-- | book/en/src/homogeneous.md | 6 | ||||
-rw-r--r-- | macros/src/codegen/module.rs | 8 | ||||
-rw-r--r-- | src/export.rs | 3 | ||||
-rw-r--r-- | ui/single/locals-cfg.stderr | 6 |
7 files changed, 13 insertions, 19 deletions
@@ -60,6 +60,7 @@ cortex-m-rtic-macros = { path = "macros", version = "0.5.2" } rtic-core = "0.3.0" cortex-m-rt = "0.6.9" heapless = "0.5.0" +bare-metal = "1.0.0" [build-dependencies] version_check = "0.9" diff --git a/book/en/src/SUMMARY.md b/book/en/src/SUMMARY.md index 25aef811..a573cbb5 100644 --- a/book/en/src/SUMMARY.md +++ b/book/en/src/SUMMARY.md @@ -21,5 +21,3 @@ - [Ceiling analysis](./internals/ceilings.md) - [Software tasks](./internals/tasks.md) - [Timer queue](./internals/timer-queue.md) -- [Homogeneous multi-core support](./homogeneous.md) -- [Heterogeneous multi-core support](./heterogeneous.md) diff --git a/book/en/src/heterogeneous.md b/book/en/src/heterogeneous.md deleted file mode 100644 index d2c3d6c5..00000000 --- a/book/en/src/heterogeneous.md +++ /dev/null @@ -1,6 +0,0 @@ -# Heterogeneous multi-core support - -This section covers the *experimental* heterogeneous multi-core support provided -by RTIC behind the `heterogeneous` Cargo feature. - -**Content coming soon** diff --git a/book/en/src/homogeneous.md b/book/en/src/homogeneous.md deleted file mode 100644 index bcf6d2be..00000000 --- a/book/en/src/homogeneous.md +++ /dev/null @@ -1,6 +0,0 @@ -# Homogeneous multi-core support - -This section covers the *experimental* homogeneous multi-core support provided -by RTIC behind the `homogeneous` Cargo feature. - -**Content coming soon** diff --git a/macros/src/codegen/module.rs b/macros/src/codegen/module.rs index 863f6c5b..359c1cce 100644 --- a/macros/src/codegen/module.rs +++ b/macros/src/codegen/module.rs @@ -47,6 +47,14 @@ pub fn codegen(ctxt: Context, resources_tick: bool, app: &App, extra: &Extra) -> values.push(quote!(device: #device::Peripherals::steal())); } + lt = Some(quote!('a)); + fields.push(quote!( + /// Critical section token for init + pub cs: rtic::export::CriticalSection<#lt> + )); + + values.push(quote!(cs: rtic::export::CriticalSection::new())); + values.push(quote!(core)); } diff --git a/src/export.rs b/src/export.rs index 8a5d4e3e..27f7f5fb 100644 --- a/src/export.rs +++ b/src/export.rs @@ -4,6 +4,7 @@ use core::{ }; pub use crate::tq::{NotReady, TimerQueue}; +pub use bare_metal::CriticalSection; #[cfg(armv7m)] pub use cortex_m::register::basepri; pub use cortex_m::{ @@ -15,8 +16,6 @@ pub use cortex_m::{ use heapless::spsc::SingleCore; pub use heapless::{consts, i::Queue as iQueue, spsc::Queue}; pub use heapless::{i::BinaryHeap as iBinaryHeap, BinaryHeap}; -#[cfg(feature = "heterogeneous")] -pub use microamp::shared; pub type SCFQ<N> = Queue<u8, N, u8, SingleCore>; pub type SCRQ<T, N> = Queue<(T, u8), N, u8, SingleCore>; diff --git a/ui/single/locals-cfg.stderr b/ui/single/locals-cfg.stderr index bb558fa6..49695cbf 100644 --- a/ui/single/locals-cfg.stderr +++ b/ui/single/locals-cfg.stderr @@ -28,10 +28,10 @@ error[E0425]: cannot find value `FOO` in this scope 44 | FOO; | ^^^ not found in this scope -error: duplicate lang item in crate `panic_halt`: `panic_impl`. +error: duplicate lang item in crate `panic_semihosting`: `panic_impl`. | = note: first defined in crate `std`. -error: duplicate lang item in crate `panic_semihosting`: `panic_impl`. +error: duplicate lang item in crate `panic_halt`: `panic_impl`. | - = note: first defined in crate `panic_halt`. + = note: first defined in crate `panic_semihosting`. |