Code: Select all
CC = xtensa-lx106-elf-gcc
CFLAGS = -I. -DICACHE_FLASH -mlongcalls -Og
LDLIBS = -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -lc -Wl,--end-group -lgcc
LDFLAGS = -Teagle.app.v6.ld -ggdb
INCLUDES = -Iinclude -I../driver_lib/include
SUBDIRS = gdbstub
COMPONENTS_eagle.app.v6 = gdbstub/libgdbstub.a
fotaMain-0x81000.bin: LDFLAGS=-Teagle.app.v6.new.2048.ld -ggdb
fotaMain-0x81000.bin: Main
esptool.py write_flash --flash_size 32m-c1 0x101000 Main-0x01000.bin
fotaMain-0x01000.bin: LDFLAGS=-Teagle.app.v6.new.2048.ld -ggdb
fotaMain-0x01000.bin: Main
echo c
echo $(LDFLAGS)
esptool.py elf2image --version 2 Main
esptool.py write_flash --flash_size 32m-c1 0 ../library/boot_v1.7.bin 0x1000 Main-0x01000.bin 0x3FB000 ../library/blank.bin 0x3FE000 ../library/blank.bin 0x3FC000 ../library/esp_init_data_default_v08.bin 0x64000 ../library/index.html 0x66000 ../library/config.html
Main: Main.o $(SUBDIRS)/gdbstub.o $(SUBDIRS)/gdbstub-entry.s
Main.o: Main.c
$(SUBDIRS)/gdbstub.o: $(SUBDIRS)/gdbstub.c
$(CC) $(CFLAGS) -c $< -o $@
$(SUBDIRS)/gdbstub-entry.o: $(SUBDIRS)/gdbstub-entry.s
I am currently running 3.0.2 NONOS-SDK (Yes I am aware this is not under full support anymore) and am leveraging the esp-open-sdk
https://github.com/pfalcon/esp-open-sdk
I then downloaded the source files and placed them within my project folder as directed: https://github.com/espressif/esp-gdbstub
Updated my make file above, totally unsure if its correct but did the best I could to get it to fly and then I got stuck on compiling the .s ASM code.. It is currently returning that rsr cant be applied to the DEBUG_PS micro. I can only assume it has something to do with how my gcc compiler is interpreting the .S but any pointers in the right direction would be greatly appreciated!!
If anyone has more of a stand alone solution to preserve the stack trace that would also partly resolve my issue but being able to breakpoint and to get gdbstub to work with my nonos sdk would be a pie in the sky as well!