espressif / esp-gdbstub

Other
162 stars 38 forks source link

Using GDB for online debugging ESP8266 #10

Open tomaszchacuk opened 8 years ago

tomaszchacuk commented 8 years ago

Hi,

For a 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:

  1. Added build_flags = -Og -ggdb -DDEBUG_ESP_PORT=Serial to platformio.ini 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:
  2. Added GDBStub.h include to my main class
  3. Started GDB with firmware that has debugging symbols included(from step 1) to debug via COM - set ,baud rate to 115200 (the same as I use for normal state check via serial monitor - wifi messages etc.) .
  4. I get no response - only timeouts etc
  5. In the result, I would like to use CLion to insert breakpoints watches etc.

Can someone pint me what I'm missing ? I have 2 suspicions :

I am using Windows.

aschoepfer commented 8 years ago

Hello

I have a similar problem, I tried to integrade GDB in my PlatformIO project using the ESP8266. It seems that I don't managed to add the full xtensa toolchain. As soon I call gdb_init, there are further files missing.. It would be nice if the needed GDB ressources (full xtensa-toolchain) would be already integrated in PlatformIO.