diff --git a/embassy-boot/boot/src/firmware_updater.rs b/embassy-boot/boot/src/firmware_updater.rs index 92987825f..aeea206f9 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 14bea1f79..710798bdb 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 0d577f08a..fb9bc3242 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 88ce1c878..ccf136c74 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 {