aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.github/ci/test.sh3
-rw-r--r--embassy-rp/Cargo.toml11
-rw-r--r--embassy-rp/src/lib.rs6
3 files changed, 12 insertions, 8 deletions
diff --git a/.github/ci/test.sh b/.github/ci/test.sh
index 771251bd1..da0021684 100755
--- a/.github/ci/test.sh
+++ b/.github/ci/test.sh
@@ -21,7 +21,8 @@ cargo test --manifest-path ./embassy-boot/Cargo.toml --features ed25519-salty
21 21
22cargo test --manifest-path ./embassy-nrf/Cargo.toml --no-default-features --features nrf52840,time-driver-rtc1,gpiote 22cargo test --manifest-path ./embassy-nrf/Cargo.toml --no-default-features --features nrf52840,time-driver-rtc1,gpiote
23 23
24cargo test --manifest-path ./embassy-rp/Cargo.toml --no-default-features --features time-driver,rp2040 24cargo test --manifest-path ./embassy-rp/Cargo.toml --no-default-features --features time-driver,rp2040,_test
25cargo test --manifest-path ./embassy-rp/Cargo.toml --no-default-features --features time-driver,rp235xa,_test
25 26
26cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features stm32f429vg,exti,time-driver-any,exti 27cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features stm32f429vg,exti,time-driver-any,exti
27cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features stm32f732ze,exti,time-driver-any,exti 28cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features stm32f732ze,exti,time-driver-any,exti
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml
index 1ab6cf440..453f1aa0f 100644
--- a/embassy-rp/Cargo.toml
+++ b/embassy-rp/Cargo.toml
@@ -98,10 +98,13 @@ rp235xa = ["_rp235x"]
98## Configure the hal for use with the rp235xB 98## Configure the hal for use with the rp235xB
99rp235xb = ["_rp235x"] 99rp235xb = ["_rp235x"]
100 100
101# Add a binary-info header block containing picotool-compatible metadata. 101# hack around cortex-m peripherals being wrong when running tests.
102# 102_test = []
103# Takes up a little flash space, but picotool can then report the name of your 103
104# program and other details. 104## Add a binary-info header block containing picotool-compatible metadata.
105##
106## Takes up a little flash space, but picotool can then report the name of your
107## program and other details.
105binary-info = [ "rt" ] 108binary-info = [ "rt" ]
106 109
107[dependencies] 110[dependencies]
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs
index f968572b3..1fc397107 100644
--- a/embassy-rp/src/lib.rs
+++ b/embassy-rp/src/lib.rs
@@ -469,7 +469,7 @@ pub fn install_core0_stack_guard() -> Result<(), ()> {
469 unsafe { install_stack_guard(core::ptr::addr_of_mut!(_stack_end)) } 469 unsafe { install_stack_guard(core::ptr::addr_of_mut!(_stack_end)) }
470} 470}
471 471
472#[cfg(feature = "rp2040")] 472#[cfg(all(feature = "rp2040", not(feature = "_test")))]
473#[inline(always)] 473#[inline(always)]
474fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> { 474fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> {
475 let core = unsafe { cortex_m::Peripherals::steal() }; 475 let core = unsafe { cortex_m::Peripherals::steal() };
@@ -497,7 +497,7 @@ fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> {
497 Ok(()) 497 Ok(())
498} 498}
499 499
500#[cfg(all(feature = "_rp235x", not(test)))] 500#[cfg(all(feature = "_rp235x", not(feature = "_test")))]
501#[inline(always)] 501#[inline(always)]
502fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> { 502fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> {
503 let core = unsafe { cortex_m::Peripherals::steal() }; 503 let core = unsafe { cortex_m::Peripherals::steal() };
@@ -517,7 +517,7 @@ fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> {
517 517
518// This is to hack around cortex_m defaulting to ARMv7 when building tests, 518// This is to hack around cortex_m defaulting to ARMv7 when building tests,
519// so the compile fails when we try to use ARMv8 peripherals. 519// so the compile fails when we try to use ARMv8 peripherals.
520#[cfg(test)] 520#[cfg(feature = "_test")]
521#[inline(always)] 521#[inline(always)]
522fn install_stack_guard(_stack_bottom: *mut usize) -> Result<(), ()> { 522fn install_stack_guard(_stack_bottom: *mut usize) -> Result<(), ()> {
523 Ok(()) 523 Ok(())