Chat freely about anything...

User avatar
By jackwilsdon
#82299 I've been writing my own Makefile to compile a project using the ESP8266 NONOS SDK (v3), but I seem to be having a weird problem regarding the watchdog timer.

No matter what I put in user_init, I hit a watchdog reset after a few seconds. I've tried an empty user_init as well as calling os_printf but to no avail - I always hit the watchdog reset.

I am thinking this might be related to how I'm compiling my application - here's the commands my Makefile is running;

Code: Select allxtensa-lx106-elf-gcc -Iinclude -Isdk/include -Os -Wall -Wextra -fdata-sections -ffunction-sections -fno-builtin-printf -fno-cse-follow-jumps -fno-guess-branch-probability -fno-inline-functions -freorder-blocks-and-partition -mlongcalls -mlongcalls -mtext-section-literals -nostdlib -std=c11 -DICACHE_FLASH -DUSE_OPTIMIZE_PRINTF -DAT_UPGRADE_SUPPORT -DSPI_FLASH_SIZE_MAP=4 -MMD -c src/main.c -o obj/main.o
xtensa-lx106-elf-ar ru lib/libuser.a obj/main.o
xtensa-lx106-elf-ld -Lsdk/lib -Tsdk/ld/ -nostdlib --no-check-sections --gc-sections -u call_user_start --start-group -lat -lc -lcrypto -lgcc -lhal -llwip -lmain -lnet80211 -lphy -lpp -lwpa -lwpa2 lib/libuser.a --end-group -o bin/main.elf elf2image --output bin/main- bin/main.elf write_flash 0x00000 bin/main-0x00000.bin 0x10000 bin/main-0x10000.bin

I copied most of these commands from the official NONOS Makefile, so I'm not quite sure what I'm missing. I am using a 4MB D1 Mini module if that helps.