From c6394ed2cec594947da782b49b86699186a6359c Mon Sep 17 00:00:00 2001 From: Jeroen Domburg Date: Tue, 30 Aug 2016 17:55:20 +0800 Subject: [PATCH] Fix: Return after setting breakpoint when ocd is detected instead of continuing into the panic routine --- components/freertos/panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/freertos/panic.c b/components/freertos/panic.c index 4c0f8fcacc..e3725de61c 100644 --- a/components/freertos/panic.c +++ b/components/freertos/panic.c @@ -150,7 +150,6 @@ static void setFirstBreakpoint(uint32_t pc) { "or a4, a4, a3\n" \ "wsr.ibreakenable a4\n" \ ::"r"(pc):"a3","a4"); - return; } void xt_unhandled_exception(XtExcFrame *frame) { @@ -170,6 +169,7 @@ void xt_unhandled_exception(XtExcFrame *frame) { //Stick a hardware breakpoint on the address the handler returns to. This way, the OCD debugger //will kick in exactly at the context the error happened. setFirstBreakpoint(regs[1]); + return; } panicPutStr(". Exception was unhandled.\r\n"); commonErrorHandler(frame);