Page 1 of 1

Is it possible to set break point and restart app only through serial monitor

Posted: Tue Nov 28, 2017 9:34 am
by Gfast2
Hi ESP-IDF, gfast2 here again. :P

It takes time to setup JTAG Debugger.

I just wunder if it is still possible after I encounter core panic and trigger the gdb in serial monitor, I still have some interaction with my app on ESP32. For instance, I can list where I was, or info locals to list local variable values.

But say how to break fileToSetBreakPoint.c 123, and send command to let gdb restart the app? :?:

(P.s: I did spent sometime on reading doc "How to Debugging" :mrgreen: )

Cheers

Gfast2

Re: Is it possible to set break point and restart app only through serial monitor

Posted: Tue Nov 28, 2017 12:20 pm
by ESP_Sprite
You can't; the serial gdb stub is forensic-only, as in you can only use it to inspect the state of the crashed code, not resume it. If you need a breakpoint, you can actually do this in code (see esp32/panic.c, function setFirstBreakpoint for an example) but again, as soon as you hit the breakpoint you need to restart the ESP32 to continue.

Re: Is it possible to set break point and restart app only through serial monitor

Posted: Tue Nov 28, 2017 12:56 pm
by Gfast2
Hi Esp_Sprite,

Thanks for your clear answer!

It looks like I do need hook a OpenOCD for my debug. Its really get messy here! Without a debugging tool, port "open62541" library is the mission impossible... :cry:

Cheers

Gfast2