diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2024-06-23 09:13:43 +0200 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2024-06-23 09:20:32 +0200 |
| commit | 861a63dbe31f8c1062bbc9a7eca012370ac26d76 (patch) | |
| tree | 429880921f8d86a6ca7b15e74533a909a69f705c /xtask/src/argument_parsing.rs | |
| parent | 918f9c3f13a75d6d01f283702353ebc31bf36c69 (diff) | |
Update `embedded-hal-bus` to 0.2 and fix `portable-atomic` features
Diffstat (limited to 'xtask/src/argument_parsing.rs')
| -rw-r--r-- | xtask/src/argument_parsing.rs | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index 14920fd..8707ec5 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -73,30 +73,39 @@ impl Package { ][..] } else { &[ - "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", + "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", ][..] }; features .iter() - .map(ToString::to_string) + .map(|&s| { + if matches!(backend, Backends::Thumbv6) { + format!("{s},portable-atomic/critical-section") + } else { + s.to_string() + } + }) .map(Some) .chain(std::iter::once(None)) .collect() } + Package::RticSync if matches!(backend, Backends::Thumbv6) => { + vec![Some("portable-atomic/critical-section".into())] + } _ => vec![None], } } |
