diff options
| author | Ulf Lilleengen <[email protected]> | 2024-09-19 09:15:55 +0200 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2024-09-19 09:22:47 +0200 |
| commit | 4e1efd93fd4dc8dd692daf419d901ae22413e091 (patch) | |
| tree | 3c453373e1c443121ee4e18e3d2c482e41c3b971 /examples/boot | |
| parent | df23a77bfc3c8b5d8ab6adbd12842fa4cfe3675d (diff) | |
Fix defmt support for example boot app
Diffstat (limited to 'examples/boot')
| -rw-r--r-- | examples/boot/application/nrf/build.rs | 3 | ||||
| -rw-r--r-- | examples/boot/application/nrf/src/bin/a.rs | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/examples/boot/application/nrf/build.rs b/examples/boot/application/nrf/build.rs index cd1a264c4..e1da69328 100644 --- a/examples/boot/application/nrf/build.rs +++ b/examples/boot/application/nrf/build.rs | |||
| @@ -31,4 +31,7 @@ fn main() { | |||
| 31 | 31 | ||
| 32 | println!("cargo:rustc-link-arg-bins=--nmagic"); | 32 | println!("cargo:rustc-link-arg-bins=--nmagic"); |
| 33 | println!("cargo:rustc-link-arg-bins=-Tlink.x"); | 33 | println!("cargo:rustc-link-arg-bins=-Tlink.x"); |
| 34 | if env::var("CARGO_FEATURE_DEFMT").is_ok() { | ||
| 35 | println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); | ||
| 36 | } | ||
| 34 | } | 37 | } |
diff --git a/examples/boot/application/nrf/src/bin/a.rs b/examples/boot/application/nrf/src/bin/a.rs index 60cf3cd1a..2c1d1a7bb 100644 --- a/examples/boot/application/nrf/src/bin/a.rs +++ b/examples/boot/application/nrf/src/bin/a.rs | |||
| @@ -2,13 +2,15 @@ | |||
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![macro_use] | 3 | #![macro_use] |
| 4 | 4 | ||
| 5 | #[cfg(feature = "defmt")] | ||
| 6 | use defmt_rtt as _; | ||
| 7 | use embassy_boot::State; | ||
| 5 | use embassy_boot_nrf::{FirmwareUpdater, FirmwareUpdaterConfig}; | 8 | use embassy_boot_nrf::{FirmwareUpdater, FirmwareUpdaterConfig}; |
| 6 | use embassy_embedded_hal::adapter::BlockingAsync; | 9 | use embassy_embedded_hal::adapter::BlockingAsync; |
| 7 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 8 | use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; | 11 | use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; |
| 9 | use embassy_nrf::nvmc::Nvmc; | 12 | use embassy_nrf::nvmc::Nvmc; |
| 10 | use embassy_nrf::wdt::{self, Watchdog}; | 13 | use embassy_nrf::wdt::{self, Watchdog}; |
| 11 | use embassy_boot::State; | ||
| 12 | use embassy_sync::mutex::Mutex; | 14 | use embassy_sync::mutex::Mutex; |
| 13 | use panic_reset as _; | 15 | use panic_reset as _; |
| 14 | 16 | ||
