diff --git a/embassy-boot/boot/src/firmware_updater.rs b/embassy-boot/boot/src/firmware_updater.rs index 92987825..aeea206f 100644 --- a/embassy-boot/boot/src/firmware_updater.rs +++ b/embassy-boot/boot/src/firmware_updater.rs @@ -40,6 +40,7 @@ pub struct FirmwareUpdater { dfu: Partition, } +#[cfg(target_os = "none")] impl Default for FirmwareUpdater { fn default() -> Self { extern "C" { diff --git a/embassy-boot/nrf/src/lib.rs b/embassy-boot/nrf/src/lib.rs index 14bea1f7..710798bd 100644 --- a/embassy-boot/nrf/src/lib.rs +++ b/embassy-boot/nrf/src/lib.rs @@ -15,6 +15,7 @@ pub struct BootLoader { aligned_buf: AlignedBuffer, } +#[cfg(target_os = "none")] impl Default for BootLoader { /// Create a new bootloader instance using parameters from linker script fn default() -> Self { diff --git a/embassy-boot/rp/src/lib.rs b/embassy-boot/rp/src/lib.rs index 0d577f08..fb9bc324 100644 --- a/embassy-boot/rp/src/lib.rs +++ b/embassy-boot/rp/src/lib.rs @@ -51,6 +51,7 @@ impl BootLoader { } } +#[cfg(target_os = "none")] impl Default for BootLoader { /// Create a new bootloader instance using parameters from linker script fn default() -> Self { diff --git a/embassy-boot/stm32/src/lib.rs b/embassy-boot/stm32/src/lib.rs index 88ce1c87..ccf136c7 100644 --- a/embassy-boot/stm32/src/lib.rs +++ b/embassy-boot/stm32/src/lib.rs @@ -46,6 +46,7 @@ impl BootLoader { } } +#[cfg(target_os = "none")] impl Default for BootLoader { /// Create a new bootloader instance using parameters from linker script fn default() -> Self {