Can not Debugging esp8266 using esp-gdbstub

Pratik_yadav
Posts: 2
Joined: Thu Sep 21, 2017 3:18 pm

Can not Debugging esp8266 using esp-gdbstub

Postby Pratik_yadav » Thu Sep 21, 2017 6:55 pm

Hello,

I have implement esp-gdbstub as per instruction given in Read-me file.
I have made changes related to gdbstub in my make file is as following:

Code: Select all

CFLAGS = -Og -ggdb



GDBSTUBFILES := $(wildcard ./gdbstub_files/*)GDBOBJFILES = $(subst $(GDBSTUBSRC),$(GDBSTUB_BUILD),$(GDBSTUBSRC:%.S=%.o))
GDBOBJFILES += $(subst $(GDBSTUBSRC),$(GDBSTUB_BUILD),$(GDBSTUBSRC:%.c=%.o))
GDBSTUBSRC = $(filter %.c %.S,$(GDBSTUBFILES))


@-mkdir -p $(GDBSTUB_BUILD)
./gdbstub_build/gdbstub_files/gdbstub-entry.o : ./gdbstub_files/gdbstub-entry.S
@echo "this is inside making of gdbstub-entry.o"
mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@

./gdbstub_build/gdbstub_files/gdbstub.o : ./gdbstub_files/gdbstub.c
@echo "this is inside making of gdbstub.c"
mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@




After changing make file I have include "gdbstub.h" in main file and called gdbstub_init().

To test its working i have created task which generate fatal exception.

I compile my project and flash it into esp8266.

and Hit following command as given by "https://blog.attachix.com/live-debugging-with-open-source-tools-programming-for-esp8266-part-4/"

Code: Select all

xtensa-lx106-elf-gdb -b 115200


(gdb) file out/build/app.out

(gdb) set remote hardware-breakpoint-limit 1
(gdb) set remote hardware-watchpoint-limit 1
(gdb) set debug xtensa 4


(gdb) target remote /dev/ttyUSB0



After Hitting last command my terminal gives following output:


Remote debugging using /dev/ttyUSB0
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Bogus trace status reply from target: timeout


Is there anything i am missing?
Please help anyone.

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: Can not Debugging esp8266 using esp-gdbstub

Postby Her Mary » Mon Sep 25, 2017 10:50 am

Maybe open an issue on github is a better choice https://github.com/espressif/esp-gdbstub/issues.

Pratik_yadav
Posts: 2
Joined: Thu Sep 21, 2017 3:18 pm

Re: Can not Debugging esp8266 using esp-gdbstub

Postby Pratik_yadav » Mon Sep 25, 2017 8:13 pm

@ Her Majesty

Thanks for your advice. I opened issue on https://github.com/espressif/esp-gdbstub/issues/16

Who is online

Users browsing this forum: No registered users and 120 guests