Page 1 of 1

Can GNU MCU Eclipse be used to debug ESP32?

Posted: Tue Dec 05, 2017 12:28 am
by i_am_mrp
I am using Eclipse HW Debugging plugin with the Espressif ESP32 Wrover kit board.

So far, this combination is incredibly unstable (frequent Eclipse hangs or random GDB disconnects, etc..), so I am searching for alternatives or hints/configuration to make things more stable.

Re: Can GNU MCU Eclipse be used to debug ESP32?

Posted: Tue Dec 05, 2017 7:10 am
by iot-bits.com
I noticed that manually resetting the ESP32 just before launching the debugger helps.
But it is not just Eclipse, same is the case with VisualGDB on Visual Studio.
Probably has something to do with lack of proper support for the reset line driving for ESP32?

Re: Can GNU MCU Eclipse be used to debug ESP32?

Posted: Tue Dec 05, 2017 9:02 pm
by i_am_mrp
Thanks for the hint.

Yes, in general I have to power reset the ESP32 before I can debug again.

The ESP-IDF debugging documentation http://esp-idf.readthedocs.io/en/latest ... g-debugger suggests using:
mon reset halt
x $a1=0
The somewhat cryptic "x $a1=0" is described at: http://esp-idf.readthedocs.io/en/latest ... uirks.html as a way to force GDB to get new state from the target. I don't think it does and/or always works since we have to power reset nearly every time before OpenOCD can start and then debug again.

My stability issues deal with unexpected break/watch points being triggered in FreeRTOS code even though no breaks/watches were set in that code. Resuming debug execution (or single-step, step over, step into, step out of) all result in an approx a 10 second pause and then the debug session is disconnected.