update defmt and defmt-rtt to 0.2.0
This commit is contained in:
parent
465ca9086d
commit
f779ec4928
@ -1,5 +1,5 @@
|
|||||||
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
|
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
|
||||||
runner = "probe-run --chip nRF52840_xxAA --defmt"
|
runner = "probe-run --chip nRF52840_xxAA"
|
||||||
|
|
||||||
rustflags = [
|
rustflags = [
|
||||||
# LLD (shipped with the Rust toolchain) is used as the default linker
|
# LLD (shipped with the Rust toolchain) is used as the default linker
|
||||||
|
@ -20,8 +20,8 @@ defmt-error = []
|
|||||||
embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] }
|
embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] }
|
||||||
embassy-nrf = { version = "0.1.0", path = "../embassy-nrf", features = ["defmt", "defmt-trace", "52840"] }
|
embassy-nrf = { version = "0.1.0", path = "../embassy-nrf", features = ["defmt", "defmt-trace", "52840"] }
|
||||||
|
|
||||||
defmt = "0.1.3"
|
defmt = "0.2.0"
|
||||||
defmt-rtt = "0.1.0"
|
defmt-rtt = "0.2.0"
|
||||||
|
|
||||||
cortex-m = "0.7.1"
|
cortex-m = "0.7.1"
|
||||||
cortex-m-rt = "0.6.13"
|
cortex-m-rt = "0.6.13"
|
||||||
|
@ -8,11 +8,11 @@ pub use defmt::*;
|
|||||||
|
|
||||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
use core::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
|
||||||
#[defmt::timestamp]
|
defmt::timestamp! {"{=u64}", {
|
||||||
fn timestamp() -> u64 {
|
static COUNT: AtomicUsize = AtomicUsize::new(0);
|
||||||
static COUNT: AtomicUsize = AtomicUsize::new(0);
|
// NOTE(no-CAS) `timestamps` runs with interrupts disabled
|
||||||
// NOTE(no-CAS) `timestamps` runs with interrupts disabled
|
let n = COUNT.load(Ordering::Relaxed);
|
||||||
let n = COUNT.load(Ordering::Relaxed);
|
COUNT.store(n + 1, Ordering::Relaxed);
|
||||||
COUNT.store(n + 1, Ordering::Relaxed);
|
n as u64
|
||||||
n as u64
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ defmt-error = [ ]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
embassy = { version = "0.1.0", path = "../embassy" }
|
embassy = { version = "0.1.0", path = "../embassy" }
|
||||||
|
|
||||||
defmt = { version = "0.1.3", optional = true }
|
defmt = { version = "0.2.0", optional = true }
|
||||||
log = { version = "0.4.11", optional = true }
|
log = { version = "0.4.11", optional = true }
|
||||||
cortex-m-rt = "0.6.13"
|
cortex-m-rt = "0.6.13"
|
||||||
cortex-m = "0.7.1"
|
cortex-m = "0.7.1"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
|
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
|
||||||
runner = "probe-run --chip STM32F401CCUx --defmt"
|
runner = "probe-run --chip STM32F401CCUx"
|
||||||
|
|
||||||
rustflags = [
|
rustflags = [
|
||||||
# LLD (shipped with the Rust toolchain) is used as the default linker
|
# LLD (shipped with the Rust toolchain) is used as the default linker
|
||||||
|
@ -20,8 +20,8 @@ defmt-error = []
|
|||||||
embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] }
|
embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] }
|
||||||
embassy-stm32f4 = { version = "*", path = "../embassy-stm32f4", features = ["stm32f401"] }
|
embassy-stm32f4 = { version = "*", path = "../embassy-stm32f4", features = ["stm32f401"] }
|
||||||
|
|
||||||
defmt = "0.1.3"
|
defmt = "0.2.0"
|
||||||
defmt-rtt = "0.1.0"
|
defmt-rtt = "0.2.0"
|
||||||
|
|
||||||
cortex-m = "0.7.1"
|
cortex-m = "0.7.1"
|
||||||
cortex-m-rt = "0.6.13"
|
cortex-m-rt = "0.6.13"
|
||||||
|
@ -7,11 +7,11 @@ pub use defmt::*;
|
|||||||
|
|
||||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
use core::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
|
||||||
#[defmt::timestamp]
|
defmt::timestamp! {"{=u64}", {
|
||||||
fn timestamp() -> u64 {
|
static COUNT: AtomicUsize = AtomicUsize::new(0);
|
||||||
static COUNT: AtomicUsize = AtomicUsize::new(0);
|
// NOTE(no-CAS) `timestamps` runs with interrupts disabled
|
||||||
// NOTE(no-CAS) `timestamps` runs with interrupts disabled
|
let n = COUNT.load(Ordering::Relaxed);
|
||||||
let n = COUNT.load(Ordering::Relaxed);
|
COUNT.store(n + 1, Ordering::Relaxed);
|
||||||
COUNT.store(n + 1, Ordering::Relaxed);
|
n as u64
|
||||||
n as u64
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ stm32f479 = ["stm32f4xx-hal/stm32f469"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
embassy = { version = "0.1.0", path = "../embassy" }
|
embassy = { version = "0.1.0", path = "../embassy" }
|
||||||
|
|
||||||
defmt = { version = "0.1.3", optional = true }
|
defmt = { version = "0.2.0", optional = true }
|
||||||
log = { version = "0.4.11", optional = true }
|
log = { version = "0.4.11", optional = true }
|
||||||
cortex-m-rt = "0.6.13"
|
cortex-m-rt = "0.6.13"
|
||||||
cortex-m = "0.7.1"
|
cortex-m = "0.7.1"
|
||||||
|
@ -13,7 +13,7 @@ defmt-warn = []
|
|||||||
defmt-error = []
|
defmt-error = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
defmt = { version = "0.1.3", optional = true }
|
defmt = { version = "0.2.0", optional = true }
|
||||||
log = { version = "0.4.11", optional = true }
|
log = { version = "0.4.11", optional = true }
|
||||||
|
|
||||||
cortex-m = "0.7.1"
|
cortex-m = "0.7.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user