need help using gdbstub

stevem
Posts: 3
Joined: Mon Jan 02, 2017 12:08 pm

need help using gdbstub

Postby stevem » Sun Jan 08, 2017 3:50 pm

Managed to get up and running with examples from esp-idf so I am able to make flash etc.

git cloned and built opensdk (pfalcon).

git cloned gdbstub as subproject of myapp (derived from esp template) but can't figure out the correct way to integrate, in particular, (from gdbstub README):

* Modify your Makefile. You'll need to include the gdbstub sources: if your Makefile is structured like the
ones in the Espressif examples, you can add `gdbstub` to the `SUBDIRS` define and `gdbstub/libgdbstub.a` to the
`COMPONENTS_eagle.app.v6` define. Also, you probably want to add `-ggdb` to your compiler flags (`TARGET_LDFLAGS`)
and, if you are debugging, change any optimation flags (-Os, -O2 etc) into `-Og`. Finally, make sure your Makefile
also compiles .S files.

I've added SUBDIRS in myapp makefile; can't see any evidence of gdbstub being built in response to this though. Can't find libgdbstub.a

Can anybody give a noob some help, please?

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: need help using gdbstub

Postby kolban » Sun Jan 08, 2017 8:10 pm

@stevem,
Could you be getting confused over the ESP8266 vs the ESP32? This forum is about the ESP32 device which is very distinct from the ESP8266. The "pfalcon/eps-open-sdk" seems to be dedicated to the ESP8266 ... see:

https://github.com/pfalcon/esp-open-sdk
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: need help using gdbstub

Postby ESP_Sprite » Mon Jan 09, 2017 3:35 am

Kolban is on point here: esp-opensdk as well as the gdbstub you mention are both esp8266-only. Esp-idf integrates its own gdbstub, although it is for forensc purposes only (as in: it only starts when your ESP32 panics or crashes.) You can enable it by doing a 'make menuconfig' and setting 'component config' ->'ESP32-specific config' -> 'Panic handler behaviour' to 'Invoke GDBStub'. If you need 'live' debugging as well, please look at the docs/openocd.rst document; it describes how to set up JTAG debugging.

stevem
Posts: 3
Joined: Mon Jan 02, 2017 12:08 pm

Re: need help using gdbstub

Postby stevem » Sat Jan 14, 2017 12:00 pm

@kolban , @ESP_Sprite

:oops:

thanks guys

Who is online

Users browsing this forum: No registered users and 149 guests