From c2da49826345e82e7539fce3e96cce203253dc56 Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Mon, 15 Nov 2021 11:08:51 -0500 Subject: [PATCH 1/6] Update to defmt 3.0ish. Lots of gitrevs deps. --- embassy-hal-common/Cargo.toml | 7 +------ embassy-lora/Cargo.toml | 8 +------- embassy-net/Cargo.toml | 11 +++-------- embassy-nrf/Cargo.toml | 8 +------- embassy-rp/Cargo.toml | 8 +------- embassy-stm32/Cargo.toml | 10 +++------- embassy-stm32/src/can/bxcan.rs | 2 +- embassy-traits/Cargo.toml | 2 +- embassy/Cargo.toml | 8 +------- examples/stm32h7/Cargo.toml | 25 ++++++++----------------- examples/stm32l4/Cargo.toml | 19 +++++-------------- examples/stm32u5/.cargo/config.toml | 4 +++- examples/stm32u5/Cargo.toml | 19 +++++-------------- examples/stm32u5/src/bin/boot.rs | 4 +++- 14 files changed, 37 insertions(+), 98 deletions(-) diff --git a/embassy-hal-common/Cargo.toml b/embassy-hal-common/Cargo.toml index 57500707..2028b0e0 100644 --- a/embassy-hal-common/Cargo.toml +++ b/embassy-hal-common/Cargo.toml @@ -5,16 +5,11 @@ authors = ["Dario Nieuwenhuis "] edition = "2018" [features] -defmt-trace = [ ] -defmt-debug = [ ] -defmt-info = [ ] -defmt-warn = [ ] -defmt-error = [ ] [dependencies] embassy = { version = "0.1.0", path = "../embassy" } -defmt = { version = "0.2.3", optional = true } +defmt = { version = "0.3", optional = true } log = { version = "0.4.14", optional = true } cortex-m = "0.7.3" usb-device = "0.2.8" diff --git a/embassy-lora/Cargo.toml b/embassy-lora/Cargo.toml index 00bd3b84..fa46d43f 100644 --- a/embassy-lora/Cargo.toml +++ b/embassy-lora/Cargo.toml @@ -11,15 +11,9 @@ sx127x = [] stm32wl = ["embassy-stm32", "embassy-stm32/subghz"] time = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - [dependencies] -defmt = { version = "0.2.3", optional = true } +defmt = { version = "0.3", optional = true } log = { version = "0.4.14", optional = true } embassy = { version = "0.1.0", path = "../embassy", default-features = false } diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index 161a3946..4b932ceb 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml @@ -7,11 +7,6 @@ edition = "2018" [features] default = ["pool-4"] std = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] tcp = ["smoltcp/socket-tcp"] dhcpv4 = ["medium-ethernet", "smoltcp/socket-dhcpv4"] @@ -25,7 +20,7 @@ pool-32 = [] [dependencies] -defmt = { version = "0.2.3", optional = true } +defmt = { version = "0.3", optional = true } log = { version = "0.4.14", optional = true } embassy = { version = "0.1.0", path = "../embassy" } @@ -39,8 +34,8 @@ futures = { version = "0.3.17", default-features = false, features = atomic-pool = "0.2.1" [dependencies.smoltcp] -git = "https://github.com/smoltcp-rs/smoltcp" -rev = "e4241510337e095b9d21136c5f58b2eaa1b78479" +git = "https://github.com/bobmcwhirter/smoltcp" +rev = "faf81d21daae16b650b16e59a8422a8283e8a302" default-features = false features = [ "proto-ipv4", diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 3ce17437..dae9f26a 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml @@ -12,12 +12,6 @@ edition = "2018" # There are no plans to make this stable. unstable-pac = [] -defmt-trace = [ ] -defmt-debug = [ ] -defmt-info = [ ] -defmt-warn = [ ] -defmt-error = [ ] - nrf52805 = ["nrf52805-pac", "_ppi"] nrf52810 = ["nrf52810-pac", "_ppi"] nrf52811 = ["nrf52811-pac", "_ppi"] @@ -53,7 +47,7 @@ embassy = { version = "0.1.0", path = "../embassy" } embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["nrf"]} embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } -defmt = { version = "0.2.3", optional = true } +defmt = { version = "0.3", optional = true } log = { version = "0.4.14", optional = true } cortex-m-rt = ">=0.6.15,<0.8" cortex-m = "0.7.3" diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index 21a19a63..be41f95e 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml @@ -12,18 +12,12 @@ edition = "2018" # There are no plans to make this stable. unstable-pac = [] -defmt-trace = [ ] -defmt-debug = [ ] -defmt-info = [ ] -defmt-warn = [ ] -defmt-error = [ ] - [dependencies] embassy = { version = "0.1.0", path = "../embassy", features = [ "time-tick-1mhz" ] } embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["rp"]} atomic-polyfill = "0.1.5" -defmt = { version = "0.2.3", optional = true } +defmt = { version = "0.3", optional = true } log = { version = "0.4.14", optional = true } cortex-m-rt = ">=0.6.15,<0.8" cortex-m = "0.7.3" diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index d6b0586c..8ed25e11 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -12,7 +12,7 @@ embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } embassy-traits = {version = "0.1.0", path = "../embassy-traits" } embassy-net = { version = "0.1.0", path = "../embassy-net", default-features = false, optional = true } -defmt = { version = "0.2.3", optional = true } +defmt = { version = "0.3", optional = true } log = { version = "0.4.14", optional = true } cortex-m-rt = ">=0.6.15,<0.8" cortex-m = "0.7.3" @@ -26,7 +26,8 @@ bare-metal = "1.0.0" atomic-polyfill = "0.1.5" stm32-metapac = { version = "0.1.0", path = "../stm32-metapac", features = ["rt"] } vcell = { version = "0.1.3", optional = true } -bxcan = "0.5.1" +bxcan = { git = "https://github.com/bobmcwhirter/bxcan.git", rev="8e011c6e1ecec318da5b8e13ac743ce34e969de9" } + seq-macro = "0.2.2" cfg-if = "1.0.0" @@ -37,11 +38,6 @@ serde = { version = "1.0.130", features = [ "derive" ] } serde_yaml = "0.8.21" [features] -defmt-trace = [ ] -defmt-debug = [ ] -defmt-info = [ ] -defmt-warn = [ ] -defmt-error = [ ] sdmmc-rs = ["embedded-sdmmc"] net = ["embassy-net", "vcell"] memory-x = ["stm32-metapac/memory-x"] diff --git a/embassy-stm32/src/can/bxcan.rs b/embassy-stm32/src/can/bxcan.rs index 191fc42a..cc057b09 100644 --- a/embassy-stm32/src/can/bxcan.rs +++ b/embassy-stm32/src/can/bxcan.rs @@ -35,7 +35,7 @@ impl<'d, T: Instance + bxcan::Instance> Can<'d, T> { Self { phantom: PhantomData, - can: bxcan::Can::new(peri), + can: bxcan::Can::builder(peri).enable(), } } } diff --git a/embassy-traits/Cargo.toml b/embassy-traits/Cargo.toml index 9e23453a..c98b583e 100644 --- a/embassy-traits/Cargo.toml +++ b/embassy-traits/Cargo.toml @@ -8,5 +8,5 @@ edition = "2018" std = [] [dependencies] -defmt = { version = "0.2.3", optional = true } +defmt = { version = "0.3", optional = true } embedded-hal = { version = "0.2.6", features = ["unproven"] } diff --git a/embassy/Cargo.toml b/embassy/Cargo.toml index d531ce3f..bbe657f4 100644 --- a/embassy/Cargo.toml +++ b/embassy/Cargo.toml @@ -23,16 +23,10 @@ time-tick-32768hz = ["time"] time-tick-1000hz = ["time"] time-tick-1mhz = ["time"] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - executor-agnostic = [] [dependencies] -defmt = { version = "0.2.3", optional = true } +defmt = { version = "0.3", optional = true } log = { version = "0.4.14", optional = true } cortex-m = "0.7.3" diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index e83ee358..6b51f2ab 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml @@ -6,31 +6,22 @@ version = "0.1.0" resolver = "2" [features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32h743zi", "net", "time-driver-tim2"] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h743zi", "net", "time-driver-tim2"] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } -embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt-debug", "defmt", "tcp", "medium-ethernet", "pool-16"] } +embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt", "tcp", "medium-ethernet", "pool-16"] } embassy-macros = { path = "../../embassy-macros" } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } @@ -40,8 +31,8 @@ critical-section = "0.2.5" micromath = "2.0.0" [dependencies.smoltcp] -git = "https://github.com/smoltcp-rs/smoltcp" -rev = "e4241510337e095b9d21136c5f58b2eaa1b78479" +git = "https://github.com/bobmcwhirter/smoltcp" +rev = "faf81d21daae16b650b16e59a8422a8283e8a302" default-features = false features = [ "proto-ipv4", diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml index 26d4cae4..c6862b21 100644 --- a/examples/stm32l4/Cargo.toml +++ b/examples/stm32l4/Cargo.toml @@ -6,29 +6,20 @@ version = "0.1.0" resolver = "2" [features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt" ] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "unstable-pac", "stm32l4s5vi", "time-driver-tim2"] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "unstable-pac", "stm32l4s5vi", "time-driver-tim2"] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } diff --git a/examples/stm32u5/.cargo/config.toml b/examples/stm32u5/.cargo/config.toml index 9f5e1480..826fd33f 100644 --- a/examples/stm32u5/.cargo/config.toml +++ b/examples/stm32u5/.cargo/config.toml @@ -1,7 +1,9 @@ [target.'cfg(all(target_arch = "arm", target_os = "none"))'] # replace STM32F429ZITx with your chip as listed in `probe-run --list-chips` #runner = "probe-run --chip STM32U585AIIx" -runner = "/Users/bob/outboard-repos/probe-run/target/debug/probe-run-rp --chip STM32U585AIIx" +#runner = "/Users/bob/outboard-repos/probe-run/target/debug/probe-run-rp --chip STM32U585AIIx" +#runner = "/Users/bob/repos/probe-run/target/debug/probe-run --chip STM32U585AIIx" +runner = "probe-run --chip STM32U585AIIx" [build] target = "thumbv7em-none-eabi" diff --git a/examples/stm32u5/Cargo.toml b/examples/stm32u5/Cargo.toml index e84e1992..a0138e1a 100644 --- a/examples/stm32u5/Cargo.toml +++ b/examples/stm32u5/Cargo.toml @@ -6,29 +6,20 @@ version = "0.1.0" resolver = "2" [features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "unstable-pac", "stm32u585ai", "memory-x" ] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "unstable-pac", "stm32u585ai", "memory-x" ] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } -defmt = "0.2" -defmt-rtt = "0.2" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } diff --git a/examples/stm32u5/src/bin/boot.rs b/examples/stm32u5/src/bin/boot.rs index 91eff735..23cfc306 100644 --- a/examples/stm32u5/src/bin/boot.rs +++ b/examples/stm32u5/src/bin/boot.rs @@ -12,5 +12,7 @@ use embassy_stm32 as _; fn main() -> ! { info!("Hello World!"); - loop {} + loop { + //defmt::info!("loop!"); + } } From a770fc77c907c50fd2c4a7f6ce934eb45974ae55 Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Mon, 15 Nov 2021 11:19:19 -0500 Subject: [PATCH 2/6] Adjust all examples to defmt 0.3. --- examples/nrf/Cargo.toml | 19 ++++--------------- examples/rp/Cargo.toml | 21 +++++---------------- examples/stm32f0/Cargo.toml | 16 +++------------- examples/stm32f1/Cargo.toml | 21 +++++---------------- examples/stm32f4/Cargo.toml | 20 +++++--------------- examples/stm32f7/Cargo.toml | 23 ++++++----------------- examples/stm32g0/Cargo.toml | 21 +++++---------------- examples/stm32l0/Cargo.toml | 21 +++++---------------- examples/stm32l1/Cargo.toml | 21 +++++---------------- examples/stm32u5/Cargo.toml | 2 -- examples/stm32wb55/Cargo.toml | 21 +++++---------------- examples/stm32wl55/Cargo.toml | 21 +++++---------------- 12 files changed, 53 insertions(+), 174 deletions(-) diff --git a/examples/nrf/Cargo.toml b/examples/nrf/Cargo.toml index b89aa513..f7c0f85e 100644 --- a/examples/nrf/Cargo.toml +++ b/examples/nrf/Cargo.toml @@ -4,30 +4,19 @@ edition = "2018" name = "embassy-nrf-examples" version = "0.1.0" -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - [dependencies] embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "defmt-trace", "nrf52840", "time-driver-rtc1", "gpiote"] } +embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = { version = "0.7.3", features = ["inline-asm"] } cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rand = { version = "0.8.4", default-features = false } embedded-storage = "0.2.0" diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index 9caa3717..37f41b8e 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml @@ -4,30 +4,19 @@ edition = "2018" name = "embassy-rp-examples" version = "0.1.0" -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } -embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } +embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt"] } atomic-polyfill = "0.1.5" -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = { version = "0.7.3", features = ["inline-asm"] } cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await", "cfg-target-has-atomic", "unstable"] } display-interface-spi = "0.4.1" embedded-graphics = "0.7.1" diff --git a/examples/stm32f0/Cargo.toml b/examples/stm32f0/Cargo.toml index e586748a..dcc2e206 100644 --- a/examples/stm32f0/Cargo.toml +++ b/examples/stm32f0/Cargo.toml @@ -10,20 +10,10 @@ resolver = "2" [dependencies] cortex-m = { version = "0.7.3", features = ["inline-asm"] } cortex-m-rt = "0.7.0" -defmt = "0.2.3" -defmt-rtt = "0.2.0" -panic-probe = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" +panic-probe = "0.3" rtt-target = { version = "0.3.1", features = ["cortex-m"] } embassy = { path = "../../embassy", features = ["defmt"] } embassy-stm32 = { path = "../../embassy-stm32", features = ["defmt", "memory-x", "stm32f030f4", "time-driver-tim3"] } -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] diff --git a/examples/stm32f1/Cargo.toml b/examples/stm32f1/Cargo.toml index 9b4e831e..0edfacd9 100644 --- a/examples/stm32f1/Cargo.toml +++ b/examples/stm32f1/Cargo.toml @@ -5,30 +5,19 @@ name = "embassy-stm32f1-examples" version = "0.1.0" resolver = "2" -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-tim2"] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-tim2"] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml index ce3a26bb..ef57acf0 100644 --- a/examples/stm32f4/Cargo.toml +++ b/examples/stm32f4/Cargo.toml @@ -5,30 +5,20 @@ name = "embassy-stm32f4-examples" version = "0.1.0" resolver = "2" -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-tim2"] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-tim2"] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml index f49a23e3..ac46cd86 100644 --- a/examples/stm32f7/Cargo.toml +++ b/examples/stm32f7/Cargo.toml @@ -5,32 +5,21 @@ name = "embassy-stm32f7-examples" version = "0.1.0" resolver = "2" -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "net", "stm32f767zi", "unstable-pac", "time-driver-tim2"] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "net", "stm32f767zi", "unstable-pac", "time-driver-tim2"] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } -embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt-debug", "defmt", "tcp", "medium-ethernet", "pool-16"] } +embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt", "tcp", "medium-ethernet", "pool-16"] } embassy-macros = { path = "../../embassy-macros" } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } diff --git a/examples/stm32g0/Cargo.toml b/examples/stm32g0/Cargo.toml index 58a62f7b..c7f5d41b 100644 --- a/examples/stm32g0/Cargo.toml +++ b/examples/stm32g0/Cargo.toml @@ -5,30 +5,19 @@ name = "embassy-stm32g0-examples" version = "0.1.0" resolver = "2" -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "time-driver-tim2", "stm32g071rb", "unstable-pac"] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "time-driver-tim2", "stm32g071rb", "unstable-pac"] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml index c9d94496..70493b46 100644 --- a/examples/stm32l0/Cargo.toml +++ b/examples/stm32l0/Cargo.toml @@ -5,21 +5,10 @@ name = "embassy-stm32l0-examples" version = "0.1.0" resolver = "2" -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32l072cz", "time-driver-tim3"] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l072cz", "time-driver-tim3"] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } embassy-macros = { path = "../../embassy-macros" } @@ -27,13 +16,13 @@ embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["sx lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "4bff2e0021103adfbccedcbf49dbcd0474adc4b2", default-features = false, features = ["async"] } lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "4bff2e0021103adfbccedcbf49dbcd0474adc4b2", default-features = false, features = ["default-crypto"] } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } diff --git a/examples/stm32l1/Cargo.toml b/examples/stm32l1/Cargo.toml index e4dd7186..f9d3b29e 100644 --- a/examples/stm32l1/Cargo.toml +++ b/examples/stm32l1/Cargo.toml @@ -5,31 +5,20 @@ name = "embassy-stm32l1-examples" version = "0.1.0" resolver = "2" -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32l151cb-a", "time-driver-tim2", "memory-x"] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l151cb-a", "time-driver-tim2", "memory-x"] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } embassy-macros = { path = "../../embassy-macros" } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } diff --git a/examples/stm32u5/Cargo.toml b/examples/stm32u5/Cargo.toml index a0138e1a..1a5facda 100644 --- a/examples/stm32u5/Cargo.toml +++ b/examples/stm32u5/Cargo.toml @@ -5,8 +5,6 @@ name = "embassy-stm32u5-examples" version = "0.1.0" resolver = "2" -[features] - [dependencies] embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } diff --git a/examples/stm32wb55/Cargo.toml b/examples/stm32wb55/Cargo.toml index 3a6f63ba..1b03bd48 100644 --- a/examples/stm32wb55/Cargo.toml +++ b/examples/stm32wb55/Cargo.toml @@ -5,30 +5,19 @@ name = "embassy-stm32wb55-examples" version = "0.1.0" resolver = "2" -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32wb55cc", "time-driver-tim2"] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32wb55cc", "time-driver-tim2"] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } diff --git a/examples/stm32wl55/Cargo.toml b/examples/stm32wl55/Cargo.toml index d92f7aa0..00b46696 100644 --- a/examples/stm32wl55/Cargo.toml +++ b/examples/stm32wl55/Cargo.toml @@ -5,34 +5,23 @@ name = "embassy-stm32wl55-examples" version = "0.1.0" resolver = "2" -[features] -default = [ - "defmt-default", -] -defmt-default = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] - [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } -embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32wl55jc_cm4", "time-driver-tim2", "memory-x", "subghz", "unstable-pac"] } +embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32wl55jc_cm4", "time-driver-tim2", "memory-x", "subghz", "unstable-pac"] } embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["stm32wl", "time"] } lorawan-device = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "4bff2e0021103adfbccedcbf49dbcd0474adc4b2", default-features = false, features = ["async"] } lorawan-encoding = { git = "https://github.com/ivajloip/rust-lorawan.git", rev = "4bff2e0021103adfbccedcbf49dbcd0474adc4b2", default-features = false, features = ["default-crypto"] } -defmt = "0.2.3" -defmt-rtt = "0.2.0" +defmt = "0.3" +defmt-rtt = "0.3" cortex-m = "0.7.3" cortex-m-rt = "0.7.0" embedded-hal = "0.2.6" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3", features = ["print-defmt"] } futures = { version = "0.3.17", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] } heapless = { version = "0.7.5", default-features = false } From 23fdca9e527de92b981b04b5f3d671749b62acb5 Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Mon, 15 Nov 2021 11:33:44 -0500 Subject: [PATCH 3/6] Remove extraneous defmt-trace feature. --- examples/nrf/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/nrf/Cargo.toml b/examples/nrf/Cargo.toml index f7c0f85e..5b4662b4 100644 --- a/examples/nrf/Cargo.toml +++ b/examples/nrf/Cargo.toml @@ -6,7 +6,7 @@ version = "0.1.0" [dependencies] -embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } +embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] } From 57ca241658f95e4e30940b29dff541b2ee1e1b56 Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Mon, 15 Nov 2021 11:40:06 -0500 Subject: [PATCH 4/6] Further cargo muckings for smol/defmt. --- examples/std/Cargo.toml | 6 +++++- examples/stm32f7/Cargo.toml | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index 002d0487..2e2f0bd1 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml @@ -7,7 +7,6 @@ version = "0.1.0" [dependencies] embassy = { version = "0.1.0", path = "../../embassy", features = ["log", "std", "time"] } embassy-net = { version = "0.1.0", path = "../../embassy-net", features=["std", "log", "medium-ethernet", "tcp", "dhcpv4"] } -smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp", rev="e4241510337e095b9d21136c5f58b2eaa1b78479", default-features = false } async-io = "1.6.0" env_logger = "0.9.0" @@ -18,3 +17,8 @@ libc = "0.2.101" clap = { version = "3.0.0-beta.5", features = ["derive"] } rand_core = { version = "0.6.3", features = ["std"] } heapless = { version = "0.7.5", default-features = false } + +[dependencies.smoltcp] +git = "https://github.com/bobmcwhirter/smoltcp" +rev = "faf81d21daae16b650b16e59a8422a8283e8a302" +default-features = false diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml index ac46cd86..8d7710c4 100644 --- a/examples/stm32f7/Cargo.toml +++ b/examples/stm32f7/Cargo.toml @@ -29,8 +29,8 @@ critical-section = "0.2.3" [dependencies.smoltcp] -git = "https://github.com/smoltcp-rs/smoltcp" -rev = "e4241510337e095b9d21136c5f58b2eaa1b78479" +git = "https://github.com/bobmcwhirter/smoltcp" +rev = "faf81d21daae16b650b16e59a8422a8283e8a302" default-features = false features = [ "proto-ipv4", From 436eb81fc2938285c6cd7494e9e256256b836f60 Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Mon, 15 Nov 2021 12:00:26 -0500 Subject: [PATCH 5/6] Adjust for bxcan API. --- examples/stm32f4/src/bin/can.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/stm32f4/src/bin/can.rs b/examples/stm32f4/src/bin/can.rs index 21b9a600..4c575aa8 100644 --- a/examples/stm32f4/src/bin/can.rs +++ b/examples/stm32f4/src/bin/can.rs @@ -26,12 +26,13 @@ fn main() -> ! { let mut can = Can::new(p.CAN1, p.PA11, p.PA12); + can.modify_filters().enable_bank(0, Mask32::accept_all()); + can.modify_config() .set_bit_timing(0x001c0003) // http://www.bittiming.can-wiki.info/ .set_loopback(true) // Receive own frames - .set_silent(true); - can.modify_filters().enable_bank(0, Mask32::accept_all()); - unwrap!(nb::block!(can.enable())); + .set_silent(true) + .enable(); let mut i: u8 = 0; loop { From ee1490bce16d98457c1e67f5c7e9320e4c17e51b Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Mon, 15 Nov 2021 13:18:53 -0500 Subject: [PATCH 6/6] Move to the newly released bxcan crate that supports defmt 0.3. --- embassy-stm32/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 8ed25e11..f074a6b0 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -26,7 +26,7 @@ bare-metal = "1.0.0" atomic-polyfill = "0.1.5" stm32-metapac = { version = "0.1.0", path = "../stm32-metapac", features = ["rt"] } vcell = { version = "0.1.3", optional = true } -bxcan = { git = "https://github.com/bobmcwhirter/bxcan.git", rev="8e011c6e1ecec318da5b8e13ac743ce34e969de9" } +bxcan = "0.6.2" seq-macro = "0.2.2"