From 78135a81d96a8bb74207b3f73c9f261aa4561a18 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 27 Nov 2020 18:42:59 +0100 Subject: [PATCH] Remove anyfmt --- Cargo.toml | 7 +- README.md | 8 -- anyfmt/Cargo.toml | 10 --- anyfmt/src/lib.rs | 149 ------------------------------- embassy-nrf/Cargo.toml | 19 ++-- embassy-nrf/src/gpiote.rs | 5 +- embassy-nrf/src/interrupt.rs | 5 +- embassy-nrf/src/qspi.rs | 47 ++++++++-- embassy-nrf/src/uarte.rs | 2 +- embassy/Cargo.toml | 7 +- embassy/src/executor/executor.rs | 3 +- embassy/src/flash.rs | 3 +- embassy/src/io/error.rs | 3 +- embassy/src/rand.rs | 4 +- embassy/src/time/duration.rs | 3 +- embassy/src/time/instant.rs | 3 +- embassy/src/time/mod.rs | 4 +- embassy/src/util/drop_bomb.rs | 2 +- embassy/src/util/portal.rs | 2 +- embassy/src/util/signal.rs | 2 +- examples/Cargo.toml | 11 ++- examples/src/bin/qspi.rs | 3 +- examples/src/example_common.rs | 2 +- test-build.sh | 6 +- 24 files changed, 79 insertions(+), 231 deletions(-) delete mode 100644 anyfmt/Cargo.toml delete mode 100644 anyfmt/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index 7336a2870..3ad62f18d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = [ "embassy", "embassy-nrf", - "anyfmt", + "embassy-macros", "examples", ] @@ -11,11 +11,6 @@ exclude = [ "third_party" ] -[patch.crates-io] -panic-probe = { git = "https://github.com/knurling-rs/probe-run", branch="main" } -defmt-rtt = { git = "https://github.com/knurling-rs/defmt", branch="main" } -defmt = { git = "https://github.com/knurling-rs/defmt", branch="main" } - [profile.dev] codegen-units = 1 debug = 2 diff --git a/README.md b/README.md index 0162011f4..6f7470cf5 100644 --- a/README.md +++ b/README.md @@ -52,14 +52,6 @@ cargo install --git https://github.com/knurling-rs/probe-run --branch main --fea cargo run --bin rtc_async ``` -## Using on your project - -`embassy` requires git version of a few dependencies. - -When using `embassy` in your own project, make sure you copy over the `[patch.crates-io]` section from root `Cargo.toml`. - -This will no longer needed after the first crates.io release. - ## Minimum supported Rust version (MSRV) `rustc 1.48.0-nightly (1fd5b9d51 2020-09-20)` diff --git a/anyfmt/Cargo.toml b/anyfmt/Cargo.toml deleted file mode 100644 index 3ee7c167b..000000000 --- a/anyfmt/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "anyfmt" -version = "0.1.0" -authors = ["Dario Nieuwenhuis "] -edition = "2018" - - -[dependencies] -defmt = { version = "0.1.0", optional = true } -log = { version = "0.4.11", optional = true } diff --git a/anyfmt/src/lib.rs b/anyfmt/src/lib.rs deleted file mode 100644 index 3286cc27b..000000000 --- a/anyfmt/src/lib.rs +++ /dev/null @@ -1,149 +0,0 @@ -#![no_std] - -pub mod export { - #[cfg(feature = "defmt")] - pub use defmt; - #[cfg(feature = "log")] - pub use log; -} - -#[cfg(feature = "log")] -#[macro_export] -macro_rules! log { - (trace, $($arg:expr),*) => { $crate::export::log::trace!($($arg),*); }; - (debug, $($arg:expr),*) => { $crate::export::log::debug!($($arg),*); }; - (info, $($arg:expr),*) => { $crate::export::log::info!($($arg),*); }; - (warn, $($arg:expr),*) => { $crate::export::log::warn!($($arg),*); }; - (error, $($arg:expr),*) => { $crate::export::log::error!($($arg),*); }; -} - -#[cfg(feature = "defmt")] -#[macro_export] -macro_rules! log { - (trace, $($arg:expr),*) => { $crate::export::defmt::trace!($($arg),*); }; - (debug, $($arg:expr),*) => { $crate::export::defmt::debug!($($arg),*); }; - (info, $($arg:expr),*) => { $crate::export::defmt::info!($($arg),*); }; - (warn, $($arg:expr),*) => { $crate::export::defmt::warn!($($arg),*); }; - (error, $($arg:expr),*) => { $crate::export::defmt::error!($($arg),*); }; -} - -#[cfg(not(any(feature = "log", feature = "defmt")))] -#[macro_export] -macro_rules! log { - ($level:ident, $($arg:expr),*) => {{}}; -} - -#[macro_export] -macro_rules! trace { - ($($arg:expr),*) => (log!(trace, $($arg),*)); -} - -#[macro_export] -macro_rules! debug { - ($($arg:expr),*) => ($crate::log!(debug, $($arg),*)); -} - -#[macro_export] -macro_rules! info { - ($($arg:expr),*) => ($crate::log!(info, $($arg),*)); -} - -#[macro_export] -macro_rules! warn { - ($($arg:expr),*) => ($crate::log!(warn, $($arg),*)); -} - -#[macro_export] -macro_rules! error { - ($($arg:expr),*) => ($crate::log!(error, $($arg),*)); -} - -#[macro_export] -macro_rules! expect { - ($arg:expr, $msg:expr) => { - match $crate::Try::into_result($arg) { - ::core::result::Result::Ok(t) => t, - ::core::result::Result::Err(e) => { - $crate::panic!("{:?}: {:?}", $crate::intern!($msg), e); - } - } - }; -} - -#[cfg(feature = "defmt")] -#[macro_export] -macro_rules! intern { - ($arg:expr) => { - $crate::export::defmt::intern!($arg) - }; -} - -#[cfg(not(feature = "defmt"))] -#[macro_export] -macro_rules! intern { - ($arg:expr) => { - $arg - }; -} - -#[macro_export] -macro_rules! unwrap { - ($arg:expr) => { - expect!($arg, "Unwrap failed") - }; -} - -#[macro_export] -macro_rules! panic { - () => { - $crate::panic!("panic") - }; - ($($arg:expr),*) => {{ - $crate::log!(error, $($arg),*); - ::core::panic!() - }}; -} - -#[macro_export] -macro_rules! assert { - ($cond:expr) => { - $crate::assert!($cond, "assertion failed"); - }; - ($cond:expr, $($arg:expr),*) => { - { - if !$cond { - $crate::panic!($($arg),*); - } - } - }; -} - -#[derive(Debug, Copy, Clone, Eq, PartialEq)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] -pub struct NoneError; - -pub trait Try { - type Ok; - type Error; - fn into_result(self) -> Result; -} - -impl Try for Option { - type Ok = T; - type Error = NoneError; - - #[inline] - fn into_result(self) -> Result { - self.ok_or(NoneError) - } -} - -impl Try for Result { - type Ok = T; - type Error = E; - - #[inline] - fn into_result(self) -> Self { - self - } -} diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 6cf23aa79..d1538908d 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml @@ -21,13 +21,10 @@ defmt-error = [ ] [dependencies] embassy = { version = "0.1.0", path = "../embassy" } -anyfmt = { version = "0.1.0", path = "../anyfmt" } -defmt = { version = "0.1.0", optional = true } - -cortex-m-rt = "0.6.12" -cortex-m = { version = "0.6.3" } +defmt = { version = "0.1.2" } +cortex-m-rt = "0.6.13" +cortex-m = { version = "0.6.4" } embedded-hal = { version = "0.2.4" } -bare-metal = { version = "0.2.0", features = ["const-fn"] } nrf52810-pac = { version = "0.9.0", optional = true } nrf52811-pac = { version = "0.9.1", optional = true } @@ -35,8 +32,8 @@ nrf52832-pac = { version = "0.9.0", optional = true } nrf52833-pac = { version = "0.9.0", optional = true } nrf52840-pac = { version = "0.9.0", optional = true } -nrf52810-hal = { version = "0.11.0", optional = true } -#nrf52811-hal = { version = "0.11.0", optional = true } # doesn't exist yet -nrf52832-hal = { version = "0.11.0", optional = true } -nrf52833-hal = { version = "0.11.0", optional = true } -nrf52840-hal = { version = "0.11.0", optional = true } +nrf52810-hal = { version = "0.12.0", optional = true } +#nrf52811-hal = { version = "0.12.0", optional = true } # doesn't exist yet +nrf52832-hal = { version = "0.12.0", optional = true } +nrf52833-hal = { version = "0.12.0", optional = true } +nrf52840-hal = { version = "0.12.0", optional = true } diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index 9626d3299..bb15cca66 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs @@ -1,8 +1,8 @@ -use anyfmt::{panic, *}; use core::cell::Cell; use core::future::Future; use core::ptr; use core::task::{Context, Poll}; +use defmt::{panic, *}; use embassy::util::Signal; use crate::hal::gpio::{Input, Level, Output, Pin, Port}; @@ -51,8 +51,7 @@ pub enum OutputChannelPolarity { Toggle, } -#[derive(Debug, Copy, Clone, Eq, PartialEq)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] +#[derive(Debug, Copy, Clone, Eq, PartialEq, defmt::Format)] pub enum NewChannelError { NoFreeChannels, } diff --git a/embassy-nrf/src/interrupt.rs b/embassy-nrf/src/interrupt.rs index 8918b13ee..384426ea2 100644 --- a/embassy-nrf/src/interrupt.rs +++ b/embassy-nrf/src/interrupt.rs @@ -10,10 +10,9 @@ use crate::pac::{NVIC, NVIC_PRIO_BITS}; // Re-exports pub use crate::pac::Interrupt; pub use crate::pac::Interrupt::*; // needed for cortex-m-rt #[interrupt] -pub use bare_metal::{CriticalSection, Mutex}; +pub use cortex_m::interrupt::{CriticalSection, Mutex}; -#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, defmt::Format)] #[repr(u8)] pub enum Priority { Level0 = 0, diff --git a/embassy-nrf/src/qspi.rs b/embassy-nrf/src/qspi.rs index 367a1d2d3..75cbe7ddc 100644 --- a/embassy-nrf/src/qspi.rs +++ b/embassy-nrf/src/qspi.rs @@ -1,4 +1,5 @@ use core::future::Future; +use defmt::{assert, assert_eq, panic, *}; use crate::hal::gpio::{Output, Pin as GpioPin, Port as GpioPort, PushPull}; use crate::pac::{Interrupt, QSPI}; @@ -32,12 +33,18 @@ pub struct Pins { pub io3: Option>>, } +pub struct DeepPowerDownConfig { + pub enter_time: u16, + pub exit_time: u16, +} + pub struct Config { pub pins: Pins, pub xip_offset: u32, pub read_opcode: ReadOpcode, pub write_opcode: WriteOpcode, pub write_page_size: WritePageSize, + pub deep_power_down: Option, } pub struct Qspi { @@ -96,15 +103,27 @@ impl Qspi { } }); - qspi.ifconfig0.write(|w| { - let w = w.addrmode().variant(AddressMode::_24BIT); - let w = w.dpmenable().disable(); - let w = w.ppsize().variant(config.write_page_size); - let w = w.readoc().variant(config.read_opcode); - let w = w.writeoc().variant(config.write_opcode); + qspi.ifconfig0.write(|mut w| { + w = w.addrmode().variant(AddressMode::_24BIT); + if config.deep_power_down.is_some() { + w = w.dpmenable().enable(); + } else { + w = w.dpmenable().disable(); + } + w = w.ppsize().variant(config.write_page_size); + w = w.readoc().variant(config.read_opcode); + w = w.writeoc().variant(config.write_opcode); w }); + if let Some(dpd) = &config.deep_power_down { + qspi.dpmdur.write(|mut w| unsafe { + w = w.enter().bits(dpd.enter_time); + w = w.exit().bits(dpd.exit_time); + w + }) + } + qspi.ifconfig1.write(|w| { let w = unsafe { w.sckdelay().bits(80) }; let w = w.dpmen().exit(); @@ -125,13 +144,28 @@ impl Qspi { qspi.events_ready.reset(); // Enable READY interrupt + SIGNAL.reset(); qspi.intenset.write(|w| w.ready().set()); interrupt::set_priority(Interrupt::QSPI, interrupt::Priority::Level7); + interrupt::unpend(Interrupt::QSPI); interrupt::enable(Interrupt::QSPI); Self { inner: qspi } } + pub fn sleep(&mut self) { + info!("flash: sleeping"); + info!("flash: state = {:?}", self.inner.status.read().bits()); + self.inner.ifconfig1.modify(|r, w| w.dpmen().enter()); + info!("flash: state = {:?}", self.inner.status.read().bits()); + cortex_m::asm::delay(1000000); + info!("flash: state = {:?}", self.inner.status.read().bits()); + + self.inner + .tasks_deactivate + .write(|w| w.tasks_deactivate().set_bit()); + } + pub fn custom_instruction<'a>( &'a mut self, opcode: u8, @@ -318,6 +352,7 @@ unsafe fn QSPI() { let p = crate::pac::Peripherals::steal().QSPI; if p.events_ready.read().events_ready().bit_is_set() { p.events_ready.reset(); + info!("qspi ready"); SIGNAL.signal(()); } } diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs index 530895073..0f2030c98 100644 --- a/embassy-nrf/src/uarte.rs +++ b/embassy-nrf/src/uarte.rs @@ -28,7 +28,7 @@ pub use uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity}; use embassy::io::{AsyncBufRead, AsyncWrite, Result}; use embassy::util::WakerStore; -use anyfmt::{assert, panic, *}; +use defmt::{assert, panic, todo, *}; //use crate::trace; diff --git a/embassy/Cargo.toml b/embassy/Cargo.toml index 6c9309763..832b06fd7 100644 --- a/embassy/Cargo.toml +++ b/embassy/Cargo.toml @@ -13,12 +13,11 @@ defmt-warn = [] defmt-error = [] [dependencies] -anyfmt = { version = "0.1.0", path = "../anyfmt" } -defmt = { version = "0.1.0", optional = true } +defmt = { version = "0.1.0" } -cortex-m = "0.6.3" +cortex-m = "0.6.4" futures = { version = "0.3.5", default-features = false } -pin-project = { version = "0.4.23", default-features = false } +pin-project = { version = "1.0.2", default-features = false } futures-intrusive = { version = "0.3.1", default-features = false } embassy-macros = { version = "0.1.0", path = "../embassy-macros"} diff --git a/embassy/src/executor/executor.rs b/embassy/src/executor/executor.rs index 4d73cf9f0..ff3a8517c 100644 --- a/embassy/src/executor/executor.rs +++ b/embassy/src/executor/executor.rs @@ -63,8 +63,7 @@ pub struct Task { future: UninitCell, // Valid if STATE_RUNNING } -#[derive(Copy, Clone, Debug)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] +#[derive(Copy, Clone, Debug, defmt::Format)] pub enum SpawnError { Busy, } diff --git a/embassy/src/flash.rs b/embassy/src/flash.rs index ca9fb5952..5d62e3b64 100644 --- a/embassy/src/flash.rs +++ b/embassy/src/flash.rs @@ -1,7 +1,6 @@ use core::future::Future; -#[derive(Copy, Clone, Debug, Eq, PartialEq)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] +#[derive(Copy, Clone, Debug, Eq, PartialEq, defmt::Format)] pub enum Error { Failed, AddressMisaligned, diff --git a/embassy/src/io/error.rs b/embassy/src/io/error.rs index 8bad0cdb1..8bbdae7f8 100644 --- a/embassy/src/io/error.rs +++ b/embassy/src/io/error.rs @@ -2,8 +2,7 @@ /// /// This list is intended to grow over time and it is not recommended to /// exhaustively match against it. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] +#[derive(Debug, Clone, Copy, PartialEq, Eq, defmt::Format)] pub enum Error { /// An entity was not found, often a file. NotFound, diff --git a/embassy/src/rand.rs b/embassy/src/rand.rs index dbabb6f2b..3db164cf1 100644 --- a/embassy/src/rand.rs +++ b/embassy/src/rand.rs @@ -1,4 +1,4 @@ -use anyfmt::*; +use defmt::*; pub trait Rand { fn rand(&self, buf: &mut [u8]); @@ -11,5 +11,5 @@ pub unsafe fn set_rand(rand: &'static dyn Rand) { } pub fn rand(buf: &mut [u8]) { - unsafe { expect!(RAND, "No rand set").rand(buf) } + unsafe { unwrap!(RAND, "No rand set").rand(buf) } } diff --git a/embassy/src/time/duration.rs b/embassy/src/time/duration.rs index 8135961ea..715d4155f 100644 --- a/embassy/src/time/duration.rs +++ b/embassy/src/time/duration.rs @@ -3,8 +3,7 @@ use core::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign}; use super::TICKS_PER_SECOND; -#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, defmt::Format)] pub struct Duration { pub(crate) ticks: u64, } diff --git a/embassy/src/time/instant.rs b/embassy/src/time/instant.rs index 75098081f..a7f268e1a 100644 --- a/embassy/src/time/instant.rs +++ b/embassy/src/time/instant.rs @@ -5,8 +5,7 @@ use core::ops::{Add, AddAssign, Sub, SubAssign}; use super::TICKS_PER_SECOND; use super::{now, Duration}; -#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "defmt", derive(defmt::Format))] +#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, defmt::Format)] pub struct Instant { ticks: u64, } diff --git a/embassy/src/time/mod.rs b/embassy/src/time/mod.rs index a3792e3c8..0d97a789e 100644 --- a/embassy/src/time/mod.rs +++ b/embassy/src/time/mod.rs @@ -8,7 +8,7 @@ pub use instant::Instant; pub use timer::Timer; pub use traits::*; -use anyfmt::*; +use defmt::*; // TODO allow customizing, probably via Cargo features `tick-hz-32768` or something. pub const TICKS_PER_SECOND: u64 = 32768; @@ -20,5 +20,5 @@ pub unsafe fn set_clock(clock: &'static dyn Clock) { } pub(crate) fn now() -> u64 { - unsafe { expect!(CLOCK, "No clock set").now() } + unsafe { unwrap!(CLOCK, "No clock set").now() } } diff --git a/embassy/src/util/drop_bomb.rs b/embassy/src/util/drop_bomb.rs index 0ef051cf4..d33591fc2 100644 --- a/embassy/src/util/drop_bomb.rs +++ b/embassy/src/util/drop_bomb.rs @@ -1,5 +1,5 @@ -use anyfmt::panic; use core::mem; +use defmt::panic; pub struct DropBomb { _private: (), diff --git a/embassy/src/util/portal.rs b/embassy/src/util/portal.rs index 8f5d812f4..6eecf52cd 100644 --- a/embassy/src/util/portal.rs +++ b/embassy/src/util/portal.rs @@ -1,8 +1,8 @@ -use anyfmt::panic; use core::cell::UnsafeCell; use core::future::Future; use core::mem; use core::mem::MaybeUninit; +use defmt::panic; use crate::util::*; diff --git a/embassy/src/util/signal.rs b/embassy/src/util/signal.rs index e2cd3a80f..45205368d 100644 --- a/embassy/src/util/signal.rs +++ b/embassy/src/util/signal.rs @@ -1,8 +1,8 @@ -use anyfmt::panic; use core::cell::UnsafeCell; use core::future::Future; use core::mem; use core::task::{Context, Poll, Waker}; +use defmt::panic; pub struct Signal { state: UnsafeCell>, diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 719f73269..71d0bbd77 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -17,17 +17,16 @@ defmt-error = [] [dependencies] -embassy = { version = "0.1.0", path = "../embassy", features = ["defmt"] } -embassy-nrf = { version = "0.1.0", path = "../embassy-nrf", features = ["defmt", "defmt-trace", "52840"] } -anyfmt = { version = "0.1.0", path = "../anyfmt", features = ["defmt"] } +embassy = { version = "0.1.0", path = "../embassy", features = ["defmt-trace"] } +embassy-nrf = { version = "0.1.0", path = "../embassy-nrf", features = ["defmt-trace", "52840"] } -defmt = "0.1.0" +defmt = "0.1.2" defmt-rtt = "0.1.0" cortex-m = { version = "0.6.3" } cortex-m-rt = "0.6.12" embedded-hal = { version = "0.2.4" } panic-probe = "0.1.0" -nrf52840-hal = { version = "0.11.0" } -futures = { version = "0.3.7", default-features = false, features = ["async-await"] } +nrf52840-hal = { version = "0.12.0" } +futures = { version = "0.3.8", default-features = false, features = ["async-await"] } cortex-m-rtic = { git = "https://github.com/rtic-rs/cortex-m-rtic", branch = "master"} diff --git a/examples/src/bin/qspi.rs b/examples/src/bin/qspi.rs index a7f668ca7..644018e2d 100644 --- a/examples/src/bin/qspi.rs +++ b/examples/src/bin/qspi.rs @@ -6,8 +6,8 @@ mod example_common; use example_common::*; -use anyfmt::panic; use cortex_m_rt::entry; +use defmt::{assert_eq, panic, *}; use nrf52840_hal::gpio; use embassy::executor::{task, Executor}; @@ -65,6 +65,7 @@ async fn run() { write_opcode: qspi::WriteOpcode::PP4IO, xip_offset: 0, write_page_size: qspi::WritePageSize::_256BYTES, + deep_power_down: None, }; let mut q = qspi::Qspi::new(p.QSPI, config); diff --git a/examples/src/example_common.rs b/examples/src/example_common.rs index 1a12fa69a..60bb02082 100644 --- a/examples/src/example_common.rs +++ b/examples/src/example_common.rs @@ -4,7 +4,7 @@ use defmt_rtt as _; // global logger use nrf52840_hal as _; use panic_probe as _; -pub use anyfmt::*; +pub use defmt::*; use core::sync::atomic::{AtomicUsize, Ordering}; diff --git a/test-build.sh b/test-build.sh index 34a56782b..66128ddc2 100755 --- a/test-build.sh +++ b/test-build.sh @@ -7,15 +7,11 @@ set -euxo pipefail # embassy (cd embassy; cargo build --target thumbv7em-none-eabihf) -(cd embassy; cargo build --target thumbv7em-none-eabihf --features defmt,anyfmt/defmt) -(cd embassy; cargo build --target thumbv7em-none-eabihf --features anyfmt/log) # embassy-nrf -(cd embassy-nrf; cargo build --target thumbv7em-none-eabihf --features 52810) +(cd embassy-nrf; cargo build --target thumbv7em-none-eabi --features 52810) #(cd embassy-nrf; cargo build --target thumbv7em-none-eabihf --features 52811) # nrf52811-hal doesn't exist yet (cd embassy-nrf; cargo build --target thumbv7em-none-eabihf --features 52832) (cd embassy-nrf; cargo build --target thumbv7em-none-eabihf --features 52833) (cd embassy-nrf; cargo build --target thumbv7em-none-eabihf --features 52840) -(cd embassy-nrf; cargo build --target thumbv7em-none-eabihf --features 52840,anyfmt/log) -(cd embassy-nrf; cargo build --target thumbv7em-none-eabihf --features 52840,defmt,embassy/defmt,anyfmt/defmt)