diff options
| author | Rasmus Melchior Jacobsen <[email protected]> | 2023-05-22 11:32:39 +0200 |
|---|---|---|
| committer | Rasmus Melchior Jacobsen <[email protected]> | 2023-05-22 11:32:39 +0200 |
| commit | 18c62aa5b475161c0cbd98c23c006691e084cb2b (patch) | |
| tree | 24428457642306f1bee8182ffe58da9a03e7554c /embassy-boot/boot/src | |
| parent | d55b9bc6e2de528e1351b992bb30f54ec6f76b6d (diff) | |
Protect default implementations for FirmwareUpdater and BootLoader
It seems as if the arm compiler can does not care about whether the bootloader symbols are undefined if the default() function is never used. The x64 compiler does care however, so this change ensures that we can instantiate the types from tests.
Diffstat (limited to 'embassy-boot/boot/src')
| -rw-r--r-- | embassy-boot/boot/src/firmware_updater.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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 { | |||
| 40 | dfu: Partition, | 40 | dfu: Partition, |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | #[cfg(target_os = "none")] | ||
| 43 | impl Default for FirmwareUpdater { | 44 | impl Default for FirmwareUpdater { |
| 44 | fn default() -> Self { | 45 | fn default() -> Self { |
| 45 | extern "C" { | 46 | extern "C" { |
