Page 1 of 1

can we use xtensa-esp32-elf-gdb.exe for esp8266 as well?

Posted: Mon Apr 10, 2017 1:15 pm
by rajkumar patel
hi,

i'm using ESP8266 RTOS SDK V1.5.0 and i wanna deal with some debugging stuff. so, in xtensa tool chain i ain't finding any gdb tool, so i gave a shot to xtensa-esp32-elf-gdb.exe(xtensa gdb for esp32) to debug using app1.out(elf file) file which gets created in build folder in my sdk.
i tried to use some commands like setting breakpoints, which works fine, but when i try for RUN and START command for gdb, it's coming like,
"don't know how to use run. try 'help target '."
prompted messages are not giving clear idea about further process.
so, how to continue further debugging thing? i'm kind of stuck there.

same thing i've tried with esp32 as well, but getting the same message.

please reply your suggestions if you've already dealt with same thing.

thanks for stopping by and for your patience.

Re: can we use xtensa-esp32-elf-gdb.exe for esp8266 as well?

Posted: Tue Apr 11, 2017 1:52 am
by ESP_Sprite
No, you cannot, while similar, the CPU cores are different enough to warrant a different GDB. For hooking up GDB to the ESP32, you can use JTAG using OpenOCD (more info here) or you can use GDBStub; the easiest way to use that in the latest esp-idf is to enable it and run 'make monitor'; a crash will drop you into gdb automatically.

The ESP8266 also has a gdbstub available, but it's not part of the SDK; you can grab it here. Someone also worked on an OpenOCD port to the 8266, but I'm not sure where to get that.

Re: can we use xtensa-esp32-elf-gdb.exe for esp8266 as well?

Posted: Tue Apr 11, 2017 5:32 am
by rajkumar patel
thanks ESP_Sprite for this much quick and to the point response.
i think, i'll give a try to gdbstub which you've suggested for esp8266 in your reply.

i'll be looking forward for your such precious advice.

once again, thanks a lot.