From d9535f144067300222aa27d8003351555e2e8b9d Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sun, 12 Mar 2023 15:05:18 +0100 Subject: [PATCH] optional partition layout for 2MB boards useful for small -C3 boards with 2MB flash memory only. Based on suggestions from https://github.com/Aircoookie/WLED/pull/2951 . Needs `-D WLED_DISABLE_OTA` as OTA is not possible with 2MB. RAM: [== ] 22.5% (used 73724 bytes from 327680 bytes) Flash: [========= ] 94.9% (used 1492020 bytes from 1572864 bytes) --- platformio.ini | 2 ++ tools/WLED_ESP32_2MB_noOTA.csv | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 tools/WLED_ESP32_2MB_noOTA.csv diff --git a/platformio.ini b/platformio.ini index 0cb0c655..e69101e4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1348,6 +1348,7 @@ extends = esp32_4MB_V4_S_base platform = espressif32@~5.2.0 ;; alternative platform, might help in case you experience bootloops due to corrupted flash filesystem platform_packages = board = esp32-c3-devkitm-1 +;board_build.partitions = tools/WLED_ESP32_2MB_noOTA.csv ;; for boards with 2MB flash only (like some Ai-Thinker ESP32-C3-12F models) upload_speed = 256000 ;; 921600 build_unflags = ${common.build_unflags} @@ -1362,6 +1363,7 @@ build_flags = ${common.build_flags} ${esp32c3.build_flags} ${common_mm.build_flags_S} ${common_mm.build_flags_M} -Wno-misleading-indentation -Wno-format-truncation -D WLED_RELEASE_NAME=esp32c3dev_4MB_M + ; -D WLED_DISABLE_OTA ;; OTA is not possible for boards with 2MB flash only (like some Ai-Thinker ESP32-C3-12F models) ; -DARDUINO_USB_CDC_ON_BOOT=1 ;; enable CDC USB -> needed for debugging over serial USB -DARDUINO_USB_CDC_ON_BOOT=0 ;; disable CDC USB -D SERVERNAME='"WLED-C3"' diff --git a/tools/WLED_ESP32_2MB_noOTA.csv b/tools/WLED_ESP32_2MB_noOTA.csv new file mode 100644 index 00000000..7a1cf15f --- /dev/null +++ b/tools/WLED_ESP32_2MB_noOTA.csv @@ -0,0 +1,5 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 20K, +otadata, data, ota, 0xe000, 8K, +app0, app, ota_0, 0x10000, 1536K, +spiffs, data, spiffs, 0x190000, 384K,