aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-executor/CHANGELOG.md3
-rw-r--r--embassy-executor/Cargo.toml9
-rw-r--r--embassy-executor/build.rs5
-rw-r--r--embassy-executor/src/arch/cortex_ar.rs7
4 files changed, 18 insertions, 6 deletions
diff --git a/embassy-executor/CHANGELOG.md b/embassy-executor/CHANGELOG.md
index 47a8ae995..5fbb8cf13 100644
--- a/embassy-executor/CHANGELOG.md
+++ b/embassy-executor/CHANGELOG.md
@@ -13,7 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13- Upgraded rtos-trace 13- Upgraded rtos-trace
14- Added optional "highest priority" scheduling 14- Added optional "highest priority" scheduling
15- Added optional "earliest deadline first" EDF scheduling 15- Added optional "earliest deadline first" EDF scheduling
16- Bump `cortex-ar` to v0.3 16- Migrate `cortex-ar` to `aarch32-cpu`. The feature name `arch-cortex-ar` remains the same and
17 legacy ARM architectures are not supported.
17 18
18## 0.9.1 - 2025-08-31 19## 0.9.1 - 2025-08-31
19 20
diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml
index e500833c0..d3e5b241a 100644
--- a/embassy-executor/Cargo.toml
+++ b/embassy-executor/Cargo.toml
@@ -102,7 +102,7 @@ portable-atomic = { version = "1.5", optional = true }
102cortex-m = { version = "0.7.6", optional = true } 102cortex-m = { version = "0.7.6", optional = true }
103 103
104# arch-cortex-ar dependencies 104# arch-cortex-ar dependencies
105cortex-ar = { version = "0.3", optional = true } 105aarch32-cpu = { version = "0.1", optional = true }
106 106
107# arch-wasm dependencies 107# arch-wasm dependencies
108wasm-bindgen = { version = "0.2.82", optional = true } 108wasm-bindgen = { version = "0.2.82", optional = true }
@@ -130,7 +130,7 @@ nightly = ["embassy-executor-macros/nightly"]
130## Enable defmt logging 130## Enable defmt logging
131defmt = ["dep:defmt"] 131defmt = ["dep:defmt"]
132 132
133## Enable log logging 133## Enable log logging
134log = ["dep:log"] 134log = ["dep:log"]
135 135
136# Enables turbo wakers, which requires patching core. Not surfaced in the docs by default due to 136# Enables turbo wakers, which requires patching core. Not surfaced in the docs by default due to
@@ -145,7 +145,7 @@ arch-std = ["_arch"]
145## Cortex-M 145## Cortex-M
146arch-cortex-m = ["_arch", "dep:cortex-m"] 146arch-cortex-m = ["_arch", "dep:cortex-m"]
147## Cortex-A/R 147## Cortex-A/R
148arch-cortex-ar = ["_arch", "dep:cortex-ar"] 148arch-cortex-ar = ["_arch", "dep:aarch32-cpu", "dep:arm-targets"]
149## RISC-V 32 149## RISC-V 32
150arch-riscv32 = ["_arch"] 150arch-riscv32 = ["_arch"]
151## WASM 151## WASM
@@ -182,3 +182,6 @@ scheduler-priority = []
182## Enable the embassy_time_driver dependency. 182## Enable the embassy_time_driver dependency.
183## This can unlock extra APIs, for example for the `sheduler-deadline` 183## This can unlock extra APIs, for example for the `sheduler-deadline`
184embassy-time-driver = ["dep:embassy-time-driver"] 184embassy-time-driver = ["dep:embassy-time-driver"]
185
186[build-dependencies]
187arm-targets = { version = "0.4", optional = true }
diff --git a/embassy-executor/build.rs b/embassy-executor/build.rs
index 37becde3e..36e23a632 100644
--- a/embassy-executor/build.rs
+++ b/embassy-executor/build.rs
@@ -4,4 +4,9 @@ mod common;
4fn main() { 4fn main() {
5 let mut rustc_cfgs = common::CfgSet::new(); 5 let mut rustc_cfgs = common::CfgSet::new();
6 common::set_target_cfgs(&mut rustc_cfgs); 6 common::set_target_cfgs(&mut rustc_cfgs);
7
8 // This is used to exclude legacy architecture support. The raw executor needs to be used for
9 // those architectures because SEV/WFE are not supported.
10 #[cfg(feature = "arch-cortex-ar")]
11 arm_targets::process();
7} 12}
diff --git a/embassy-executor/src/arch/cortex_ar.rs b/embassy-executor/src/arch/cortex_ar.rs
index a9be3d323..ce572738a 100644
--- a/embassy-executor/src/arch/cortex_ar.rs
+++ b/embassy-executor/src/arch/cortex_ar.rs
@@ -1,3 +1,6 @@
1#[cfg(arm_profile = "legacy")]
2compile_error!("`arch-cortex-ar` does not support the legacy ARM profile, WFE/SEV are not available.");
3
1#[cfg(feature = "executor-interrupt")] 4#[cfg(feature = "executor-interrupt")]
2compile_error!("`executor-interrupt` is not supported with `arch-cortex-ar`."); 5compile_error!("`executor-interrupt` is not supported with `arch-cortex-ar`.");
3 6
@@ -10,7 +13,7 @@ fn __pender(context: *mut ()) {
10 #[cfg(feature = "executor-thread")] 13 #[cfg(feature = "executor-thread")]
11 // Try to make Rust optimize the branching away if we only use thread mode. 14 // Try to make Rust optimize the branching away if we only use thread mode.
12 if !cfg!(feature = "executor-interrupt") || context == THREAD_PENDER { 15 if !cfg!(feature = "executor-interrupt") || context == THREAD_PENDER {
13 cortex_ar::asm::sev(); 16 aarch32_cpu::asm::sev();
14 return; 17 return;
15 } 18 }
16} 19}
@@ -23,7 +26,7 @@ mod thread {
23 26
24 use core::marker::PhantomData; 27 use core::marker::PhantomData;
25 28
26 use cortex_ar::asm::wfe; 29 use aarch32_cpu::asm::wfe;
27 pub use embassy_executor_macros::main_cortex_ar as main; 30 pub use embassy_executor_macros::main_cortex_ar as main;
28 31
29 use crate::{Spawner, raw}; 32 use crate::{Spawner, raw};