If you need to do C level debugging, then you need to compile the relevant files /
subdirectories with -ggdb and -O0
. Don't compile everything with -O0
because the
resulting firmware image will be too large.
In this case I am debuggin the lua core so I have modified the app/lua/Makefile
to
set the debug defines and select the correct compiler options. I have also enabled
break at startup on GPIO pin low. With the pin pulled low, the RTS traps into the gdb
client, and I can connect to it using the xtensa remote debugger on the host.
What this debugging feature does is to call a common routine which