diff --git a/rtic/Cargo.toml b/rtic/Cargo.toml index e73b970de9..ccda992e6c 100644 --- a/rtic/Cargo.toml +++ b/rtic/Cargo.toml @@ -74,6 +74,7 @@ thumbv8main-backend = ["rtic-macros/cortex-m-basepri"] # riscv-esp32c3-backend = ["rtic-macros/riscv-esp32c3"] # needed for testing +rtic-uitest = ["thumbv7-backend","rtic-macros/cortex-m-basepri"] test-critical-section = ["cortex-m/critical-section-single-core", "rtic-monotonics/systick-100hz"] # [[example]] diff --git a/rtic/src/export.rs b/rtic/src/export.rs index 6fc97add3e..86e9c3a875 100644 --- a/rtic/src/export.rs +++ b/rtic/src/export.rs @@ -20,10 +20,10 @@ compile_error!( "Building for Cortex-M with source masking, but 'thumbv6-backend' or 'thumbv8base-backend' backend not selected" ); -#[cfg(any(feature = "cortex-m-basepri"))] +#[cfg(any(feature = "cortex-m-basepri", feature = "rtic-uitest"))] pub use cortex_basepri::*; -#[cfg(any(feature = "cortex-m-basepri"))] +#[cfg(any(feature = "cortex-m-basepri", feature = "rtic-uitest"))] mod cortex_basepri; #[cfg(feature = "cortex-m-source-masking")] @@ -33,7 +33,11 @@ pub use cortex_source_mask::*; mod cortex_source_mask; /// Priority conversion, takes logical priorities 1..=N and converts it to NVIC priority. -#[cfg(any(feature = "cortex-m-basepri", feature = "cortex-m-source-masking",))] +#[cfg(any( + feature = "cortex-m-basepri", + feature = "cortex-m-source-masking", + feature = "rtic-uitest", +))] #[inline] #[must_use] pub const fn cortex_logical2hw(logical: u8, nvic_prio_bits: u8) -> u8 { diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index 1fc06c1f8b..aef5e3ab59 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -38,9 +38,10 @@ impl TestMetadata { match package { Package::Rtic => { let features = Some(format!( - "{},{}", + "{},{},{}", DEFAULT_FEATURES, backend.to_rtic_feature(), + "rtic-uitest" )); CargoCommand::Test { package: Some(package),