Revert "feat: added log-to-defmt feature"

This reverts commit 6d79c4c81187d5f2704e2d2f72a3deba05ca449a.
This commit is contained in:
Roi Bachynskyi 2025-07-21 10:47:21 +03:00
parent 6d79c4c811
commit 0fc1ab290f
5 changed files with 2 additions and 30 deletions

1
ci.sh
View File

@ -264,7 +264,6 @@ cargo batch \
--- build --release --manifest-path examples/stm32wba/Cargo.toml --target thumbv8m.main-none-eabihf --artifact-dir out/examples/stm32wba \
--- build --release --manifest-path examples/stm32wl/Cargo.toml --target thumbv7em-none-eabi --artifact-dir out/examples/stm32wl \
--- build --release --manifest-path examples/lpc55s69/Cargo.toml --target thumbv8m.main-none-eabihf --artifact-dir out/examples/lpc55s69 \
--- build --release --manifest-path examples/lpc55s69/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nxp/log-to-defmt --artifact-dir out/examples/lpc55s69 \
--- build --release --manifest-path examples/mspm0g3507/Cargo.toml --target thumbv6m-none-eabi --artifact-dir out/examples/mspm0g3507 \
--- build --release --manifest-path examples/mspm0g3519/Cargo.toml --target thumbv6m-none-eabi --artifact-dir out/examples/mspm0g3519 \
--- build --release --manifest-path examples/mspm0l1306/Cargo.toml --target thumbv6m-none-eabi --artifact-dir out/examples/mspm0l1306 \

View File

@ -10,8 +10,6 @@ critical-section = "1.1.2"
embassy-hal-internal = { version = "0.3.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-2"] }
embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
defmt = { version = "1", optional = true }
log = "0.4.27"
log-to-defmt = { version = "0.1.0", optional = true}
## Chip dependencies
lpc55-pac = { version = "0.5.0", optional = true }
@ -32,5 +30,3 @@ unstable-pac = []
#! ### Chip selection features
lpc55 = ["lpc55-pac"]
## Enable debug logs
log-to-defmt = ["dep:log-to-defmt"]

View File

@ -3,6 +3,7 @@
pub mod gpio;
#[cfg(feature = "lpc55")]
pub mod pint;
// This mod MUST go last, so that it sees all the `impl_foo!` macros
#[cfg_attr(feature = "lpc55", path = "chips/lpc55.rs")]
mod chip;
@ -24,10 +25,8 @@ pub fn init(_config: config::Config) -> Peripherals {
{
gpio::init();
pint::init();
#[cfg(feature = "log-to-defmt")]
log_to_defmt::setup();
log::info!("Initialization complete");
}
crate::Peripherals::take()
}

View File

@ -18,9 +18,5 @@ defmt-rtt = "1.0.0"
panic-probe = { version = "1.0.0", features = ["print-defmt"] }
panic-semihosting = "0.6.0"
[features]
## To test all-logs mode
log-to-defmt = ["embassy-nxp/log-to-defmt"]
[profile.release]
debug = 2

View File

@ -1,18 +0,0 @@
/// To test log-to-defmt feature, you have to run the binary file with the corresponding flag
/// Example: cargo run --bin <file> --feature log-to-defmt
#![no_std]
#![no_main]
use log::*;
use embassy_executor::Spawner;
use {defmt_rtt as _, panic_halt as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
info!("Hello World");
loop{
info!("Another test");
}
}