diff --git a/examples/esp32c3/Cargo.lock b/examples/esp32c3/Cargo.lock index 6297c40ced..35d467e457 100644 --- a/examples/esp32c3/Cargo.lock +++ b/examples/esp32c3/Cargo.lock @@ -17,15 +17,6 @@ version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -611,10 +602,10 @@ dependencies = [ name = "rtic" version = "2.1.1" dependencies = [ - "atomic-polyfill", "bare-metal", "critical-section", "esp32c3 0.22.0", + "portable-atomic", "riscv", "rtic-core", "rtic-macros", diff --git a/examples/hifive1/Cargo.lock b/examples/hifive1/Cargo.lock index 6fcc78644c..76374dcb48 100644 --- a/examples/hifive1/Cargo.lock +++ b/examples/hifive1/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", -] - [[package]] name = "bare-metal" version = "1.0.0" @@ -268,9 +259,9 @@ dependencies = [ name = "rtic" version = "2.1.1" dependencies = [ - "atomic-polyfill", "bare-metal", "critical-section", + "portable-atomic", "riscv", "riscv-slic", "rtic-core", diff --git a/examples/lm3s6965/Cargo.lock b/examples/lm3s6965/Cargo.lock index 848a06ff5a..d7537dcafd 100644 --- a/examples/lm3s6965/Cargo.lock +++ b/examples/lm3s6965/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", -] - [[package]] name = "bare-metal" version = "0.2.5" @@ -309,6 +300,9 @@ name = "portable-atomic" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +dependencies = [ + "critical-section", +] [[package]] name = "proc-macro-error" @@ -356,10 +350,10 @@ dependencies = [ name = "rtic" version = "2.1.1" dependencies = [ - "atomic-polyfill", "bare-metal 1.0.0", "cortex-m", "critical-section", + "portable-atomic", "rtic-core", "rtic-macros", ] @@ -393,10 +387,10 @@ dependencies = [ name = "rtic-monotonics" version = "2.0.0" dependencies = [ - "atomic-polyfill", "cfg-if", "cortex-m", "fugit", + "portable-atomic", "rtic-time", ] diff --git a/examples/lm3s6965/Cargo.toml b/examples/lm3s6965/Cargo.toml index bfa4b29cbe..5e2cc5034d 100644 --- a/examples/lm3s6965/Cargo.toml +++ b/examples/lm3s6965/Cargo.toml @@ -30,7 +30,10 @@ features = ["exit"] version = "0.6.0" [features] -test-critical-section = ["rtic/test-critical-section"] +test-critical-section = [ + "rtic/test-critical-section", + "cortex-m/critical-section-single-core", +] thumbv6-backend = ["rtic/thumbv6-backend"] thumbv7-backend = ["rtic/thumbv7-backend"] thumbv8base-backend = ["rtic/thumbv8base-backend"] diff --git a/examples/nrf52840_blinky/Cargo.lock b/examples/nrf52840_blinky/Cargo.lock index ec5f4f9f10..03655d70fa 100644 --- a/examples/nrf52840_blinky/Cargo.lock +++ b/examples/nrf52840_blinky/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", -] - [[package]] name = "az" version = "1.2.1" @@ -391,9 +382,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "portable-atomic" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] name = "proc-macro-error" @@ -445,12 +436,12 @@ checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" [[package]] name = "rtic" -version = "2.0.1" +version = "2.1.1" dependencies = [ - "atomic-polyfill", "bare-metal 1.0.0", "cortex-m", "critical-section", + "portable-atomic", "rtic-core", "rtic-macros", ] @@ -471,7 +462,7 @@ checksum = "d9369355b04d06a3780ec0f51ea2d225624db777acbc60abd8ca4832da5c1a42" [[package]] name = "rtic-macros" -version = "2.0.1" +version = "2.1.0" dependencies = [ "indexmap", "proc-macro-error", @@ -484,13 +475,12 @@ dependencies = [ name = "rtic-monotonics" version = "2.0.0" dependencies = [ - "atomic-polyfill", "cfg-if", "cortex-m", "critical-section", - "embedded-hal 1.0.0", "fugit", "nrf52840-pac", + "portable-atomic", "rtic-time", ] diff --git a/examples/rp2040_local_i2c_init/Cargo.lock b/examples/rp2040_local_i2c_init/Cargo.lock index 66666f85f8..38df88d2de 100644 --- a/examples/rp2040_local_i2c_init/Cargo.lock +++ b/examples/rp2040_local_i2c_init/Cargo.lock @@ -8,15 +8,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "atomic-polyfill" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c314e70d181aa6053b26e3f7fbf86d1dfff84f816a6175b967666b3506ef7289" -dependencies = [ - "critical-section", -] - [[package]] name = "bare-metal" version = "0.2.5" @@ -371,6 +362,9 @@ name = "portable-atomic" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +dependencies = [ + "critical-section", +] [[package]] name = "proc-macro-error" @@ -503,6 +497,7 @@ dependencies = [ "embedded-hal 0.2.7", "fugit", "panic-probe", + "portable-atomic", "rp-pico", "rtic", "rtic-monotonics", @@ -512,10 +507,10 @@ dependencies = [ name = "rtic" version = "2.1.1" dependencies = [ - "atomic-polyfill", "bare-metal 1.0.0", "cortex-m", "critical-section", + "portable-atomic", "rtic-core", "rtic-macros", ] @@ -549,10 +544,10 @@ dependencies = [ name = "rtic-monotonics" version = "2.0.0" dependencies = [ - "atomic-polyfill", "cfg-if", "cortex-m", "fugit", + "portable-atomic", "rp2040-pac", "rtic-time", ] diff --git a/examples/rp2040_local_i2c_init/Cargo.toml b/examples/rp2040_local_i2c_init/Cargo.toml index 2f893dc47d..986977d077 100644 --- a/examples/rp2040_local_i2c_init/Cargo.toml +++ b/examples/rp2040_local_i2c_init/Cargo.toml @@ -24,6 +24,7 @@ embedded-hal = { version = "0.2.7", features = ["unproven"] } fugit = "0.3" rp-pico = "0.9.0" panic-probe = "0.3" +portable-atomic = { version = "1", features = ["critical-section"] } [profile.dev] opt-level = 1 diff --git a/examples/stm32f3_blinky/Cargo.lock b/examples/stm32f3_blinky/Cargo.lock index 527d4eb0ab..d2ed4a8370 100644 --- a/examples/stm32f3_blinky/Cargo.lock +++ b/examples/stm32f3_blinky/Cargo.lock @@ -8,15 +8,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" -[[package]] -name = "atomic-polyfill" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c314e70d181aa6053b26e3f7fbf86d1dfff84f816a6175b967666b3506ef7289" -dependencies = [ - "critical-section", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -453,12 +444,12 @@ dependencies = [ [[package]] name = "rtic" -version = "2.0.1" +version = "2.1.1" dependencies = [ - "atomic-polyfill", "bare-metal 1.0.0", "cortex-m", "critical-section", + "portable-atomic", "rtic-core", "rtic-macros", ] @@ -479,7 +470,7 @@ checksum = "d9369355b04d06a3780ec0f51ea2d225624db777acbc60abd8ca4832da5c1a42" [[package]] name = "rtic-macros" -version = "2.0.1" +version = "2.1.0" dependencies = [ "indexmap", "proc-macro-error", @@ -492,11 +483,10 @@ dependencies = [ name = "rtic-monotonics" version = "2.0.0" dependencies = [ - "atomic-polyfill", "cfg-if", "cortex-m", - "embedded-hal 1.0.0", "fugit", + "portable-atomic", "rtic-time", ] diff --git a/examples/stm32g030f6_periodic_prints/Cargo.lock b/examples/stm32g030f6_periodic_prints/Cargo.lock index 65dbf61f02..11bd8c2586 100644 --- a/examples/stm32g030f6_periodic_prints/Cargo.lock +++ b/examples/stm32g030f6_periodic_prints/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", -] - [[package]] name = "bare-metal" version = "0.2.5" @@ -298,12 +289,12 @@ dependencies = [ [[package]] name = "rtic" -version = "2.0.1" +version = "2.1.1" dependencies = [ - "atomic-polyfill", "bare-metal 1.0.0", "cortex-m", "critical-section", + "portable-atomic", "rtic-core", "rtic-macros", ] @@ -324,7 +315,7 @@ checksum = "d9369355b04d06a3780ec0f51ea2d225624db777acbc60abd8ca4832da5c1a42" [[package]] name = "rtic-macros" -version = "2.0.1" +version = "2.1.0" dependencies = [ "indexmap", "proc-macro-error", @@ -337,11 +328,10 @@ dependencies = [ name = "rtic-monotonics" version = "2.0.0" dependencies = [ - "atomic-polyfill", "cfg-if", "cortex-m", - "embedded-hal 1.0.0", "fugit", + "portable-atomic", "proc-macro2", "quote", "rtic-time", @@ -415,6 +405,7 @@ dependencies = [ "defmt-rtt", "fugit", "panic-probe", + "portable-atomic", "rtic", "rtic-monotonics", "stm32g0xx-hal", diff --git a/examples/stm32g030f6_periodic_prints/Cargo.toml b/examples/stm32g030f6_periodic_prints/Cargo.toml index d8d8e352a2..4d79f1f7a9 100644 --- a/examples/stm32g030f6_periodic_prints/Cargo.toml +++ b/examples/stm32g030f6_periodic_prints/Cargo.toml @@ -25,6 +25,7 @@ defmt = "0.3.4" defmt-rtt = "0.4.0" fugit = "0.3.7" panic-probe = { version = "0.3.1", features = ["print-defmt"] } +portable-atomic = { version = "1", features = ["unsafe-assume-single-core"] } stm32g0xx-hal = { version = "0.2.0", features = ["rt", "stm32g030"] } diff --git a/examples/teensy4_blinky/Cargo.lock b/examples/teensy4_blinky/Cargo.lock index 8ae5b958c7..d00173af57 100644 --- a/examples/teensy4_blinky/Cargo.lock +++ b/examples/teensy4_blinky/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", -] - [[package]] name = "bare-metal" version = "0.2.5" @@ -109,7 +100,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.59", ] [[package]] @@ -133,17 +124,17 @@ dependencies = [ [[package]] name = "embedded-hal" -version = "1.0.0-rc.3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc402f79e1fd22731ca945b4f97b5ff37e7b3f379312595c42bb2e8811c29920" +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" [[package]] name = "embedded-hal-async" -version = "1.0.0-rc.3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fba2ef2ffb35d614acc6fb323ddf7facc45c069f24544d49ea54e5043626d" +checksum = "0c4c685bbef7fe13c3c6dd4da26841ed3980ef33e841cddfa15ce8a8fb3f1884" dependencies = [ - "embedded-hal 1.0.0-rc.3", + "embedded-hal 1.0.0", ] [[package]] @@ -358,9 +349,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "portable-atomic" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] name = "proc-macro-error" @@ -388,18 +379,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "a56dea16b0a29e94408b9aa5e2940a4eedbd128a1ba20e8f7ae60fd3d465af0e" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -412,12 +403,12 @@ checksum = "46b71a9d9206e8b46714c74255adcaea8b11e0350c1d8456165073c3f75fc81a" [[package]] name = "rtic" -version = "2.0.1" +version = "2.1.1" dependencies = [ - "atomic-polyfill", "bare-metal 1.0.0", "cortex-m", "critical-section", + "portable-atomic", "rtic-core", "rtic-macros", ] @@ -438,25 +429,24 @@ checksum = "d9369355b04d06a3780ec0f51ea2d225624db777acbc60abd8ca4832da5c1a42" [[package]] name = "rtic-macros" -version = "2.0.1" +version = "2.1.0" dependencies = [ "indexmap", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.59", ] [[package]] name = "rtic-monotonics" version = "2.0.0" dependencies = [ - "atomic-polyfill", "cfg-if", "cortex-m", - "embedded-hal 1.0.0-rc.3", "fugit", "imxrt-ral", + "portable-atomic", "rtic-time", ] @@ -465,7 +455,7 @@ name = "rtic-time" version = "2.0.0" dependencies = [ "critical-section", - "embedded-hal 1.0.0-rc.3", + "embedded-hal 1.0.0", "embedded-hal-async", "fugit", "futures-util", @@ -509,9 +499,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" dependencies = [ "proc-macro2", "quote", @@ -574,7 +564,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.59", ] [[package]] diff --git a/rtic-monotonics/CHANGELOG.md b/rtic-monotonics/CHANGELOG.md index 1a4211775e..3000f889b0 100644 --- a/rtic-monotonics/CHANGELOG.md +++ b/rtic-monotonics/CHANGELOG.md @@ -17,6 +17,7 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top! ### Changed +- Replace `atomic-polyfill` with `portable-atomic` - Rework all timers based on `rtic-time 2.0.0` - Most timer tick rates are now configurable - Tweak `build.rs` to avoid warnings in Nightly 1.78+ diff --git a/rtic-monotonics/Cargo.toml b/rtic-monotonics/Cargo.toml index 156f9b2f3c..369de915b1 100644 --- a/rtic-monotonics/Cargo.toml +++ b/rtic-monotonics/Cargo.toml @@ -36,7 +36,7 @@ rustdoc-flags = ["--cfg", "docsrs"] [dependencies] rtic-time = { version = "2.0.0", path = "../rtic-time" } fugit = { version = "0.3.6" } -atomic-polyfill = "1" +portable-atomic = { version = "1" } cfg-if = "1.0.0" cortex-m = { version = "0.7.6", optional = true } critical-section = { version = "1", optional = true } diff --git a/rtic-monotonics/src/imxrt.rs b/rtic-monotonics/src/imxrt.rs index bfe63153b0..f413d5c4c2 100644 --- a/rtic-monotonics/src/imxrt.rs +++ b/rtic-monotonics/src/imxrt.rs @@ -26,7 +26,7 @@ //! } //! ``` -use atomic_polyfill::{AtomicU32, Ordering}; +use portable_atomic::{AtomicU32, Ordering}; use rtic_time::{ half_period_counter::calculate_now, timer_queue::{TimerQueue, TimerQueueBackend}, diff --git a/rtic-monotonics/src/nrf/rtc.rs b/rtic-monotonics/src/nrf/rtc.rs index 6437f979a3..f76e319344 100644 --- a/rtic-monotonics/src/nrf/rtc.rs +++ b/rtic-monotonics/src/nrf/rtc.rs @@ -61,7 +61,7 @@ pub use nrf5340_net_pac::{self as pac, RTC0_NS as RTC0, RTC1_NS as RTC1}; #[doc(hidden)] pub use nrf9160_pac::{self as pac, RTC0_NS as RTC0, RTC1_NS as RTC1}; -use atomic_polyfill::{AtomicU32, Ordering}; +use portable_atomic::{AtomicU32, Ordering}; use rtic_time::{ half_period_counter::calculate_now, timer_queue::{TimerQueue, TimerQueueBackend}, diff --git a/rtic-monotonics/src/nrf/timer.rs b/rtic-monotonics/src/nrf/timer.rs index 35e37435f4..6bf1968938 100644 --- a/rtic-monotonics/src/nrf/timer.rs +++ b/rtic-monotonics/src/nrf/timer.rs @@ -71,7 +71,7 @@ pub use nrf5340_net_pac::{ #[doc(hidden)] pub use nrf9160_pac::{self as pac, TIMER0_NS as TIMER0, TIMER1_NS as TIMER1, TIMER2_NS as TIMER2}; -use atomic_polyfill::{AtomicU32, Ordering}; +use portable_atomic::{AtomicU32, Ordering}; use rtic_time::{ half_period_counter::calculate_now, timer_queue::{TimerQueue, TimerQueueBackend}, diff --git a/rtic-monotonics/src/stm32.rs b/rtic-monotonics/src/stm32.rs index 4952882ef1..6b3e4c97f0 100644 --- a/rtic-monotonics/src/stm32.rs +++ b/rtic-monotonics/src/stm32.rs @@ -51,7 +51,7 @@ pub mod prelude { pub use fugit::{self, ExtU64, ExtU64Ceil}; } -use atomic_polyfill::{AtomicU64, Ordering}; +use portable_atomic::{AtomicU64, Ordering}; use rtic_time::{ half_period_counter::calculate_now, timer_queue::{TimerQueue, TimerQueueBackend}, diff --git a/rtic-monotonics/src/systick.rs b/rtic-monotonics/src/systick.rs index 37cc2edf92..288c7dc4c9 100644 --- a/rtic-monotonics/src/systick.rs +++ b/rtic-monotonics/src/systick.rs @@ -42,17 +42,17 @@ pub mod prelude { pub use cortex_m::peripheral::SYST; -use atomic_polyfill::Ordering; +use portable_atomic::Ordering; use rtic_time::timer_queue::TimerQueue; use crate::TimerQueueBackend; cfg_if::cfg_if! { if #[cfg(feature = "systick-64bit")] { - use atomic_polyfill::AtomicU64; + use portable_atomic::AtomicU64; static SYSTICK_CNT: AtomicU64 = AtomicU64::new(0); } else { - use atomic_polyfill::AtomicU32; + use portable_atomic::AtomicU32; static SYSTICK_CNT: AtomicU32 = AtomicU32::new(0); } } diff --git a/rtic/CHANGELOG.md b/rtic/CHANGELOG.md index fbfe3edca4..ac5436eb73 100644 --- a/rtic/CHANGELOG.md +++ b/rtic/CHANGELOG.md @@ -11,6 +11,7 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top! - Updated esp32c3 dependency to v0.22.0 - Use `riscv-slic` from `crates.io` +- Replace `atomic-polyfill` with `portable-atomic` - Remove unused dependency `rtic-monotonics` ## [v2.1.1] - 2024-03-13 diff --git a/rtic/Cargo.toml b/rtic/Cargo.toml index d21246c2f5..7170fc4de3 100644 --- a/rtic/Cargo.toml +++ b/rtic/Cargo.toml @@ -30,8 +30,7 @@ esp32c3 = { version = "0.22.0", optional = true } riscv = { version = "0.11.0", optional = true } cortex-m = { version = "0.7.0", optional = true } bare-metal = "1.0.0" -# portable-atomic = { version = "0.3.19" } -atomic-polyfill = "1" +portable-atomic = { version = "1", default-features = false } rtic-macros = { path = "../rtic-macros", version = "=2.1.0" } rtic-core = "1" critical-section = "1" @@ -68,4 +67,4 @@ riscv-clint-backend = [ ] # needed for testing -test-critical-section = ["cortex-m/critical-section-single-core"] +test-critical-section = ["portable-atomic/critical-section"] diff --git a/rtic/src/export.rs b/rtic/src/export.rs index 4fd8e7870a..aa90ccc6e0 100644 --- a/rtic/src/export.rs +++ b/rtic/src/export.rs @@ -1,6 +1,5 @@ pub use bare_metal::CriticalSection; -//pub use portable_atomic as atomic; -pub use atomic_polyfill as atomic; +pub use portable_atomic as atomic; pub mod executor; diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index d7301f4a22..14920fdf72 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -73,20 +73,20 @@ impl Package { ][..] } else { &[ - "cortex-m-systick", - "cortex-m-systick,systick-64bit", - "rp2040", - "nrf52805", - "nrf52810", - "nrf52811", - "nrf52832", - "nrf52833", - "nrf52840", - "nrf5340-app", - "nrf5340-net", - "nrf9160", - "imxrt_gpt1,imxrt_gpt2,imxrt-ral/imxrt1062", - "stm32_tim2,stm32_tim3,stm32_tim4,stm32_tim5,stm32_tim15,stm32h725ag", + "cortex-m-systick,portable-atomic/critical-section", + "cortex-m-systick,systick-64bit,portable-atomic/critical-section", + "rp2040,portable-atomic/critical-section", + "nrf52805,portable-atomic/critical-section", + "nrf52810,portable-atomic/critical-section", + "nrf52811,portable-atomic/critical-section", + "nrf52832,portable-atomic/critical-section", + "nrf52833,portable-atomic/critical-section", + "nrf52840,portable-atomic/critical-section", + "nrf5340-app,portable-atomic/critical-section", + "nrf5340-net,portable-atomic/critical-section", + "nrf9160,portable-atomic/critical-section", + "imxrt_gpt1,imxrt_gpt2,imxrt-ral/imxrt1062,portable-atomic/critical-section", + "stm32_tim2,stm32_tim3,stm32_tim4,stm32_tim5,stm32_tim15,stm32h725ag,portable-atomic/critical-section", ][..] };