Skip to content

Commit 31c1be5

Browse files
authored
make panic loop back to breakpoint FWIW, and remove spurious header (#2062)
1 parent f3459a4 commit 31c1be5

File tree

1 file changed

+4
-5
lines changed
  • src/rp2_common/pico_platform_panic

1 file changed

+4
-5
lines changed

src/rp2_common/pico_platform_panic/panic.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <sys/cdefs.h>
1010
#include <unistd.h>
1111
#include "pico.h"
12-
#include "pico/platform/panic.h"
1312

1413
#if LIB_PICO_PRINTF_PICO
1514
#include "pico/printf.h"
@@ -38,17 +37,17 @@ void __attribute__((naked, noreturn)) __printflike(1, 0) panic(__unused const ch
3837
#if !PICO_PANIC_FUNCTION_EMPTY
3938
"jal " __XSTRING(PICO_PANIC_FUNCTION) "\n"
4039
#endif
41-
"ebreak\n"
42-
"1: j 1b\n"
40+
"1: ebreak\n"
41+
"j 1b\n"
4342

4443
#else
4544

4645
"push {lr}\n"
4746
#if !PICO_PANIC_FUNCTION_EMPTY
4847
"bl " __XSTRING(PICO_PANIC_FUNCTION) "\n"
4948
#endif
50-
"bkpt #0\n"
51-
"1: b 1b\n" // loop for ever as we are no return
49+
"1: bkpt #0\n"
50+
"b 1b\n" // loop for ever as we are no return
5251

5352
#endif
5453
:

0 commit comments

Comments
 (0)