I am using an Adafruit Huzzah32 with 4MB Flash. Since the firmware has become too large, I would like to adjust the partition table and increase the app0 and app1 areas and shrink the spiffs area a little. To do this, I created a copy of the file tools/WLED_ESP32_4MB_1MB_FS.csv as tools/WLED_HUZZAH32_4MB_1MB_FS.csv and adapted the content as follows:
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x190000,
app1, app, ota_1, 0x1A0000,0x190000,
spiffs, data, spiffs, 0x330000,0xD0000,
When I compile and install the firmware with “platformio run --target upload”, it crashes as soon as an attempt is made to save /wsec.json to the flash:
---WLED 0.14.0 2310130 INIT---
esp32 v3.3.6-16-gcc5440f6a2
arduino-esp32 v1.0.x
CPU: ESP32-D0WDQ6 rev.1, 2 core(s), 240MHz.
FLASH: 4MB, Mode 3 (DOUT), speed 40MHz.
heap 295128
PIN ALLOC: Pin 1 successfully allocated by 0x89 (137)
Registering usermods ...
heap 295128
Mount FS
Reading config
Reading settings from /wsec.json...
JSON buffer locked (3)
Read from /wsec.json with key nullptr >>>
JSON buffer released. (3)
JSON buffer locked. (1)
Reading settings from /cfg.json...
Read from /cfg.json with key nullptr >>>
JSON buffer released. (1)
Writing settings to /wsec.json...
JSON buffer locked (4)
Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception)
Debug exception reason: Stack canary watchpoint triggered (loopTask)
Core 1 register dump:
When switching back to the “tools/WLED_ESP32_4MB_1MB_FS.csv” partition scheme everything works fine.
I already did a “esptool.py erase_flash” to get rid of old data, but this didn’t help.
I would be very happy to hear what I am doing wrong.
kind regards,
Christoph