From 54eb42d658e8811f81051196a51d81ed7d79f6cc Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 30 Mar 2023 00:20:01 +0200 Subject: [PATCH] build env for -C3 with only 2MB flash based on proposal from in PR #2951 by @andyshinn. 2MB does not allow to have an OTA partition, so this feature is disabled. --- platformio.ini | 18 ++++++++++++++++++ tools/WLED_ESP32_2MB_noOTA.csv | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 tools/WLED_ESP32_2MB_noOTA.csv diff --git a/platformio.ini b/platformio.ini index 6b7a3d01..277aba9c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -585,6 +585,24 @@ lib_deps = ${esp32s2.lib_deps} # custom board configurations # ------------------------------------------------------------------------------ +[env:esp32c3dev_2MB] +;; for ESP32-C3 boards with 2MB flash (instead of 4MB). +;; this board need a specific partition file. OTA not possible. +extends = esp32c3 +platform = ${esp32c3.platform} +platform_packages = ${esp32c3.platform_packages} +board = esp32-c3-devkitm-1 +build_flags = ${common.build_flags} ${esp32c3.build_flags} #-D WLED_RELEASE_NAME=ESP32-C3 + -D WLED_WATCHDOG_TIMEOUT=0 + -D WLED_DISABLE_OTA + ; -DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual CDC USB + -DARDUINO_USB_CDC_ON_BOOT=0 ;; for serial-to-USB chip +build_unflags = ${common.build_unflags} +upload_speed = 115200 +lib_deps = ${esp32c3.lib_deps} +board_build.partitions = tools/WLED_ESP32_2MB_noOTA.csv +board_build.flash_mode = dio + [env:wemos_shield_esp32] board = esp32dev platform = espressif32@3.2 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,