From 0b7a929ec62dc11a4b6d5f11fb2ac971dc41c0db Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Tue, 10 Feb 2015 13:09:43 +0100 Subject: [PATCH] cortex-m4_common: Add debugger break in crash.c --- cpu/cortex-m4_common/crash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu/cortex-m4_common/crash.c b/cpu/cortex-m4_common/crash.c index e00842272e..c329272397 100644 --- a/cpu/cortex-m4_common/crash.c +++ b/cpu/cortex-m4_common/crash.c @@ -52,6 +52,8 @@ NORETURN void core_panic(int crash_code, const char *message) /* disable watchdog and all possible sources of interrupts */ disableIRQ(); #if DEVELHELP + /* The bkpt instruction will signal to the debugger to break here. */ + __ASM("bkpt #0"); /* enter infinite loop, into deepest possible sleep mode */ while (1) { lpm_set(LPM_OFF);