diff options
| author | Raul Alimbekov <[email protected]> | 2025-12-16 09:05:22 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-16 09:05:22 +0300 |
| commit | c9a04b4b732b7a3b696eb8223664c1a7942b1875 (patch) | |
| tree | 6dbe5c02e66eed8d8762f13f95afd24f8db2b38c /examples/boot/bootloader/rp/src/main.rs | |
| parent | cde24a3ef1117653ba5ed4184102b33f745782fb (diff) | |
| parent | 5ae6e060ec1c90561719aabdc29d5b6e7b8b0a82 (diff) | |
Merge branch 'main' into main
Diffstat (limited to 'examples/boot/bootloader/rp/src/main.rs')
| -rw-r--r-- | examples/boot/bootloader/rp/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/boot/bootloader/rp/src/main.rs b/examples/boot/bootloader/rp/src/main.rs index 25b1657b8..7ebefd374 100644 --- a/examples/boot/bootloader/rp/src/main.rs +++ b/examples/boot/bootloader/rp/src/main.rs | |||
| @@ -34,8 +34,8 @@ fn main() -> ! { | |||
| 34 | unsafe { bl.load(embassy_rp::flash::FLASH_BASE as u32 + active_offset) } | 34 | unsafe { bl.load(embassy_rp::flash::FLASH_BASE as u32 + active_offset) } |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | #[no_mangle] | 37 | #[unsafe(no_mangle)] |
| 38 | #[cfg_attr(target_os = "none", link_section = ".HardFault.user")] | 38 | #[cfg_attr(target_os = "none", unsafe(link_section = ".HardFault.user"))] |
| 39 | unsafe extern "C" fn HardFault() { | 39 | unsafe extern "C" fn HardFault() { |
| 40 | cortex_m::peripheral::SCB::sys_reset(); | 40 | cortex_m::peripheral::SCB::sys_reset(); |
| 41 | } | 41 | } |
| @@ -43,7 +43,7 @@ unsafe extern "C" fn HardFault() { | |||
| 43 | #[exception] | 43 | #[exception] |
| 44 | unsafe fn DefaultHandler(_: i16) -> ! { | 44 | unsafe fn DefaultHandler(_: i16) -> ! { |
| 45 | const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32; | 45 | const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32; |
| 46 | let irqn = core::ptr::read_volatile(SCB_ICSR) as u8 as i16 - 16; | 46 | let irqn = unsafe { core::ptr::read_volatile(SCB_ICSR) } as u8 as i16 - 16; |
| 47 | 47 | ||
| 48 | panic!("DefaultHandler #{:?}", irqn); | 48 | panic!("DefaultHandler #{:?}", irqn); |
| 49 | } | 49 | } |
