From 4cd026dfe9d21a35a0fec2f9e958761f7289d562 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Tue, 21 Mar 2023 17:28:04 +0100 Subject: [PATCH 1/9] ESP8266 core 4.1.0, ESP32 core 5.2.0 (S2,S3,C3) NeoPixelBus 2.7.3 (adding UCS890x support) --- platformio.ini | 41 +++++++++++++++++++++++++---------------- wled00/wled.h | 2 +- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/platformio.ini b/platformio.ini index 22d0bbc0d..e316c3aa1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -55,18 +55,20 @@ arduino_core_2_6_3 = espressif8266@2.3.3 arduino_core_2_7_4 = espressif8266@2.6.2 arduino_core_3_0_0 = espressif8266@3.0.0 arduino_core_3_2_0 = espressif8266@3.2.0 +arduino_core_4_1_0 = espressif8266@4.1.0 # Development platforms arduino_core_develop = https://github.com/platformio/platform-espressif8266#develop arduino_core_git = https://github.com/platformio/platform-espressif8266#feature/stage # Platform to use for ESP8266 -platform_wled_default = ${common.arduino_core_3_2_0} +platform_wled_default = ${common.arduino_core_4_1_0} # We use 2.7.4.7 for all, includes PWM flicker fix and Wstring optimization -platform_packages = tasmota/framework-arduinoespressif8266 @ 3.20704.7 - platformio/toolchain-xtensa @ ~2.40802.200502 - platformio/tool-esptool @ ~1.413.0 - platformio/tool-esptoolpy @ ~1.30000.0 +#platform_packages = tasmota/framework-arduinoespressif8266 @ 3.20704.7 +platform_packages = platformio/framework-arduinoespressif8266 + platformio/toolchain-xtensa #@ ~2.40802.200502 + platformio/tool-esptool #@ ~1.413.0 + platformio/tool-esptoolpy #@ ~1.30000.0 # ------------------------------------------------------------------------------ # FLAGS: DEBUG @@ -111,7 +113,7 @@ build_flags = -D DECODE_SONY=true -D DECODE_SAMSUNG=true -D DECODE_LG=true - ; -Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library + -Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library -DWLED_USE_MY_CONFIG ; -D USERMOD_SENSORSTOMQTT #For ADS1115 sensor uncomment following @@ -183,7 +185,7 @@ build_flags = -DFP_IN_IROM ;-Wno-deprecated-declarations ;-Wno-register - ;-Wno-misleading-indentation + -Wno-misleading-indentation ; NONOSDK22x_190703 = 2.2.2-dev(38a443e) -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703 ; lwIP 2 - Higher Bandwidth no Features @@ -200,7 +202,7 @@ lib_deps = #https://github.com/lorol/LITTLEFS.git ESPAsyncTCP @ 1.2.2 ESPAsyncUDP - makuna/NeoPixelBus @ 2.6.9 + makuna/NeoPixelBus @ 2.7.3 [esp32] #platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.3/platform-espressif32-2.0.2.3.zip @@ -225,6 +227,8 @@ lib_deps = https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 [esp32s2] +;; generic definitions for all ESP32-S2 boards +platform = espressif32@5.2.0 build_flags = -g -DARDUINO_ARCH_ESP32 -DARDUINO_ARCH_ESP32S2 @@ -237,10 +241,12 @@ build_flags = -g lib_deps = ${env.lib_deps} - makuna/NeoPixelBus @ 2.6.9 + makuna/NeoPixelBus @ 2.7.3 https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 [esp32c3] +;; generic definitions for all ESP32-C3 boards +platform = espressif32@5.2.0 build_flags = -g -DARDUINO_ARCH_ESP32 -DARDUINO_ARCH_ESP32C3 @@ -253,11 +259,12 @@ build_flags = -g lib_deps = ${env.lib_deps} - makuna/NeoPixelBus @ 2.6.9 + makuna/NeoPixelBus @ 2.7.3 https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 [esp32s3] ;; generic definitions for all ESP32-S3 boards +platform = espressif32@5.2.0 build_flags = -g -DESP32 -DARDUINO_ARCH_ESP32 @@ -271,7 +278,7 @@ build_flags = -g lib_deps = ${env.lib_deps} ;; NeoPixelBus 2.7.1 is the first that has official support for ESP32-S3 - makuna/NeoPixelBus @ ~2.7.1 + makuna/NeoPixelBus @ ~2.7.3 https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 @@ -390,7 +397,7 @@ build_flags = ${common.build_flags} ${esp32s2.build_flags} #-D WLED_RELEASE_NAME lib_deps = ${esp32s2.lib_deps} [env:esp32c3] -platform = espressif32@5.1.1 ;; well-tested on -C3, good compatibility with WLED +platform = {esp32c3.platform} ; platform = espressif32@~5.2.0 ;; might help in case you experience bootloops due to corrupted flash filesystem framework = arduino board = esp32-c3-devkitm-1 @@ -405,7 +412,7 @@ lib_deps = ${esp32c3.lib_deps} [env:esp32s3dev_8MB] ;; ESP32-S3-DevKitC-1 development board, with 8MB FLASH, no PSRAM (flash_mode: qio) board = esp32-s3-devkitc-1 -platform = espressif32@5.1.1 +platform = {esp32s3.platform} platform_packages = upload_speed = 921600 ; or 460800 build_unflags = ${common.build_unflags} @@ -426,7 +433,7 @@ monitor_filters = esp32_exception_decoder ;board = um_tinys3 ; -> needs workaround from https://github.com/Aircoookie/WLED/pull/2905#issuecomment-1328049860 ;board = esp32s3box ; -> error: 'esp32_adc2gpio' was not declared in this scope board = esp32-s3-devkitc-1 ; -> compiles, but does not support PSRAM -platform = espressif32 @ ~5.2.0 +platform = {esp32s3.platform} platform_packages = upload_speed = 921600 build_unflags = ${common.build_unflags} @@ -504,13 +511,15 @@ build_flags = ${common.build_flags_esp8266} -D LEDPIN=12 -D IRPIN=-1 -D RLYPIN=2 lib_deps = ${esp8266.lib_deps} [env:lolin_s2_mini] -platform = espressif32@5.1.1 +platform = {esp32s2.platform} board = lolin_s2_mini board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s2.build_flags} #-D WLED_RELEASE_NAME=LolinS2 -DBOARD_HAS_PSRAM - -D ARDUINO_USB_CDC_ON_BOOT + -DARDUINO_USB_CDC_ON_BOOT=0 + -DARDUINO_USB_MSC_ON_BOOT=0 + -DARDUINO_USB_DFU_ON_BOOT=0 -D WLED_USE_PSRAM -D WLED_WATCHDOG_TIMEOUT=0 -D CONFIG_ASYNC_TCP_USE_WDT=0 diff --git a/wled00/wled.h b/wled00/wled.h index 509e04f23..942df6710 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2303160 +#define VERSION 2303190 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG From 0cc719a82385da6a5a15910006e093799ba3e48a Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Tue, 21 Mar 2023 20:01:16 +0100 Subject: [PATCH 2/9] Remove "register" override --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index e316c3aa1..275b8d5ef 100644 --- a/platformio.ini +++ b/platformio.ini @@ -113,7 +113,7 @@ build_flags = -D DECODE_SONY=true -D DECODE_SAMSUNG=true -D DECODE_LG=true - -Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library + ;-Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library -DWLED_USE_MY_CONFIG ; -D USERMOD_SENSORSTOMQTT #For ADS1115 sensor uncomment following From 9b90ff10f46ae33988397f1d1ccc6fcbb97f12ed Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 21 Mar 2023 23:15:08 +0100 Subject: [PATCH 3/9] buildenv improvements for -S3/-S2/-C3 - corrected some broken references - added `platform_package =` --> use default packages - renamed env:esp32c3 to env:esp32c3dev to avoid confusion - added lolin_s2_mini to CI builds --- platformio.ini | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/platformio.ini b/platformio.ini index 275b8d5ef..7d4a2661c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ # ------------------------------------------------------------------------------ # Release / CI binaries -default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, esp32s2_saola, esp32c3, esp32s3dev_8MB +default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, esp32s2_saola, lolin_s2_mini, esp32c3dev, esp32s3dev_8MB # Build everything ; default_envs = esp32dev, esp8285_4CH_MagicHome, codm-controller-0.6-rev2, codm-controller-0.6, esp32s2_saola, d1_mini_5CH_Shojo_PCB, d1_mini, sp501e, nodemcuv2, esp32_eth, anavi_miracle_controller, esp07, esp01_1m_full, m5atom, h803wf, d1_mini_ota, heltec_wifi_kit_8, esp8285_H801, d1_mini_debug, wemos_shield_esp32, elekstube_ips @@ -113,7 +113,7 @@ build_flags = -D DECODE_SONY=true -D DECODE_SAMSUNG=true -D DECODE_LG=true - ;-Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library + ;-Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library ;; warning: this breaks framework code on ESP32-C3 and ESP32-S2 -DWLED_USE_MY_CONFIG ; -D USERMOD_SENSORSTOMQTT #For ADS1115 sensor uncomment following @@ -214,7 +214,7 @@ build_flags = -g -DARDUINO_ARCH_ESP32 #-DCONFIG_LITTLEFS_FOR_IDF_3_2 -D CONFIG_ASYNC_TCP_USE_WDT=0 -#use LITTLEFS library by lorol in ESP32 core 1.x.x instead of built-in in 2.x.x + #use LITTLEFS library by lorol in ESP32 core 1.x.x instead of built-in in 2.x.x -D LOROL_LITTLEFS ; -DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when builing with arduino-esp32 >=2.0.3 @@ -229,10 +229,11 @@ lib_deps = [esp32s2] ;; generic definitions for all ESP32-S2 boards platform = espressif32@5.2.0 +platform_packages = build_flags = -g -DARDUINO_ARCH_ESP32 -DARDUINO_ARCH_ESP32S2 - -DCONFIG_IDF_TARGET_ESP32S2 + -DCONFIG_IDF_TARGET_ESP32S2=1 -D CONFIG_ASYNC_TCP_USE_WDT=0 -DCO -DARDUINO_USB_MODE=0 ;; this flag is mandatory for ESP32-S2 ! @@ -247,10 +248,11 @@ lib_deps = [esp32c3] ;; generic definitions for all ESP32-C3 boards platform = espressif32@5.2.0 +platform_packages = build_flags = -g -DARDUINO_ARCH_ESP32 -DARDUINO_ARCH_ESP32C3 - -DCONFIG_IDF_TARGET_ESP32C3 + -DCONFIG_IDF_TARGET_ESP32C3=1 -D CONFIG_ASYNC_TCP_USE_WDT=0 -DCO -DARDUINO_USB_MODE=1 ;; this flag is mandatory for ESP32-C3 @@ -265,11 +267,12 @@ lib_deps = [esp32s3] ;; generic definitions for all ESP32-S3 boards platform = espressif32@5.2.0 +platform_packages = build_flags = -g -DESP32 -DARDUINO_ARCH_ESP32 -DARDUINO_ARCH_ESP32S3 - -DCONFIG_IDF_TARGET_ESP32S3 + -DCONFIG_IDF_TARGET_ESP32S3=1 -D CONFIG_ASYNC_TCP_USE_WDT=0 -DCO ;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry: @@ -396,15 +399,18 @@ build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s2.build_flags} #-D WLED_RELEASE_NAME=S2_saola lib_deps = ${esp32s2.lib_deps} -[env:esp32c3] -platform = {esp32c3.platform} +[env:esp32c3dev] +extends = esp32c3 +platform = ${esp32c3.platform} +platform_packages = ${esp32c3.platform_packages} ; platform = espressif32@~5.2.0 ;; might help in case you experience bootloops due to corrupted flash filesystem framework = arduino board = esp32-c3-devkitm-1 board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv build_flags = ${common.build_flags} ${esp32c3.build_flags} #-D WLED_RELEASE_NAME=ESP32-C3 -D WLED_WATCHDOG_TIMEOUT=0 - ; -DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual USB + ; -DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual CDC USB + -DARDUINO_USB_CDC_ON_BOOT=0 ;; for serial-to-USB chip upload_speed = 460800 build_unflags = ${common.build_unflags} lib_deps = ${esp32c3.lib_deps} @@ -412,8 +418,8 @@ lib_deps = ${esp32c3.lib_deps} [env:esp32s3dev_8MB] ;; ESP32-S3-DevKitC-1 development board, with 8MB FLASH, no PSRAM (flash_mode: qio) board = esp32-s3-devkitc-1 -platform = {esp32s3.platform} -platform_packages = +platform = ${esp32s3.platform} +platform_packages = ${esp32s3.platform_packages} upload_speed = 921600 ; or 460800 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} @@ -433,8 +439,8 @@ monitor_filters = esp32_exception_decoder ;board = um_tinys3 ; -> needs workaround from https://github.com/Aircoookie/WLED/pull/2905#issuecomment-1328049860 ;board = esp32s3box ; -> error: 'esp32_adc2gpio' was not declared in this scope board = esp32-s3-devkitc-1 ; -> compiles, but does not support PSRAM -platform = {esp32s3.platform} -platform_packages = +platform = ${esp32s3.platform} +platform_packages = ${esp32s3.platform_packages} upload_speed = 921600 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} @@ -511,10 +517,11 @@ build_flags = ${common.build_flags_esp8266} -D LEDPIN=12 -D IRPIN=-1 -D RLYPIN=2 lib_deps = ${esp8266.lib_deps} [env:lolin_s2_mini] -platform = {esp32s2.platform} +platform = ${esp32s2.platform} +platform_packages = ${esp32s2.platform_packages} board = lolin_s2_mini board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv -build_unflags = ${common.build_unflags} +build_unflags = ${common.build_unflags} -DARDUINO_USB_CDC_ON_BOOT=1 build_flags = ${common.build_flags} ${esp32s2.build_flags} #-D WLED_RELEASE_NAME=LolinS2 -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 From bf789ca97bb7e6fdbee1a3efcfb09549ddcf9b3a Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 21 Mar 2023 23:36:50 +0100 Subject: [PATCH 4/9] minor cleanup --- platformio.ini | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index 7d4a2661c..60ec90b87 100644 --- a/platformio.ini +++ b/platformio.ini @@ -397,13 +397,13 @@ board_build.flash_mode = qio upload_speed = 460800 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s2.build_flags} #-D WLED_RELEASE_NAME=S2_saola + -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 lib_deps = ${esp32s2.lib_deps} [env:esp32c3dev] extends = esp32c3 platform = ${esp32c3.platform} platform_packages = ${esp32c3.platform_packages} -; platform = espressif32@~5.2.0 ;; might help in case you experience bootloops due to corrupted flash filesystem framework = arduino board = esp32-c3-devkitm-1 board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv @@ -424,7 +424,7 @@ upload_speed = 921600 ; or 460800 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} -D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0 - -D ARDUINO_USB_CDC_ON_BOOT=0 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip + -D ARDUINO_USB_CDC_ON_BOOT=0 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 ; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip ;-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 ; -D ARDUINO_USB_MODE=0 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB") ;-D WLED_DEBUG lib_deps = ${esp32s3.lib_deps} @@ -445,7 +445,8 @@ upload_speed = 921600 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} -D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0 - -D ARDUINO_USB_MODE=1 -D ARDUINO_USB_MSC_ON_BOOT=0 ; -D ARDUINO_USB_CDC_ON_BOOT=0 + ;-D ARDUINO_USB_CDC_ON_BOOT=0 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 ; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip + -D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 ; -D ARDUINO_USB_MODE=0 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB") ; -D WLED_RELEASE_NAME=ESP32-S3_PSRAM -D WLED_USE_PSRAM -DBOARD_HAS_PSRAM ; tells WLED that PSRAM shall be used lib_deps = ${esp32s3.lib_deps} From 646cf44b839d2224e7908c22c6fdb0d406614a35 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 22 Mar 2023 00:06:25 +0100 Subject: [PATCH 5/9] moved register override into 8266 section, so it cannot destroy builds for ESP32 devices --- platformio.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 60ec90b87..c684b57c7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -184,7 +184,8 @@ build_flags = -DESP8266 -DFP_IN_IROM ;-Wno-deprecated-declarations - ;-Wno-register + -Wno-register ;; leaves some warnings when compiling C files: command-line option '-Wno-register' is valid for C++/ObjC++ but not for C + ;-Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library ;; warning: this can be dangerous -Wno-misleading-indentation ; NONOSDK22x_190703 = 2.2.2-dev(38a443e) -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703 From 890aa6f9ac99430552758d9c15e308aea5ba0151 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 22 Mar 2023 00:46:27 +0100 Subject: [PATCH 6/9] experimental esp32 buildenv with platform = espressif32@5.2.0 experimental ESP32 buildenv using ESP-IDF V4.4.x / arduino-esp32 v2.0.5 Warning: this build environment is not stable!! --- platformio.ini | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/platformio.ini b/platformio.ini index c684b57c7..7dbbfd123 100644 --- a/platformio.ini +++ b/platformio.ini @@ -227,6 +227,26 @@ lib_deps = makuna/NeoPixelBus @ 2.6.9 https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 + +[esp32_idf_V4] +;; experimental buildenv for ESP32 using ESP-IDF 4.4.x / arduino-esp32 v2.0.5 +;; very similar to the normal ESP32 flags, but omitting Lorol LittleFS, as littlefs is included in the new framework already. +;; +;; please note that you can NOT update existing ESP32 installs with a "V4" build. Also updating by OTA will not work properly. +;; You need to completely erasse your device (esptool erase_flash) first, then install the "V4" build from VSCode+platformio. +platform = espressif32@5.2.0 +platform_packages = +build_flags = -g + -DARDUINO_ARCH_ESP32 -DESP32 + #-DCONFIG_LITTLEFS_FOR_IDF_3_2 + -D CONFIG_ASYNC_TCP_USE_WDT=0 + -DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when builing with arduino-esp32 >=2.0.3 +default_partitions = tools/WLED_ESP32_4MB_1MB_FS.csv +lib_deps = + ${env.lib_deps} + makuna/NeoPixelBus @ 2.7.3 + https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 + [esp32s2] ;; generic definitions for all ESP32-S2 boards platform = espressif32@5.2.0 @@ -378,6 +398,21 @@ board_build.partitions = ${esp32.default_partitions} board_build.f_flash = 80000000L board_build.flash_mode = qio +[env:esp32dev_V4_qio80] +;; experimental ESP32 env using ESP-IDF V4.4.x +;; Warning: this build environment is not stable!! +;; please erase your device before installing. +board = esp32dev +platform = ${esp32_idf_V4.platform} +platform_packages = ${esp32_idf_V4.platform_packages} +build_unflags = ${common.build_unflags} +build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=ESP32_V4_qio80 #-D WLED_DISABLE_BROWNOUT_DET +lib_deps = ${esp32_idf_V4.lib_deps} +monitor_filters = esp32_exception_decoder +board_build.partitions = ${esp32_idf_V4.default_partitions} +board_build.f_flash = 80000000L +board_build.flash_mode = dio + [env:esp32_eth] board = esp32-poe platform = ${esp32.platform} From 3968a8e0dc0617953686ceb5287c719bad912173 Mon Sep 17 00:00:00 2001 From: Christian Schwinne Date: Tue, 28 Mar 2023 23:19:00 +0200 Subject: [PATCH 7/9] Attempt fixing GitHub actions ESP8266 build (#3151) (explicit toolchain version) --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 7dbbfd123..46169b9e7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -66,7 +66,7 @@ platform_wled_default = ${common.arduino_core_4_1_0} # We use 2.7.4.7 for all, includes PWM flicker fix and Wstring optimization #platform_packages = tasmota/framework-arduinoespressif8266 @ 3.20704.7 platform_packages = platformio/framework-arduinoespressif8266 - platformio/toolchain-xtensa #@ ~2.40802.200502 + platformio/toolchain-xtensa @ ~2.100300.220621 #2.40802.200502 platformio/tool-esptool #@ ~1.413.0 platformio/tool-esptoolpy #@ ~1.30000.0 From a7a6f4cec6b738a297303ae3fc3f479f225fe8dd Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 30 Mar 2023 00:03:04 +0200 Subject: [PATCH 8/9] small re-organization of build flags * -Wno-attributes added to common flags * USB_MSC and USB_DFU flags moved to common board sections (does not make sense with WLED to ernable these) --- platformio.ini | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/platformio.ini b/platformio.ini index 46169b9e7..6b7a3d01f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -106,6 +106,7 @@ build_flags = -DBEARSSL_SSL_BASIC -D CORE_DEBUG_LEVEL=0 -D NDEBUG + -Wno-attributes ;; silence warnings about unknown attribute 'maybe_unused' in NeopixelBus #build_flags for the IRremoteESP8266 library (enabled decoders have to appear here) -D _IR_ENABLE_DEFAULT_=false -D DECODE_HASH=true @@ -123,6 +124,7 @@ build_unflags = build_flags_esp8266 = ${common.build_flags} ${esp8266.build_flags} build_flags_esp32 = ${common.build_flags} ${esp32.build_flags} +build_flags_esp32_V4= ${common.build_flags} ${esp32_idf_V4.build_flags} ldscript_1m128k = eagle.flash.1m128.ld ldscript_2m512k = eagle.flash.2m512.ld @@ -256,10 +258,11 @@ build_flags = -g -DARDUINO_ARCH_ESP32S2 -DCONFIG_IDF_TARGET_ESP32S2=1 -D CONFIG_ASYNC_TCP_USE_WDT=0 + -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 -DCO -DARDUINO_USB_MODE=0 ;; this flag is mandatory for ESP32-S2 ! ;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry: - ;; ARDUINO_USB_CDC_ON_BOOT, ARDUINO_USB_MSC_ON_BOOT, ARDUINO_USB_DFU_ON_BOOT + ;; ARDUINO_USB_CDC_ON_BOOT lib_deps = ${env.lib_deps} @@ -295,9 +298,10 @@ build_flags = -g -DARDUINO_ARCH_ESP32S3 -DCONFIG_IDF_TARGET_ESP32S3=1 -D CONFIG_ASYNC_TCP_USE_WDT=0 + -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_DFU_ON_BOOT=0 -DCO ;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry: - ;; ARDUINO_USB_MODE, ARDUINO_USB_CDC_ON_BOOT, ARDUINO_USB_MSC_ON_BOOT, ARDUINO_USB_DFU_ON_BOOT + ;; ARDUINO_USB_MODE, ARDUINO_USB_CDC_ON_BOOT lib_deps = ${env.lib_deps} @@ -433,7 +437,7 @@ board_build.flash_mode = qio upload_speed = 460800 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s2.build_flags} #-D WLED_RELEASE_NAME=S2_saola - -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 + -DARDUINO_USB_CDC_ON_BOOT=1 lib_deps = ${esp32s2.lib_deps} [env:esp32c3dev] @@ -460,8 +464,8 @@ upload_speed = 921600 ; or 460800 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} -D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0 - -D ARDUINO_USB_CDC_ON_BOOT=0 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 ; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip - ;-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 ; -D ARDUINO_USB_MODE=0 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB") + -D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip + ;-D ARDUINO_USB_CDC_ON_BOOT=1 ;; -D ARDUINO_USB_MODE=0 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB") ;-D WLED_DEBUG lib_deps = ${esp32s3.lib_deps} board_build.partitions = tools/WLED_ESP32_8MB.csv @@ -481,8 +485,8 @@ upload_speed = 921600 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} -D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0 - ;-D ARDUINO_USB_CDC_ON_BOOT=0 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 ; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip - -D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 ; -D ARDUINO_USB_MODE=0 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB") + ;-D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip + -D ARDUINO_USB_CDC_ON_BOOT=1 ;; -D ARDUINO_USB_MODE=0 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB") ; -D WLED_RELEASE_NAME=ESP32-S3_PSRAM -D WLED_USE_PSRAM -DBOARD_HAS_PSRAM ; tells WLED that PSRAM shall be used lib_deps = ${esp32s3.lib_deps} @@ -562,8 +566,6 @@ build_unflags = ${common.build_unflags} -DARDUINO_USB_CDC_ON_BOOT=1 build_flags = ${common.build_flags} ${esp32s2.build_flags} #-D WLED_RELEASE_NAME=LolinS2 -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 - -DARDUINO_USB_MSC_ON_BOOT=0 - -DARDUINO_USB_DFU_ON_BOOT=0 -D WLED_USE_PSRAM -D WLED_WATCHDOG_TIMEOUT=0 -D CONFIG_ASYNC_TCP_USE_WDT=0 From 54eb42d658e8811f81051196a51d81ed7d79f6cc Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 30 Mar 2023 00:20:01 +0200 Subject: [PATCH 9/9] 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 6b7a3d01f..277aba9c6 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 000000000..7a1cf15f8 --- /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,