From 856d45435e0aac0af7612dc16dfc591e578ed8d6 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 13 Jul 2024 18:50:34 +0100 Subject: [PATCH 1/2] Swap to new smaller FS but with backwads compatible minimal --- platformio.ini | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 6ae4c79091..ad2b132c71 100644 --- a/platformio.ini +++ b/platformio.ini @@ -83,6 +83,7 @@ default_envs = esp32c3dev_2MB_M ;; experimental - 2MB Flash, no OTA esp32c3mini_dio_4MB_M ;; for boards that need "dio" flash mode (instead of qio) seeed_esp32c3_4MB_S ;; experimental + esp32_4MB_V4_Minimal esp32_4MB_V4_S ;; experimental esp32_16MB_V4_S ;; experimental - optimized for speed esp32_16MB_V4_M ;; experimental @@ -310,8 +311,8 @@ build_flags = -g ; -D WLEDMM_SLOWPATH ;; don't use I2S for LED bus ; -DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3 -default_partitions = tools/WLED_ESP32_4MB_1MB_FS.csv ;; WLED standard for 4MB flash: 1.4MB firmware, 1MB filesystem -;default_partitions = tools/WLED_ESP32_4MB_256KB_FS.csv ;; WLEDMM alternative for 4MB flash: 1.8MB firmware, 256KB filesystem (esptool erase_flash needed before changing) +; default_partitions = tools/WLED_ESP32_4MB_1MB_FS.csv ;; WLED standard for 4MB flash: 1.4MB firmware, 1MB filesystem +default_partitions = tools/WLED_ESP32_4MB_256KB_FS.csv ;; WLEDMM alternative for 4MB flash: 1.8MB firmware, 256KB filesystem (esptool erase_flash needed before changing) tiny_partitions = tools/WLED_ESP32_2MB_noOTA.csv extended_partitions = tools/WLED_ESP32_4MB_700k_FS.csv @@ -1573,6 +1574,34 @@ lib_deps = ${esp8266.lib_deps} ;; Warning: the build-in LittleFS (arduino-esp32 2.0.x) seems to be "slightly different" from Lorol LittleFS. ;; When upgrading to the new framework, it might be necessary to first do a chip erase (make sure you have a backup of cfg.json and presets.json) +; compiled with ESP-IDF 4.4.1 +[env:esp32_4MB_V4_Minimal] +extends = esp32_4MB_V4_S_base +board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv ;; WLED-AC compatibility +build_flags = ${esp32_4MB_V4_S_base.esp32_build_flags} + -D WLED_RELEASE_NAME=esp32_4MB_V4_Minimal + -D WLED_WATCHDOG_TIMEOUT=0 #-D WLED_DISABLE_BROWNOUT_DET + -D ARDUINO_USB_CDC_ON_BOOT=0 ; needed for arduino-esp32 >=2.0.4; avoids errors on startup + -D WLEDMM_FASTPATH ; WLEDMM experimental option. Reduces audio lag (latency), and allows for faster LED framerates. May break compatibility with previous versions. + -D WLED_DISABLE_LOXONE + -D WLED_DISABLE_ALEXA + ; -D WLED_DISABLE_HUESYNC + ; -D WLED_DISABLE_MQTT + -D WLED_DISABLE_INFRARED + ; -D WLED_DEBUG + ; -D SR_DEBUG + ; -D MIC_LOGGER + ; -D WLED_ENABLE_HUB75MATRIX + +; -flto +; build_unflags = ${common.build_unflags} -fno-lto + +lib_deps = ${esp32_4MB_V4_S_base.esp32_lib_deps} +lib_ignore = IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation + +; RAM: [=== ] 28.4% (used 92984 bytes from 327680 bytes) +; Flash: [==========] 96.5% (used 1518009 bytes from 1572864 bytes) + ; compiled with ESP-IDF 4.4.1 [env:esp32_4MB_V4_S] extends = esp32_4MB_V4_S_base From d85bfa86f3e49b95ca29eba333d9cad5a93e7163 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sun, 14 Jul 2024 12:11:39 +0100 Subject: [PATCH 2/2] update usage comment --- platformio.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index ad2b132c71..521ab3b2d9 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1622,8 +1622,8 @@ build_flags = ${esp32_4MB_V4_S_base.esp32_build_flags} lib_deps = ${esp32_4MB_V4_S_base.esp32_lib_deps} lib_ignore = IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation - ; RAM: [=== ] 28.1% (used 91960 bytes from 327680 bytes) - ; Flash: [==========] 97.8% (used 1537777 bytes from 1572864 bytes) + ; RAM: [=== ] 28.4% (used 92968 bytes from 327680 bytes) + ; Flash: [======== ] 81.2% (used 1543041 bytes from 1900544 bytes) ; compiled with ESP-IDF 4.4.1 [env:esp32_4MB_V4_M] extends = esp32_4MB_V4_M_base