diff --git a/src/runtime/src/panic.rs b/src/runtime/src/panic.rs index c0566fc..58365ba 100644 --- a/src/runtime/src/panic.rs +++ b/src/runtime/src/panic.rs @@ -42,9 +42,6 @@ fn panic(info: &core::panic::PanicInfo) -> ! { let mut err_led = ErrorLED::error_led(); err_led.toggle(true); } - if !soft_panicked && id == 0 { - soft_panic(info); - } println!("Backtrace: "); let _ = backtrace(|ip| { // Backtrace gives us the return address, i.e. the address after the delay slot, @@ -52,6 +49,9 @@ fn panic(info: &core::panic::PanicInfo) -> ! { print!("{:#08x} ", ip - 2 * 4); }); println!("\nEnd backtrace"); + if !soft_panicked && id == 0 { + soft_panic(info); + } loop {} }