Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By smh
#45463 So my project compiles fine with the esp-open-sdk aand I'm trying to include the gdbstub from Espressif - https://github.com/espressif/esp-gdbstub - but I'm having a bit of trouble.

I've done the following:
    - cloned the gdbstub repo to the root of my project
    - changed the directory name from esp-gdbstub to gdbstub
Makefile
    - added 'gdbstub' to the subdirs (EXTRA_INCDIR)
    - added '-ggdb' to the linker flags (LDFLAGS)
gdbstub/gdbstub-cfg.h
    - changed the freertos define to 0 (not using that)
user_main.c
    - added '#include <../gdbstub/gdbstub.h>'
    - added 'gdbstub_init();' somewhere inside user_init()

When I (try to) compile I get the following:
build/app.a(user_main.o):(.text+0x20): undefined reference to `gdbstub_init'
build/app.a(user_main.o):(.text+0x44): undefined reference to `gdbstub_init'

So it doesn't know what the gdbstub_init() func is?

Help appreciated!!