Shrink LittleFS partition, grow OTA app slots

Web assets only use ~489 KB but the default 1.375 MB spiffs
partition wasted the rest. Rebalance to 768 KB spiffs / 1.56 MB
per app slot (was 1.25 MB), giving the tight esp32 build real
headroom (99.6% -> 79.7% flash used) while preserving dual-slot
OTA. Wire the custom layout into both the local PlatformIO build
(new partitions.csv + platformio.ini) and the Arduino-CLI CI/release
pipeline (PartitionScheme=custom, matching littlefs image size and
merge_bin offset).
This commit is contained in:
Frédéric Metrich 2026-09-05 23:15:29 +02:00
parent db22c16bb3
commit 182d859870
4 changed files with 83 additions and 16 deletions

60
platformio.ini Normal file
View file

@ -0,0 +1,60 @@
; PlatformIO configuration for ESPSomfy-RTS
; Compatible with Arduino IDE (source files remain in project root)
[platformio]
src_dir = .
default_envs = esp32
[env]
framework = arduino
platform = espressif32@6.9.0
monitor_speed = 115200
upload_speed = 921600
board_build.filesystem = littlefs
board_build.flash_mode = qio
board_build.partitions = partitions.csv
lib_deps =
bblanchon/ArduinoJson@6.21.5
knolleary/PubSubClient@2.8.0
LSatan/SmartRC-CC1101-Driver-Lib@2.5.7
https://github.com/Links2004/arduinoWebSockets.git#2.4.0
build_src_filter =
+<*.ino>
+<*.cpp>
+<*.h>
-<.github/>
-<icons/>
[env:esp32]
board = esp32dev
[env:esp32c3]
board = esp32-c3-devkitc-02
board_build.mcu = esp32c3
build_flags =
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
[env:esp32s2]
board = esp32-s2-saola-1
board_build.mcu = esp32s2
build_flags =
-DARDUINO_USB_CDC_ON_BOOT=1
; ESP32-C6 requires Arduino ESP32 core 3.x (pioarduino platform fork).
; Core 3.x has breaking API changes (ETH, tcpip_adapter removed, etc.)
; that require source code modifications before this will compile.
; [env:esp32c6]
; platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.11/platform-espressif32.zip
; board = esp32-c6-devkitc-1
; board_build.mcu = esp32c6
; build_flags =
; -DARDUINO_USB_MODE=1
; -DARDUINO_USB_CDC_ON_BOOT=1
[env:esp32s3]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags =
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1