diff options
| author | everdrone <[email protected]> | 2025-11-10 02:01:56 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-10 02:01:56 +0100 |
| commit | 5926690bfbd366beca13c8b5d0ab4b7a3519aa44 (patch) | |
| tree | 4b0df8b2b36c3324364e8aa49b4d8fea93cc485c /embassy-executor | |
| parent | e2807058ffc73bd0fc2f4ce9f29e5a56f3e5a18e (diff) | |
| parent | 4ef7f91663b51e2cfeb6ef40d907bfff90737de8 (diff) | |
Merge branch 'main' into stm32_sai_frame_length
Diffstat (limited to 'embassy-executor')
| -rw-r--r-- | embassy-executor/CHANGELOG.md | 3 | ||||
| -rw-r--r-- | embassy-executor/Cargo.toml | 11 | ||||
| -rw-r--r-- | embassy-executor/build.rs | 5 | ||||
| -rw-r--r-- | embassy-executor/src/arch/cortex_ar.rs | 7 | ||||
| -rw-r--r-- | embassy-executor/src/raw/trace.rs | 2 |
5 files changed, 21 insertions, 7 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 ecc4b6338..d3e5b241a 100644 --- a/embassy-executor/Cargo.toml +++ b/embassy-executor/Cargo.toml | |||
| @@ -30,6 +30,7 @@ build = [ | |||
| 30 | {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "embassy-time-driver", "scheduler-deadline"]}, | 30 | {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "embassy-time-driver", "scheduler-deadline"]}, |
| 31 | {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "scheduler-priority", "scheduler-deadline"]}, | 31 | {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "scheduler-priority", "scheduler-deadline"]}, |
| 32 | {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "scheduler-deadline"]}, | 32 | {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "scheduler-deadline"]}, |
| 33 | {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "embassy-time-driver", "scheduler-priority", "scheduler-deadline", "trace"]}, | ||
| 33 | {target = "thumbv7em-none-eabi", features = ["arch-spin"]}, | 34 | {target = "thumbv7em-none-eabi", features = ["arch-spin"]}, |
| 34 | {target = "thumbv7em-none-eabi", features = ["arch-spin", "scheduler-deadline"]}, | 35 | {target = "thumbv7em-none-eabi", features = ["arch-spin", "scheduler-deadline"]}, |
| 35 | {target = "armv7a-none-eabi", features = ["arch-cortex-ar", "executor-thread"]}, | 36 | {target = "armv7a-none-eabi", features = ["arch-cortex-ar", "executor-thread"]}, |
| @@ -37,6 +38,7 @@ build = [ | |||
| 37 | {target = "armv7r-none-eabihf", features = ["arch-cortex-ar", "executor-thread"]}, | 38 | {target = "armv7r-none-eabihf", features = ["arch-cortex-ar", "executor-thread"]}, |
| 38 | {target = "riscv32imac-unknown-none-elf", features = ["arch-riscv32"]}, | 39 | {target = "riscv32imac-unknown-none-elf", features = ["arch-riscv32"]}, |
| 39 | {target = "riscv32imac-unknown-none-elf", features = ["arch-riscv32", "executor-thread"]}, | 40 | {target = "riscv32imac-unknown-none-elf", features = ["arch-riscv32", "executor-thread"]}, |
| 41 | {target = "riscv32imac-unknown-none-elf", features = ["arch-riscv32", "executor-thread", "trace"]}, | ||
| 40 | # Nightly builds | 42 | # Nightly builds |
| 41 | {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly"]}, | 43 | {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly"]}, |
| 42 | {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly", "log"]}, | 44 | {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly", "log"]}, |
| @@ -100,7 +102,7 @@ portable-atomic = { version = "1.5", optional = true } | |||
| 100 | cortex-m = { version = "0.7.6", optional = true } | 102 | cortex-m = { version = "0.7.6", optional = true } |
| 101 | 103 | ||
| 102 | # arch-cortex-ar dependencies | 104 | # arch-cortex-ar dependencies |
| 103 | cortex-ar = { version = "0.3", optional = true } | 105 | aarch32-cpu = { version = "0.1", optional = true } |
| 104 | 106 | ||
| 105 | # arch-wasm dependencies | 107 | # arch-wasm dependencies |
| 106 | wasm-bindgen = { version = "0.2.82", optional = true } | 108 | wasm-bindgen = { version = "0.2.82", optional = true } |
| @@ -128,7 +130,7 @@ nightly = ["embassy-executor-macros/nightly"] | |||
| 128 | ## Enable defmt logging | 130 | ## Enable defmt logging |
| 129 | defmt = ["dep:defmt"] | 131 | defmt = ["dep:defmt"] |
| 130 | 132 | ||
| 131 | ## Enable log logging | 133 | ## Enable log logging |
| 132 | log = ["dep:log"] | 134 | log = ["dep:log"] |
| 133 | 135 | ||
| 134 | # 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 |
| @@ -143,7 +145,7 @@ arch-std = ["_arch"] | |||
| 143 | ## Cortex-M | 145 | ## Cortex-M |
| 144 | arch-cortex-m = ["_arch", "dep:cortex-m"] | 146 | arch-cortex-m = ["_arch", "dep:cortex-m"] |
| 145 | ## Cortex-A/R | 147 | ## Cortex-A/R |
| 146 | arch-cortex-ar = ["_arch", "dep:cortex-ar"] | 148 | arch-cortex-ar = ["_arch", "dep:aarch32-cpu", "dep:arm-targets"] |
| 147 | ## RISC-V 32 | 149 | ## RISC-V 32 |
| 148 | arch-riscv32 = ["_arch"] | 150 | arch-riscv32 = ["_arch"] |
| 149 | ## WASM | 151 | ## WASM |
| @@ -180,3 +182,6 @@ scheduler-priority = [] | |||
| 180 | ## Enable the embassy_time_driver dependency. | 182 | ## Enable the embassy_time_driver dependency. |
| 181 | ## This can unlock extra APIs, for example for the `sheduler-deadline` | 183 | ## This can unlock extra APIs, for example for the `sheduler-deadline` |
| 182 | embassy-time-driver = ["dep:embassy-time-driver"] | 184 | embassy-time-driver = ["dep:embassy-time-driver"] |
| 185 | |||
| 186 | [build-dependencies] | ||
| 187 | arm-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; | |||
| 4 | fn main() { | 4 | fn 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")] | ||
| 2 | compile_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")] |
| 2 | compile_error!("`executor-interrupt` is not supported with `arch-cortex-ar`."); | 5 | compile_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}; |
diff --git a/embassy-executor/src/raw/trace.rs b/embassy-executor/src/raw/trace.rs index 74519b927..830162039 100644 --- a/embassy-executor/src/raw/trace.rs +++ b/embassy-executor/src/raw/trace.rs | |||
| @@ -169,7 +169,7 @@ impl TaskTracker { | |||
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | #[cfg(feature = "trace")] | 171 | #[cfg(feature = "trace")] |
| 172 | extern "Rust" { | 172 | unsafe extern "Rust" { |
| 173 | /// This callback is called when the executor begins polling. This will always | 173 | /// This callback is called when the executor begins polling. This will always |
| 174 | /// be paired with a later call to `_embassy_trace_executor_idle`. | 174 | /// be paired with a later call to `_embassy_trace_executor_idle`. |
| 175 | /// | 175 | /// |
