Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/rp2_common/pico_platform_panic/panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -38,17 +37,17 @@ 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

"push {lr}\n"
#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
:
Expand Down
Loading