You can chat about native SDK questions and issues here.

User avatar
By zerous
#85589 Hi,

I would like to use esp-gdbstub(https://github.com/espressif/esp-gdbstub) with ESP8266_RTOS_SDK (https://github.com/espressif/ESP8266_RTOS_SDK). I have tried to make the necessary changes to have it compiled as a component in my project. But I get the following error during compilation:
/home/zerous/src/meshle/mesgw/build/gdbstub/libgdbstub.a(gdbstub-entry.o): In function `noIcountReset':
/home/zerous/src/meshle/mesgw/components/gdbstub/gdbstub-entry.S:117:(.text+0x6d): dangerous relocation: call0: \
call target out of range: gdbstub_handle_debug_exception
/home/zerous/src/meshle/mesgw/build/gdbstub/libgdbstub.a(gdbstub-entry.o): In function `gdbstub_user_exception_e\
ntry':
/home/zerous/src/meshle/mesgw/components/gdbstub/gdbstub-entry.S:235:(.text+0x129): dangerous relocation: call0:\
call target out of range: gdbstub_handle_user_exception
/home/zerous/src/meshle/mesgw/build/gdbstub/libgdbstub.a(gdbstub.o):(.irom0.literal+0x4): undefined reference to\
`user_fatal_exception_handler'
collect2: error: ld returned 1 exit status
make: *** [/home/zerous/src/esp/ESP8266_RTOS_SDK/make/project.mk:510: /home/zerous/src/meshle/mesgw/build/mqtt_d\
emo.elf] Error 1

Please let me know if I am doing something wrong.
User avatar
By smacl61
#85805 I have been attempting the same thing in debian but I'm having issues as well. This whole debug thing appears to not be documented very well or not at all for the latest ESP8266_RTOS_sdk.
Here are things I found out by experimentation.

1) The GDNStub code appears to be included into the SDK although the assembly file is not preset. Not sure if you need to include the stub source code in the compiling directory.

2) I did get as far as being able to call extensa-lx106-elf-gdb after compiling using it the same way as in the arduino example and got to the point specifying the remote /ttyUSB0 where it just hangs. I read a comment that it usually means it cannot find the GDBStub code.

3) Tried above in eclipse neon. Compiles fine. when I specify the debug configuration with xtensa-lx106-elf-gdb I get an error and no longer can compile due to reference errors. Go figure.

4) after playing with this for a week I can conclude debug function is not yet working in v3 sdk as I have not found anyone saying they got it to work. I'm giving up and going to sming with the non rtos sdk as it looks like more people have gotten it to work.