make panic loop back to breakpoint FWIW, and remove spurious header (#2062)

This commit is contained in:
Graham Sanderson 2024-11-21 10:00:38 -06:00 committed by GitHub
parent f3459a45d4
commit 31c1be5d5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,6 @@
#include <sys/cdefs.h>
#include <unistd.h>
#include "pico.h"
#include "pico/platform/panic.h"
#if LIB_PICO_PRINTF_PICO
#include "pico/printf.h"
@ -38,8 +37,8 @@ void __attribute__((naked, noreturn)) __printflike(1, 0) panic(__unused const ch
#if !PICO_PANIC_FUNCTION_EMPTY
"jal " __XSTRING(PICO_PANIC_FUNCTION) "\n"
#endif
"ebreak\n"
"1: j 1b\n"
"1: ebreak\n"
"j 1b\n"
#else
@ -47,8 +46,8 @@ void __attribute__((naked, noreturn)) __printflike(1, 0) panic(__unused const ch
#if !PICO_PANIC_FUNCTION_EMPTY
"bl " __XSTRING(PICO_PANIC_FUNCTION) "\n"
#endif
"bkpt #0\n"
"1: b 1b\n" // loop for ever as we are no return
"1: bkpt #0\n"
"b 1b\n" // loop for ever as we are no return
#endif
: