Skip to content
Snippets Groups Projects
Commit 51156c65 authored by Matt Johnston's avatar Matt Johnston
Browse files

Fix building picow demo with defmt disabled.

Some dep crates are still always using defmt though, needs fixing.
parent 3a5de792
No related merge requests found
...@@ -22,8 +22,8 @@ menu = "0.3" ...@@ -22,8 +22,8 @@ menu = "0.3"
embedded-io = { version = "0.4", features = ["async"] } embedded-io = { version = "0.4", features = ["async"] }
defmt = { version = "0.3", optional = true } defmt = { version = "0.3", optional = true }
log = { version = "0.4", optional = true } log = "0.4"
[features] [features]
defmt = ["dep:defmt", "embassy-net/defmt", "embedded-io/defmt"] defmt = ["dep:defmt", "embassy-net/defmt", "embedded-io/defmt"]
log = ["dep:log", "embassy-net/log"] log = ["embassy-net/log"]
...@@ -10,7 +10,7 @@ edition = "2021" ...@@ -10,7 +10,7 @@ edition = "2021"
sunset-embassy = { path = "../../" } sunset-embassy = { path = "../../" }
sunset = { path = "../../.." } sunset = { path = "../../.." }
sunset-sshwire-derive = { version = "0.1", path = "../../../sshwire-derive" } sunset-sshwire-derive = { version = "0.1", path = "../../../sshwire-derive" }
sunset-demo-embassy-common= { path = "../common", features = ["defmt"] } sunset-demo-embassy-common= { path = "../common" }
cyw43 = { git = "https://github.com/embassy-rs/cyw43/", rev = "6b5d9642d583bc034ee35b88c903545e7f423b4e", features = ["defmt"]} cyw43 = { git = "https://github.com/embassy-rs/cyw43/", rev = "6b5d9642d583bc034ee35b88c903545e7f423b4e", features = ["defmt"]}
cyw43-pio = { git = "https://github.com/embassy-rs/cyw43/", rev = "6b5d9642d583bc034ee35b88c903545e7f423b4e" } cyw43-pio = { git = "https://github.com/embassy-rs/cyw43/", rev = "6b5d9642d583bc034ee35b88c903545e7f423b4e" }
...@@ -29,9 +29,10 @@ embassy-usb = { version = "0.1.0" } ...@@ -29,9 +29,10 @@ embassy-usb = { version = "0.1.0" }
atomic-polyfill = "0.1.5" atomic-polyfill = "0.1.5"
static_cell = "1.0" static_cell = "1.0"
defmt = "0.3" defmt = { version = "0.3", optional = true }
defmt-rtt = "0.3" defmt-rtt = "0.3"
panic-probe = { version = "0.3", features = ["print-defmt"] } panic-probe = { version = "0.3", features = ["print-defmt"] }
log = { version = "0.4" }
cortex-m = { version = "0.7.6", features = ["critical-section-single-core"]} cortex-m = { version = "0.7.6", features = ["critical-section-single-core"]}
cortex-m-rt = "0.7.0" cortex-m-rt = "0.7.0"
...@@ -54,7 +55,7 @@ sha2 = { version = "0.10", default-features = false } ...@@ -54,7 +55,7 @@ sha2 = { version = "0.10", default-features = false }
[features] [features]
default = ["defmt", "sunset-demo-embassy-common/defmt", "embassy-usb/defmt"] default = ["defmt", "sunset-demo-embassy-common/defmt", "embassy-usb/defmt"]
defmt = [] defmt = ["dep:defmt"]
# Use cyw43 firmware already on flash. This saves time when developing. # Use cyw43 firmware already on flash. This saves time when developing.
# probe-rs-cli download firmware/43439A0.bin --format bin --chip RP2040 --base-address 0x10100000 # probe-rs-cli download firmware/43439A0.bin --format bin --chip RP2040 --base-address 0x10100000
......
...@@ -3,7 +3,14 @@ use { ...@@ -3,7 +3,14 @@ use {
sunset::error::{Error, Result, TrapBug}, sunset::error::{Error, Result, TrapBug},
}; };
use defmt::{debug, info, warn, error, trace}; #[cfg(not(feature = "defmt"))]
pub use {
log::{debug, error, info, log, trace, warn},
};
#[allow(unused_imports)]
#[cfg(feature = "defmt")]
pub use defmt::{debug, info, warn, panic, error, trace};
use embassy_rp::flash::{Flash, ERASE_SIZE, FLASH_BASE}; use embassy_rp::flash::{Flash, ERASE_SIZE, FLASH_BASE};
use embassy_rp::peripherals::FLASH; use embassy_rp::peripherals::FLASH;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment