Fix defmt support for example boot app

This commit is contained in:
Ulf Lilleengen 2024-09-19 09:15:55 +02:00
parent df23a77bfc
commit 4e1efd93fd
2 changed files with 6 additions and 1 deletions

View File

@ -31,4 +31,7 @@ fn main() {
println!("cargo:rustc-link-arg-bins=--nmagic");
println!("cargo:rustc-link-arg-bins=-Tlink.x");
if env::var("CARGO_FEATURE_DEFMT").is_ok() {
println!("cargo:rustc-link-arg-bins=-Tdefmt.x");
}
}

View File

@ -2,13 +2,15 @@
#![no_main]
#![macro_use]
#[cfg(feature = "defmt")]
use defmt_rtt as _;
use embassy_boot::State;
use embassy_boot_nrf::{FirmwareUpdater, FirmwareUpdaterConfig};
use embassy_embedded_hal::adapter::BlockingAsync;
use embassy_executor::Spawner;
use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull};
use embassy_nrf::nvmc::Nvmc;
use embassy_nrf::wdt::{self, Watchdog};
use embassy_boot::State;
use embassy_sync::mutex::Mutex;
use panic_reset as _;