-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Using GDB for online debugging ESP8266 #2663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
GDBStub will be invoked when exception happens, as in its current configuration it supports only post-mortem debugging. GDBStub has a feature to break into debugger on Ctrl-C (in uart console, not in GDB), but it has to be activated in GDBStub, and it may conflict with HardwareSerial which also installs its own UART interrupt handler. I once added a "break into debugger on button" hack to GDBStub, it requires replacing UART interrupt with a GPIO interrupt. You can try that if you like. |
Thanks for reply. I was thinking of kind of debugging that does not happen on some kind of exception but rather possibility investigate live-state of variables. Preferably I would like to achieve an effect like described in this tutorial for Sming( Eclipse/CLion integration etc): https://blog.attachix.com/live-debugging-with-open-source-tools-programming-for-esp8266-part-4/ In what way it's possible yo replace the interrupt ? |
I cannot follow all the details and implications of the discussion above, but I observe that from version 2.0 on, debugging as it worked so far (v1.6) isnt functioning anymore in the latest versions. I.e. Setting breakpoints, inspect variables, stepping....etc...were very nice featues! why has that been changed? Or do I need some configuration tweeking to enable debugging? May we expect a solution to this issue soon? Or a more detailed documentation on how to configure application level debugging? No is also an answer :) |
I solved my issue see: Sloeber/arduino-eclipse-plugin#593 |
@w2k is this issue still valid? Have you tried latest git? |
Same issue using 2.4.0rc1, (is that the latest git?) but as reported earlier in this thread my issue can be closed. |
Basic Infos
Hardware
Hardware: ESP8266 (NodeMCU)
Description
Problem description
For couple of days I've been struggling to configure debugging for ESP8266 running on Arduino and using PlatformIO.
I managed to build a proper binary file with http://blog.squix.org/2016/04/esp8266-offline-debugging-with.html:
2.Downloaded full xtensa SDK as this provided for PIO does not include xtensa GDB
Thanks to these steps I am able to offline debug - see lines numbers etc,but I cannot make it work with online debugging. Here is what i ve done:
Can someone pint me what I'm mising ? I have 2 suspicions :
I am using Windows.
After some reading I changed build flags to :
build_flags = -Og -ggdb -DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM
Module: NODEMCUv2 / ESP12E
Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: