Merge branch 'master' into mod_const

This commit is contained in:
Henrik Tjäder 2020-10-02 11:36:28 +02:00 committed by GitHub
commit 1e46ffdfbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 18 deletions

View file

@ -60,6 +60,7 @@ cortex-m-rtic-macros = { path = "macros", version = "0.5.2" }
rtic-core = "0.3.0" rtic-core = "0.3.0"
cortex-m-rt = "0.6.9" cortex-m-rt = "0.6.9"
heapless = "0.5.0" heapless = "0.5.0"
bare-metal = "1.0.0"
[build-dependencies] [build-dependencies]
version_check = "0.9" version_check = "0.9"

View file

@ -21,5 +21,3 @@
- [Ceiling analysis](./internals/ceilings.md) - [Ceiling analysis](./internals/ceilings.md)
- [Software tasks](./internals/tasks.md) - [Software tasks](./internals/tasks.md)
- [Timer queue](./internals/timer-queue.md) - [Timer queue](./internals/timer-queue.md)
- [Homogeneous multi-core support](./homogeneous.md)
- [Heterogeneous multi-core support](./heterogeneous.md)

View file

@ -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**

View file

@ -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**

View file

@ -47,6 +47,14 @@ pub fn codegen(ctxt: Context, resources_tick: bool, app: &App, extra: &Extra) ->
values.push(quote!(device: #device::Peripherals::steal())); 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)); values.push(quote!(core));
} }

View file

@ -4,6 +4,7 @@ use core::{
}; };
pub use crate::tq::{NotReady, TimerQueue}; pub use crate::tq::{NotReady, TimerQueue};
pub use bare_metal::CriticalSection;
#[cfg(armv7m)] #[cfg(armv7m)]
pub use cortex_m::register::basepri; pub use cortex_m::register::basepri;
pub use cortex_m::{ pub use cortex_m::{
@ -15,8 +16,6 @@ pub use cortex_m::{
use heapless::spsc::SingleCore; use heapless::spsc::SingleCore;
pub use heapless::{consts, i::Queue as iQueue, spsc::Queue}; pub use heapless::{consts, i::Queue as iQueue, spsc::Queue};
pub use heapless::{i::BinaryHeap as iBinaryHeap, BinaryHeap}; 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 SCFQ<N> = Queue<u8, N, u8, SingleCore>;
pub type SCRQ<T, N> = Queue<(T, u8), N, u8, SingleCore>; pub type SCRQ<T, N> = Queue<(T, u8), N, u8, SingleCore>;

View file

@ -34,8 +34,8 @@ error: duplicate lang item in crate `panic_halt` (which `$CRATE` depends on): `p
= note: first definition in `std` loaded from /usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-cf0f33af3a901778.rlib = note: first definition in `std` loaded from /usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-cf0f33af3a901778.rlib
= note: second definition in `panic_halt` loaded from $DIR/target/tests/target/x86_64-unknown-linux-gnu/debug/deps/libpanic_halt-ba6f0ab3439cbc7e.rmeta = note: second definition in `panic_halt` loaded from $DIR/target/tests/target/x86_64-unknown-linux-gnu/debug/deps/libpanic_halt-ba6f0ab3439cbc7e.rmeta
error: duplicate lang item in crate `panic_semihosting`: `panic_impl`. error: duplicate lang item in crate `panic_halt`: `panic_impl`.
| |
= note: the lang item is first defined in crate `panic_halt` (which `$CRATE` depends on) = note: the lang item is first defined in crate `panic_halt` (which `$CRATE` depends on)
= note: first definition in `panic_halt` loaded from $DIR/target/tests/target/x86_64-unknown-linux-gnu/debug/deps/libpanic_halt-ba6f0ab3439cbc7e.rmeta = note: first definition in `panic_halt` loaded from $DIR/target/tests/target/x86_64-unknown-linux-gnu/debug/deps/libpanic_halt-ba6f0ab3439cbc7e.rmeta
= note: second definition in `panic_semihosting` loaded from $DIR/target/tests/target/x86_64-unknown-linux-gnu/debug/deps/libpanic_semihosting-805015f4a2d05965.rmeta = note: second definition in `panic_semihosting` loaded from $DIR/target/tests/target/x86_64-unknown-linux-gnu/debug/deps/libpanic_semihosting-805015f4a2d05965.rmeta