From b2b39ab6e621bfdd9227d4ae31082ba7e2352ca1 Mon Sep 17 00:00:00 2001 From: onsdagens Date: Thu, 28 Sep 2023 00:30:01 +0200 Subject: [PATCH] remove nop from the empty idle loop remove nop from the empty idle loop --- rtic-macros/src/codegen/main.rs | 1 - rtic/src/export/cortex_basepri.rs | 1 - rtic/src/export/cortex_source_mask.rs | 1 - rtic/src/export/riscv_esp32c3.rs | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/rtic-macros/src/codegen/main.rs b/rtic-macros/src/codegen/main.rs index 2775d259cf..3848ab0be6 100644 --- a/rtic-macros/src/codegen/main.rs +++ b/rtic-macros/src/codegen/main.rs @@ -20,7 +20,6 @@ pub fn codegen(app: &App, analysis: &Analysis) -> TokenStream2 { quote!(#dispatcher();) } else { quote!(loop { - rtic::export::nop() }) }; diff --git a/rtic/src/export/cortex_basepri.rs b/rtic/src/export/cortex_basepri.rs index 0eb4eb66c4..e40ece4f3f 100644 --- a/rtic/src/export/cortex_basepri.rs +++ b/rtic/src/export/cortex_basepri.rs @@ -1,7 +1,6 @@ use super::cortex_logical2hw; use cortex_m::register::basepri; pub use cortex_m::{ - asm::nop, asm::wfi, interrupt, peripheral::{scb::SystemHandler, DWT, NVIC, SCB, SYST}, diff --git a/rtic/src/export/cortex_source_mask.rs b/rtic/src/export/cortex_source_mask.rs index 783be483f0..22a9201e52 100644 --- a/rtic/src/export/cortex_source_mask.rs +++ b/rtic/src/export/cortex_source_mask.rs @@ -1,5 +1,4 @@ pub use cortex_m::{ - asm::nop, asm::wfi, interrupt, peripheral::{scb::SystemHandler, DWT, NVIC, SCB, SYST}, diff --git a/rtic/src/export/riscv_esp32c3.rs b/rtic/src/export/riscv_esp32c3.rs index bd4324536c..f093672cf1 100644 --- a/rtic/src/export/riscv_esp32c3.rs +++ b/rtic/src/export/riscv_esp32c3.rs @@ -1,6 +1,6 @@ use esp32c3::INTERRUPT_CORE0; //priority threshold control pub use esp32c3::{Interrupt, Peripherals}; -pub use riscv::{asm::nop, interrupt, register::mcause}; //low level interrupt enable/disable +pub use riscv::{interrupt, register::mcause}; //low level interrupt enable/disable #[cfg(all(feature = "riscv-esp32c3", not(feature = "riscv-esp32c3-backend")))] compile_error!("Building for the esp32c3, but 'riscv-esp32c3-backend not selected'");