From 63036a9dc50e17a82ea140c8c5946f3ecdbf7b8f Mon Sep 17 00:00:00 2001 From: Anthony Rocha Date: Tue, 27 Oct 2026 11:49:57 -0700 Subject: [PATCH 1/3] targets: sleep in the bootstrap thread instead of spinning Target::main() ends in loop {} after codegen::start(). The kernel runs target::main() on its bootstrap thread, which has DEFAULT_PRIORITY, and app threads get DEFAULT_PRIORITY too unless the system config says otherwise. The scheduler round-robins threads of equal priority at every tick, so a spinning bootstrap thread takes a full time slice at each tick whenever an app thread is runnable, and a woken thread can wait behind it. Pigweed's own reference targets (pw_rp2350 ipc/user, clock/user) end main with loop { kernel::sleep_until(Arch, Instant::MAX) } instead. Apply the same to every target whose main() is just codegen::start(); loop {}: ast10x0 (10 targets), earlgrey (4) and veer (2). Targets whose main() does other work before looping (peripheral and kernel tests) are unchanged. Evidence: measured on the Caliptra VeeR FPGA (a downstream fork with more veer test targets): the 64 KiB PLDM firmware update went from 65.0 s to 49.0 s with the FD in its own process, and from 52.2 s to 37.3 s with the FD co-located, about 45 to 48 ms per chunk, and the scheduler tick was measured at 11.29 ms. NOT yet built or run for this branch; CI should decide. Known risk: in the downstream fork, with a sleeping bootstrap thread the veer ipc_runner_emulator_test hangs at "Testing object_set_peer_user_signal" (passes with the spinner), which looks like a latent wake-up problem the spinner masks. Expect target/veer/ipc/user to fail until that is understood; the ARM and earlgrey targets have not been tried. --- target/ast10x0/tests/interrupts/user/target.rs | 9 +++++++-- target/ast10x0/tests/ipc/user/target.rs | 9 +++++++-- target/ast10x0/tests/mctp/ipc_client/target.rs | 9 +++++++-- target/ast10x0/tests/orchestrator/runtime/target.rs | 9 +++++++-- target/ast10x0/tests/orchestrator/timer/target.rs | 9 +++++++-- target/ast10x0/tests/spdm/responder/target.rs | 9 +++++++-- target/ast10x0/tests/stress/ipc/user/target.rs | 9 +++++++-- .../tests/stress/process_termination/user/target.rs | 9 +++++++-- target/ast10x0/tests/usart/target.rs | 9 +++++++-- .../ast10x0/tests/util_ipc/async_transaction/target.rs | 9 +++++++-- target/earlgrey/syscall_latency/target.rs | 8 +++++++- target/earlgrey/tests/drivers/gpio/target.rs | 8 +++++++- target/earlgrey/tests/ipc/user/target.rs | 8 +++++++- target/earlgrey/tests/uart/target.rs | 8 +++++++- target/veer/ipc/user/target.rs | 8 +++++++- target/veer/syscall_latency/target.rs | 8 +++++++- 16 files changed, 112 insertions(+), 26 deletions(-) diff --git a/target/ast10x0/tests/interrupts/user/target.rs b/target/ast10x0/tests/interrupts/user/target.rs index ebf027e18..83f54fb7a 100644 --- a/target/ast10x0/tests/interrupts/user/target.rs +++ b/target/ast10x0/tests/interrupts/user/target.rs @@ -4,6 +4,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use console_backend::console_backend_write_all; use entry as _; use target_common::{declare_target, TargetInterface}; @@ -15,8 +16,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/ipc/user/target.rs b/target/ast10x0/tests/ipc/user/target.rs index 68b95716a..c1ba69aee 100644 --- a/target/ast10x0/tests/ipc/user/target.rs +++ b/target/ast10x0/tests/ipc/user/target.rs @@ -4,6 +4,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use console_backend::console_backend_write_all; use entry as _; use target_common::{declare_target, TargetInterface}; @@ -15,8 +16,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/mctp/ipc_client/target.rs b/target/ast10x0/tests/mctp/ipc_client/target.rs index 850303c4a..66ecd02f6 100644 --- a/target/ast10x0/tests/mctp/ipc_client/target.rs +++ b/target/ast10x0/tests/mctp/ipc_client/target.rs @@ -10,6 +10,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use console_backend::console_backend_write_all; use entry as _; use target_common::{declare_target, TargetInterface}; @@ -21,8 +22,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/orchestrator/runtime/target.rs b/target/ast10x0/tests/orchestrator/runtime/target.rs index 961db53ed..c96088b5e 100644 --- a/target/ast10x0/tests/orchestrator/runtime/target.rs +++ b/target/ast10x0/tests/orchestrator/runtime/target.rs @@ -4,6 +4,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use console_backend::console_backend_write_all; use entry as _; use target_common::{declare_target, TargetInterface}; @@ -15,8 +16,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/orchestrator/timer/target.rs b/target/ast10x0/tests/orchestrator/timer/target.rs index 12fd4720b..411bdb1a0 100644 --- a/target/ast10x0/tests/orchestrator/timer/target.rs +++ b/target/ast10x0/tests/orchestrator/timer/target.rs @@ -4,6 +4,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use console_backend::console_backend_write_all; use entry as _; use target_common::{declare_target, TargetInterface}; @@ -15,8 +16,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/spdm/responder/target.rs b/target/ast10x0/tests/spdm/responder/target.rs index b7b25c9e1..0d5b8c3a2 100644 --- a/target/ast10x0/tests/spdm/responder/target.rs +++ b/target/ast10x0/tests/spdm/responder/target.rs @@ -6,6 +6,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use console_backend::console_backend_write_all; use entry as _; use target_common::{declare_target, TargetInterface}; @@ -17,8 +18,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/stress/ipc/user/target.rs b/target/ast10x0/tests/stress/ipc/user/target.rs index fd56688f5..f67e46e3e 100644 --- a/target/ast10x0/tests/stress/ipc/user/target.rs +++ b/target/ast10x0/tests/stress/ipc/user/target.rs @@ -4,6 +4,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use console_backend::console_backend_write_all; use entry as _; use target_common::{declare_target, TargetInterface}; @@ -15,8 +16,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/stress/process_termination/user/target.rs b/target/ast10x0/tests/stress/process_termination/user/target.rs index 66657f16b..a733ff061 100644 --- a/target/ast10x0/tests/stress/process_termination/user/target.rs +++ b/target/ast10x0/tests/stress/process_termination/user/target.rs @@ -4,6 +4,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use console_backend::console_backend_write_all; use entry as _; use target_common::{declare_target, TargetInterface}; @@ -15,8 +16,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/usart/target.rs b/target/ast10x0/tests/usart/target.rs index 2ab9dc6be..14b9bda3d 100644 --- a/target/ast10x0/tests/usart/target.rs +++ b/target/ast10x0/tests/usart/target.rs @@ -9,6 +9,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use cortex_m_semihosting::debug::{exit, EXIT_FAILURE, EXIT_SUCCESS}; use target_common::{declare_target, TargetInterface}; use {console_backend as _, entry as _}; @@ -20,8 +21,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/util_ipc/async_transaction/target.rs b/target/ast10x0/tests/util_ipc/async_transaction/target.rs index 022a30193..6c82afb58 100644 --- a/target/ast10x0/tests/util_ipc/async_transaction/target.rs +++ b/target/ast10x0/tests/util_ipc/async_transaction/target.rs @@ -10,6 +10,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use console_backend::console_backend_write_all; use entry as _; use target_common::{declare_target, TargetInterface}; @@ -21,8 +22,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/earlgrey/syscall_latency/target.rs b/target/earlgrey/syscall_latency/target.rs index 0f76c1ab8..ce3f87c2f 100644 --- a/target/earlgrey/syscall_latency/target.rs +++ b/target/earlgrey/syscall_latency/target.rs @@ -3,6 +3,7 @@ #![no_std] #![no_main] +use arch_riscv::Arch; use target_common::{declare_target, TargetInterface}; use {console_backend as _, entry as _, kernel as _}; @@ -13,7 +14,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/earlgrey/tests/drivers/gpio/target.rs b/target/earlgrey/tests/drivers/gpio/target.rs index 36a559e20..39d864ec5 100644 --- a/target/earlgrey/tests/drivers/gpio/target.rs +++ b/target/earlgrey/tests/drivers/gpio/target.rs @@ -3,6 +3,7 @@ #![no_std] #![no_main] +use arch_riscv::Arch; use target_common::{declare_target, TargetInterface}; use {console_backend as _, entry as _}; @@ -13,7 +14,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } } diff --git a/target/earlgrey/tests/ipc/user/target.rs b/target/earlgrey/tests/ipc/user/target.rs index 44a18258d..0cc2c03ba 100644 --- a/target/earlgrey/tests/ipc/user/target.rs +++ b/target/earlgrey/tests/ipc/user/target.rs @@ -3,6 +3,7 @@ #![no_std] #![no_main] +use arch_riscv::Arch; use target_common::{declare_target, TargetInterface}; use {console_backend as _, entry as _}; @@ -13,7 +14,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/earlgrey/tests/uart/target.rs b/target/earlgrey/tests/uart/target.rs index 2e253d37f..6900744a7 100644 --- a/target/earlgrey/tests/uart/target.rs +++ b/target/earlgrey/tests/uart/target.rs @@ -3,6 +3,7 @@ #![no_std] #![no_main] +use arch_riscv::Arch; use target_common::{declare_target, TargetInterface}; use {console_backend as _, entry as _}; @@ -13,7 +14,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/veer/ipc/user/target.rs b/target/veer/ipc/user/target.rs index bf55cb397..62e1eb099 100644 --- a/target/veer/ipc/user/target.rs +++ b/target/veer/ipc/user/target.rs @@ -3,6 +3,7 @@ #![no_std] #![no_main] +use arch_riscv::Arch; use console_backend as _; use entry::exit; use target_common::{declare_target, TargetInterface}; @@ -14,7 +15,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/veer/syscall_latency/target.rs b/target/veer/syscall_latency/target.rs index 5f4ddbf1b..8d27029b3 100644 --- a/target/veer/syscall_latency/target.rs +++ b/target/veer/syscall_latency/target.rs @@ -3,6 +3,7 @@ #![no_std] #![no_main] +use arch_riscv::Arch; use entry::exit; use target_common::{declare_target, TargetInterface}; use {console_backend as _, kernel as _}; @@ -14,7 +15,12 @@ impl TargetInterface for Target { fn main() -> ! { codegen::start(); - loop {} + // The bootstrap thread has nothing left to do. Sleep rather than spin: a + // spinning thread at the same priority as the app threads takes a time + // slice at every scheduler tick and delays every wake-up behind it. + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { From f9377af8dedfdfa0647b7a54ee75780e03e1b465 Mon Sep 17 00:00:00 2001 From: JesseMelon Date: Tue, 27 Oct 2026 16:19:30 -0400 Subject: [PATCH 2/3] additional targets --- target/ast10x0/tests/mctp/server/target.rs | 4 +++- target/ast10x0/tests/peripherals/gpio/gpio_irq/target.rs | 5 +++-- .../ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/target.rs | 5 +++-- target/ast10x0/tests/peripherals/sgpiom/sgpiom_irq/target.rs | 5 +++-- target/ast10x0/tests/spdm/auth/target.rs | 4 +++- target/ast10x0/tests/spdm/vca/target.rs | 4 +++- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/target/ast10x0/tests/mctp/server/target.rs b/target/ast10x0/tests/mctp/server/target.rs index ed4f0348e..323d98e19 100644 --- a/target/ast10x0/tests/mctp/server/target.rs +++ b/target/ast10x0/tests/mctp/server/target.rs @@ -46,7 +46,9 @@ impl TargetInterface for Target { } codegen::start(); - loop {} + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/peripherals/gpio/gpio_irq/target.rs b/target/ast10x0/tests/peripherals/gpio/gpio_irq/target.rs index 09133de81..8bf9b79ec 100644 --- a/target/ast10x0/tests/peripherals/gpio/gpio_irq/target.rs +++ b/target/ast10x0/tests/peripherals/gpio/gpio_irq/target.rs @@ -24,8 +24,9 @@ impl TargetInterface for Target { } codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/target.rs b/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/target.rs index 60163ddd6..598ba7e84 100644 --- a/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/target.rs +++ b/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/target.rs @@ -37,8 +37,9 @@ impl TargetInterface for Target { } codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/peripherals/sgpiom/sgpiom_irq/target.rs b/target/ast10x0/tests/peripherals/sgpiom/sgpiom_irq/target.rs index 6524fdcf6..b9af8432e 100644 --- a/target/ast10x0/tests/peripherals/sgpiom/sgpiom_irq/target.rs +++ b/target/ast10x0/tests/peripherals/sgpiom/sgpiom_irq/target.rs @@ -33,8 +33,9 @@ impl TargetInterface for Target { } codegen::start(); - #[expect(clippy::empty_loop)] - loop {} + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/spdm/auth/target.rs b/target/ast10x0/tests/spdm/auth/target.rs index 42dd70db1..0b23c424f 100644 --- a/target/ast10x0/tests/spdm/auth/target.rs +++ b/target/ast10x0/tests/spdm/auth/target.rs @@ -46,7 +46,9 @@ impl TargetInterface for Target { } codegen::start(); - loop {} + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { diff --git a/target/ast10x0/tests/spdm/vca/target.rs b/target/ast10x0/tests/spdm/vca/target.rs index 665fd6556..661e649f3 100644 --- a/target/ast10x0/tests/spdm/vca/target.rs +++ b/target/ast10x0/tests/spdm/vca/target.rs @@ -46,7 +46,9 @@ impl TargetInterface for Target { } codegen::start(); - loop {} + loop { + let _ = kernel::sleep_until(Arch, kernel::Instant::MAX); + } } fn shutdown(code: u32) -> ! { From 860b832706156ce670a058cb0ad1469a648c2440 Mon Sep 17 00:00:00 2001 From: JesseMelon Date: Wed, 28 Oct 2026 11:59:16 -0400 Subject: [PATCH 3/3] targets: fix missing Arch import for bootstrap sleep --- target/ast10x0/tests/mctp/server/target.rs | 1 + target/ast10x0/tests/peripherals/gpio/gpio_irq/target.rs | 1 + target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/target.rs | 1 + target/ast10x0/tests/peripherals/sgpiom/sgpiom_irq/target.rs | 1 + target/ast10x0/tests/spdm/auth/target.rs | 1 + target/ast10x0/tests/spdm/vca/target.rs | 1 + 6 files changed, 6 insertions(+) diff --git a/target/ast10x0/tests/mctp/server/target.rs b/target/ast10x0/tests/mctp/server/target.rs index 323d98e19..cd3ad5fd9 100644 --- a/target/ast10x0/tests/mctp/server/target.rs +++ b/target/ast10x0/tests/mctp/server/target.rs @@ -4,6 +4,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use ast10x0_board::{Ast10x0Board, Ast10x0BoardDescriptor, I2cBusCfg}; use ast10x0_peripherals::i2c::{ClockConfig, I2cConfig, I2cSpeed, I2cXferMode}; use ast10x0_peripherals::scu::pinctrl; diff --git a/target/ast10x0/tests/peripherals/gpio/gpio_irq/target.rs b/target/ast10x0/tests/peripherals/gpio/gpio_irq/target.rs index 8bf9b79ec..cb8b234f4 100644 --- a/target/ast10x0/tests/peripherals/gpio/gpio_irq/target.rs +++ b/target/ast10x0/tests/peripherals/gpio/gpio_irq/target.rs @@ -6,6 +6,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use ast10x0_peripherals::scu::{pinctrl, ScuRegisters}; use console_backend::console_backend_write_all; use entry as _; diff --git a/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/target.rs b/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/target.rs index 598ba7e84..e4c1e5cef 100644 --- a/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/target.rs +++ b/target/ast10x0/tests/peripherals/i2c/i2c_slave_rx_ipc/target.rs @@ -4,6 +4,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use ast10x0_peripherals::i2c; use ast10x0_peripherals::scu::pinctrl; use console_backend::console_backend_write_all; diff --git a/target/ast10x0/tests/peripherals/sgpiom/sgpiom_irq/target.rs b/target/ast10x0/tests/peripherals/sgpiom/sgpiom_irq/target.rs index b9af8432e..7a491562e 100644 --- a/target/ast10x0/tests/peripherals/sgpiom/sgpiom_irq/target.rs +++ b/target/ast10x0/tests/peripherals/sgpiom/sgpiom_irq/target.rs @@ -15,6 +15,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use ast10x0_peripherals::scu::{pinctrl, ScuRegisters}; use console_backend::console_backend_write_all; use entry as _; diff --git a/target/ast10x0/tests/spdm/auth/target.rs b/target/ast10x0/tests/spdm/auth/target.rs index 0b23c424f..93a0c49b0 100644 --- a/target/ast10x0/tests/spdm/auth/target.rs +++ b/target/ast10x0/tests/spdm/auth/target.rs @@ -4,6 +4,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use ast10x0_board::{Ast10x0Board, Ast10x0BoardDescriptor, I2cBusCfg}; use ast10x0_peripherals::i2c::{ClockConfig, I2cConfig, I2cSpeed, I2cXferMode}; use ast10x0_peripherals::scu::pinctrl; diff --git a/target/ast10x0/tests/spdm/vca/target.rs b/target/ast10x0/tests/spdm/vca/target.rs index 661e649f3..f55a808e7 100644 --- a/target/ast10x0/tests/spdm/vca/target.rs +++ b/target/ast10x0/tests/spdm/vca/target.rs @@ -4,6 +4,7 @@ #![no_std] #![no_main] +use arch_arm_cortex_m::Arch; use ast10x0_board::{Ast10x0Board, Ast10x0BoardDescriptor, I2cBusCfg}; use ast10x0_peripherals::i2c::{ClockConfig, I2cConfig, I2cSpeed, I2cXferMode}; use ast10x0_peripherals::scu::pinctrl;