]> granicus.if.org Git - esp-idf/commitdiff
Fix: Return after setting breakpoint when ocd is detected instead of continuing into...
authorJeroen Domburg <git@j0h.nl>
Tue, 30 Aug 2016 09:55:20 +0000 (17:55 +0800)
committerJeroen Domburg <git@j0h.nl>
Tue, 30 Aug 2016 09:55:20 +0000 (17:55 +0800)
components/freertos/panic.c

index 4c0f8fcaccc21c8040292cbe2060b0c072c8e046..e3725de61c8ada6fa765c4f6d89d809d5ec34787 100644 (file)
@@ -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);