diff options
Diffstat (limited to 'examples/boot/bootloader/nrf')
| -rw-r--r-- | examples/boot/bootloader/nrf/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/boot/bootloader/nrf/src/main.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/boot/bootloader/nrf/Cargo.toml b/examples/boot/bootloader/nrf/Cargo.toml index 72b7114d4..1fea2b7d7 100644 --- a/examples/boot/bootloader/nrf/Cargo.toml +++ b/examples/boot/bootloader/nrf/Cargo.toml | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | edition = "2021" | 2 | edition = "2024" |
| 3 | name = "nrf-bootloader-example" | 3 | name = "nrf-bootloader-example" |
| 4 | version = "0.1.0" | 4 | version = "0.1.0" |
| 5 | description = "Bootloader for nRF chips" | 5 | description = "Bootloader for nRF chips" |
diff --git a/examples/boot/bootloader/nrf/src/main.rs b/examples/boot/bootloader/nrf/src/main.rs index b849a0df3..76c4c1048 100644 --- a/examples/boot/bootloader/nrf/src/main.rs +++ b/examples/boot/bootloader/nrf/src/main.rs | |||
| @@ -38,8 +38,8 @@ fn main() -> ! { | |||
| 38 | unsafe { bl.load(active_offset) } | 38 | unsafe { bl.load(active_offset) } |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | #[no_mangle] | 41 | #[unsafe(no_mangle)] |
| 42 | #[cfg_attr(target_os = "none", link_section = ".HardFault.user")] | 42 | #[cfg_attr(target_os = "none", unsafe(link_section = ".HardFault.user"))] |
| 43 | unsafe extern "C" fn HardFault() { | 43 | unsafe extern "C" fn HardFault() { |
| 44 | cortex_m::peripheral::SCB::sys_reset(); | 44 | cortex_m::peripheral::SCB::sys_reset(); |
| 45 | } | 45 | } |
| @@ -47,7 +47,7 @@ unsafe extern "C" fn HardFault() { | |||
| 47 | #[exception] | 47 | #[exception] |
| 48 | unsafe fn DefaultHandler(_: i16) -> ! { | 48 | unsafe fn DefaultHandler(_: i16) -> ! { |
| 49 | const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32; | 49 | const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32; |
| 50 | let irqn = core::ptr::read_volatile(SCB_ICSR) as u8 as i16 - 16; | 50 | let irqn = unsafe { core::ptr::read_volatile(SCB_ICSR) } as u8 as i16 - 16; |
| 51 | 51 | ||
| 52 | panic!("DefaultHandler #{:?}", irqn); | 52 | panic!("DefaultHandler #{:?}", irqn); |
| 53 | } | 53 | } |
