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

User avatar
rajkumar patel
Posts: 29
Joined: Mon Apr 10, 2017 12:43 pm
Location: india

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

Postby rajkumar patel » Mon Apr 10, 2017 1:15 pm

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.
Regards,
Rajkumar M. Patel

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

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

Postby ESP_Sprite » Tue Apr 11, 2017 1:52 am

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.

User avatar
rajkumar patel
Posts: 29
Joined: Mon Apr 10, 2017 12:43 pm
Location: india

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

Postby rajkumar patel » Tue Apr 11, 2017 5:32 am

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.
Regards,
Rajkumar M. Patel

Who is online

Users browsing this forum: No registered users and 188 guests