From a68c1a899f7e863c9eea3e79e07ef665ab7fa058 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:51:07 +0200 Subject: [PATCH 01/22] ESP32-C6 buildenv due to Arduino 3.0.1, a few updated libraries are required: * Tasmota Platform - official platfomio lacks arduino support for C6 * FastLED (latest + C6 build patches) * AsyncTCP (latest + C6 build patches) * AsyncWebServer (latest + C6 build patches) * NeoPixelBus (lastest) --- platformio.ini | 73 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 5ada7d4770..5190622263 100644 --- a/platformio.ini +++ b/platformio.ini @@ -43,6 +43,7 @@ ; default_envs = esp32c3dev ; default_envs = lolin_s2_mini ; default_envs = esp32s3dev_16MB_PSRAM_opi +; default_envs = esp32c6dev_8MB ; MoonModules entries ; =================== @@ -238,12 +239,14 @@ upload_speed = 115200 # ------------------------------------------------------------------------------ lib_compat_mode = strict lib_deps = - fastled/FastLED @ 3.6.0 + ;; fastled/FastLED @ 3.6.0 + https://github.com/netmindz/FastLED.git#ESP32-C6 ;; patched version needed for -C6 IRremoteESP8266 @ 2.8.2 ;;makuna/NeoPixelBus @ 2.7.5 ;; WLEDMM will be added in board specific sections ;;https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.7 ;; https://github.com/lost-hope/ESPAsyncWebServer.git#master ;; WLEDMM to display .log and .wled files in /edit - https://github.com/Aircoookie/ESPAsyncWebServer.git @ 2.2.1 ;; newer with bugfixes and stability improvements + ;; https://github.com/Aircoookie/ESPAsyncWebServer.git @ 2.2.1 ;; newer with bugfixes and stability improvements + https://github.com/softhack007/ESPAsyncWebServer.git#ESP32-C6 ;; patched version needed for -C6 #For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line #TFT_eSPI #For compatible OLED display uncomment following @@ -441,6 +444,72 @@ lib_deps = ;; makuna/NeoPixelBus @ 2.7.9 ;; experimental ${env.lib_deps} + +[esp32c6] +;; generic definitions for all ESP32-C6 boards +platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.06.10/platform-espressif32.zip +platform_packages = +;;platform_packages = +;; framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1 +;; framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip + +board = esp32-c6-devkitm-1 +build_flags = -g + -DARDUINO_ARCH_ESP32 + -DARDUINO_ARCH_ESP32C6 + -DCONFIG_IDF_TARGET_ESP32C6=1 + -D CONFIG_ASYNC_TCP_USE_WDT=0 + -DCO + -DARDUINO_USB_MODE=1 ;; this flag is mandatory for ESP32-C3 + ;; 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 +lib_deps = + ;;https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 + https://github.com/softhack007/AsyncTCP.git#ESP32-C6 ;; patched version needed for -C6 + makuna/NeoPixelBus @ 2.8.0 ;; latest version neeeded for -C6 + ${env.lib_deps} + + +[env:esp32c6dev_8MB] +;; ESP32-C6 "devkit C" with 8MB flash +extends = esp32c6 +platform = ${esp32c6.platform} +platform_packages = ${esp32c6.platform_packages} +framework = arduino +board = esp32-c6-devkitc-1 + +build_unflags = ${common.build_unflags} +build_flags = ${common.build_flags} ${esp32c6.build_flags} -D WLED_RELEASE_NAME=ESP32-C6_8MB + -Wno-volatile -Wno-deprecated-declarations ;; silence compiler warnings + -Wno-cpp ;; silence '#pragma warning' messages + -D WLED_WATCHDOG_TIMEOUT=0 + ;; -DLOLIN_WIFI_FIX ; might be needed on "-C6 mini" + ;;-DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual CDC USB + -DARDUINO_USB_CDC_ON_BOOT=0 ;; for serial-to-USB chip + -D WLED_DISABLE_INFRARED ;; library not not compatible with -C6 + -D WLED_DISABLE_ESPNOW ;; not sure if this will work + -D WLED_DISABLE_ALEXA ;; compile errors + -D WLED_DISABLE_WEBSOCKETS ;; not sure if this will work (hacks needed in asyncWebserver) +upload_speed = 460800 +lib_deps = ${esp32c6.lib_deps} +lib_ignore = + IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation + +board_build.partitions = ${esp32.large_partitions} +board_build.f_flash = 80000000L +board_build.flash_mode = qio +board_build.arduino.memory_type = qio_qspi +monitor_filters = esp32_exception_decoder + +[env:esp32c6dev_4MB] +;; ESP32-C6 "devkit M" with 4MB flash +extends = env:esp32c6dev_8MB +board = esp32-c6-devkitm-1 +board_build.partitions = ${esp32.default_partitions} +build_unflags = ${env:esp32c6dev_8MB.build_unflags} -D WLED_RELEASE_NAME=ESP32-C6_8MB +build_flags = ${env:esp32c6dev_8MB.build_flags} -D WLED_RELEASE_NAME=ESP32-C6_4MB + + [esp32s3] ;; generic definitions for all ESP32-S3 boards platform = espressif32@ ~6.3.2 From 931788f3e5971db327f9999ddc849ada4c903e21 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:53:37 +0200 Subject: [PATCH 02/22] bus manager: ledc (PWM) driver disabled for -C6 ledc drivers have a different API in Arduino V3.0.1. --> temporarily disable PWM support for C6, until we find the time to adopt to the new API. --- wled00/bus_manager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index fff5ecb384..9ef780ae20 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -231,7 +231,9 @@ BusPwm::BusPwm(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite) { uint8_t numPins = NUM_PWM_PINS(bc.type); _frequency = bc.frequency ? bc.frequency : WLED_PWM_FREQ; - #ifdef ESP8266 +#if !defined(CONFIG_IDF_TARGET_ESP32C6) + + #if defined(ESP8266) analogWriteRange(255); //same range as one RGB channel analogWriteFreq(_frequency); #else @@ -254,6 +256,7 @@ BusPwm::BusPwm(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite) { ledcAttachPin(_pins[i], _ledcStart + i); #endif } +#endif reversed = bc.reversed; _valid = true; } @@ -368,7 +371,9 @@ void BusPwm::deallocatePins() { #ifdef ESP8266 digitalWrite(_pins[i], LOW); //turn off PWM interrupt #else +#if !defined(CONFIG_IDF_TARGET_ESP32C6) if (_ledcStart < 16) ledcDetachPin(_pins[i]); +#endif #endif } #ifdef ARDUINO_ARCH_ESP32 From b19902b7554fbc91639d409aeb0f0f6eb9a48ec9 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:54:55 +0200 Subject: [PATCH 03/22] added WLED_NO_RMT_PIXELBUS for -C6 currently NPB only support BitBang drivers for -C6. This patch re-maps all RMT driver calls to BitBang. --- wled00/bus_wrapper.h | 71 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 4 deletions(-) diff --git a/wled00/bus_wrapper.h b/wled00/bus_wrapper.h index 64dcd5b979..0487ab4ca9 100644 --- a/wled00/bus_wrapper.h +++ b/wled00/bus_wrapper.h @@ -10,12 +10,17 @@ // https://github.com/Makuna/NeoPixelBus/blob/b32f719e95ef3c35c46da5c99538017ef925c026/src/internal/Esp32_i2s.h#L4 // https://github.com/Makuna/NeoPixelBus/blob/b32f719e95ef3c35c46da5c99538017ef925c026/src/internal/NeoEsp32RmtMethod.h#L857 -#if !defined(WLED_NO_I2S0_PIXELBUS) && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3)) +#if !defined(WLED_NO_I2S0_PIXELBUS) && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)) #define WLED_NO_I2S0_PIXELBUS #endif -#if !defined(WLED_NO_I2S1_PIXELBUS) && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S2)) +#if !defined(WLED_NO_I2S1_PIXELBUS) && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32S2)) #define WLED_NO_I2S1_PIXELBUS #endif + +#if !defined(WLED_NO_RMT_PIXELBUS) && defined(CONFIG_IDF_TARGET_ESP32C6) // NPB only supports BitBang on -C6 at the moment +#define WLED_NO_RMT_PIXELBUS +#endif + // temporary end // WLEDMM TroyHacks support - SLOWPATH has priority over TWOPATH @@ -186,25 +191,37 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca /*** ESP32 Neopixel methods ***/ #ifdef ARDUINO_ARCH_ESP32 //RGB +#if defined(WLED_NO_RMT_PIXELBUS) +#define B_32_RN_NEO_3 NeoPixelBusLg +#else #define B_32_RN_NEO_3 NeoPixelBusLg +#endif #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_NEO_3 NeoPixelBusLg #endif #ifndef WLED_NO_I2S1_PIXELBUS #define B_32_I1_NEO_3 NeoPixelBusLg #endif -//#define B_32_BB_NEO_3 NeoPixelBrightnessBus // NeoEsp8266BitBang800KbpsMethod +//#define B_32_BB_NEO_3 NeoPixelBusLg // NeoEsp8266BitBang800KbpsMethod //RGBW +#if defined(WLED_NO_RMT_PIXELBUS) +#define B_32_RN_NEO_4 NeoPixelBusLg +#else #define B_32_RN_NEO_4 NeoPixelBusLg +#endif #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_NEO_4 NeoPixelBusLg #endif #ifndef WLED_NO_I2S1_PIXELBUS #define B_32_I1_NEO_4 NeoPixelBusLg #endif -//#define B_32_BB_NEO_4 NeoPixelBrightnessBus // NeoEsp8266BitBang800KbpsMethod +//#define B_32_BB_NEO_4 NeoPixelBusLg // NeoEsp8266BitBang800KbpsMethod //400Kbps +#if defined(WLED_NO_RMT_PIXELBUS) +#define B_32_RN_400_3 NeoPixelBusLg +#else #define B_32_RN_400_3 NeoPixelBusLg +#endif #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_400_3 NeoPixelBusLg #endif @@ -213,7 +230,11 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #endif //#define B_32_BB_400_3 NeoPixelBrightnessBus // NeoEsp8266BitBang400KbpsMethod //TM1814 (RGBW) +#if defined(WLED_NO_RMT_PIXELBUS) +#define B_32_RN_TM1_4 NeoPixelBusLg +#else #define B_32_RN_TM1_4 NeoPixelBusLg +#endif #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_TM1_4 NeoPixelBusLg #endif @@ -222,7 +243,11 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #endif //Bit Bang theoratically possible, but very undesirable and not needed (no pin restrictions on RMT and I2S) //TM1829 (RGB) +#if defined(WLED_NO_RMT_PIXELBUS) +#define B_32_RN_TM2_3 NeoPixelBusLg +#else #define B_32_RN_TM2_3 NeoPixelBusLg +#endif #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_TM2_3 NeoPixelBusLg #endif @@ -231,7 +256,11 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #endif //Bit Bang theoratically possible, but very undesirable and not needed (no pin restrictions on RMT and I2S) //UCS8903 +#if defined(WLED_NO_RMT_PIXELBUS) +#define B_32_RN_UCS_3 NeoPixelBusLg +#else #define B_32_RN_UCS_3 NeoPixelBusLg +#endif #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_UCS_3 NeoPixelBusLg #endif @@ -240,7 +269,11 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #endif //Bit Bang theoratically possible, but very undesirable and not needed (no pin restrictions on RMT and I2S) //UCS8904 +#if defined(WLED_NO_RMT_PIXELBUS) +#define B_32_RN_UCS_4 NeoPixelBusLg +#else #define B_32_RN_UCS_4 NeoPixelBusLg +#endif #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_UCS_4 NeoPixelBusLg #endif @@ -456,7 +489,11 @@ class PolyBus { case I_8266_BB_UCS_4: busPtr = new B_8266_BB_UCS_4(len, pins[0]); break; #endif #ifdef ARDUINO_ARCH_ESP32 +#if defined(WLED_NO_RMT_PIXELBUS) + case I_32_RN_NEO_3: busPtr = new B_32_RN_NEO_3(len, pins[0]); USER_PRINT("(BitBang) "); break; +#else case I_32_RN_NEO_3: busPtr = new B_32_RN_NEO_3(len, pins[0], (NeoBusChannel)channel); USER_PRINTF("(RMT #%u) ", channel); break; +#endif #ifndef WLED_NO_I2S0_PIXELBUS case I_32_I0_NEO_3: busPtr = new B_32_I0_NEO_3(len, pins[0]); USER_PRINT("(I2S #0) "); break; #endif @@ -464,7 +501,11 @@ class PolyBus { case I_32_I1_NEO_3: busPtr = new B_32_I1_NEO_3(len, pins[0]); USER_PRINT("(I2S #1) "); break; #endif // case I_32_BB_NEO_3: busPtr = new B_32_BB_NEO_3(len, pins[0], (NeoBusChannel)channel); break; +#if defined(WLED_NO_RMT_PIXELBUS) + case I_32_RN_NEO_4: busPtr = new B_32_RN_NEO_4(len, pins[0]); USER_PRINT("(RGBW BitBang) "); break; +#else case I_32_RN_NEO_4: busPtr = new B_32_RN_NEO_4(len, pins[0], (NeoBusChannel)channel); USER_PRINTF("(RGBW RMT #%u) ", channel); break; +#endif #ifndef WLED_NO_I2S0_PIXELBUS case I_32_I0_NEO_4: busPtr = new B_32_I0_NEO_4(len, pins[0]); USER_PRINT("(RGBW I2S #0) "); break; #endif @@ -472,7 +513,11 @@ class PolyBus { case I_32_I1_NEO_4: busPtr = new B_32_I1_NEO_4(len, pins[0]); USER_PRINT("(RGBW I2S #1) "); break; #endif // case I_32_BB_NEO_4: busPtr = new B_32_BB_NEO_4(len, pins[0], (NeoBusChannel)channel); break; +#if defined(WLED_NO_RMT_PIXELBUS) + case I_32_RN_400_3: busPtr = new B_32_RN_400_3(len, pins[0]); break; +#else case I_32_RN_400_3: busPtr = new B_32_RN_400_3(len, pins[0], (NeoBusChannel)channel); break; +#endif #ifndef WLED_NO_I2S0_PIXELBUS case I_32_I0_400_3: busPtr = new B_32_I0_400_3(len, pins[0]); break; #endif @@ -480,8 +525,13 @@ class PolyBus { case I_32_I1_400_3: busPtr = new B_32_I1_400_3(len, pins[0]); break; #endif // case I_32_BB_400_3: busPtr = new B_32_BB_400_3(len, pins[0], (NeoBusChannel)channel); break; +#if defined(WLED_NO_RMT_PIXELBUS) + case I_32_RN_TM1_4: busPtr = new B_32_RN_TM1_4(len, pins[0]); break; + case I_32_RN_TM2_3: busPtr = new B_32_RN_TM2_3(len, pins[0]); break; +#else case I_32_RN_TM1_4: busPtr = new B_32_RN_TM1_4(len, pins[0], (NeoBusChannel)channel); break; case I_32_RN_TM2_3: busPtr = new B_32_RN_TM2_3(len, pins[0], (NeoBusChannel)channel); break; +#endif #ifndef WLED_NO_I2S0_PIXELBUS case I_32_I0_TM1_4: busPtr = new B_32_I0_TM1_4(len, pins[0]); break; case I_32_I0_TM2_3: busPtr = new B_32_I0_TM2_3(len, pins[0]); break; @@ -490,7 +540,11 @@ class PolyBus { case I_32_I1_TM1_4: busPtr = new B_32_I1_TM1_4(len, pins[0]); break; case I_32_I1_TM2_3: busPtr = new B_32_I1_TM2_3(len, pins[0]); break; #endif +#if defined(WLED_NO_RMT_PIXELBUS) + case I_32_RN_UCS_3: busPtr = new B_32_RN_UCS_3(len, pins[0]); break; +#else case I_32_RN_UCS_3: busPtr = new B_32_RN_UCS_3(len, pins[0], (NeoBusChannel)channel); break; +#endif #ifndef WLED_NO_I2S0_PIXELBUS case I_32_I0_UCS_3: busPtr = new B_32_I0_UCS_3(len, pins[0]); break; #endif @@ -498,7 +552,11 @@ class PolyBus { case I_32_I1_UCS_3: busPtr = new B_32_I1_UCS_3(len, pins[0]); break; #endif // case I_32_BB_UCS_3: busPtr = new B_32_BB_UCS_3(len, pins[0], (NeoBusChannel)channel); break; +#if defined(WLED_NO_RMT_PIXELBUS) + case I_32_RN_UCS_4: busPtr = new B_32_RN_UCS_4(len, pins[0]); break; +#else case I_32_RN_UCS_4: busPtr = new B_32_RN_UCS_4(len, pins[0], (NeoBusChannel)channel); break; +#endif #ifndef WLED_NO_I2S0_PIXELBUS case I_32_I0_UCS_4: busPtr = new B_32_I0_UCS_4(len, pins[0]); break; #endif @@ -1205,6 +1263,11 @@ class PolyBus { // On ESP32-C3 only the first 2 RMT channels are usable for transmitting if (num > 1) return I_NONE; //if (num > 1) offset = 1; // I2S not supported yet (only 1 I2S) + #elif defined(CONFIG_IDF_TARGET_ESP32C6) + // toDo: double-check everything is the same -C3 + // On ESP32-C6 only the first 2 RMT channels are usable for transmitting + if (num > 1) return I_NONE; + //if (num > 1) offset = 1; // I2S not supported yet (only 1 I2S) #elif defined(CONFIG_IDF_TARGET_ESP32S3) // On ESP32-S3 only the first 4 RMT channels are usable for transmitting if (num > 3) return I_NONE; From 246e2e9c450643289e41c2517b4b98a7630b596c Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:56:44 +0200 Subject: [PATCH 04/22] workaround for network class naming conflict on -C6 --- wled00/src/dependencies/e131/ESPAsyncE131.cpp | 4 ++++ wled00/src/dependencies/network/Network.cpp | 6 +++++- wled00/src/dependencies/network/Network.h | 4 ++++ wled00/wled.h | 5 ++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/wled00/src/dependencies/e131/ESPAsyncE131.cpp b/wled00/src/dependencies/e131/ESPAsyncE131.cpp index 75d6b8dc29..b2b1f8c95c 100644 --- a/wled00/src/dependencies/e131/ESPAsyncE131.cpp +++ b/wled00/src/dependencies/e131/ESPAsyncE131.cpp @@ -21,6 +21,10 @@ #include "../network/Network.h" #include +#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) +#define Network WL_Network +#endif + // E1.17 ACN Packet Identifier const byte ESPAsyncE131::ACN_ID[12] = { 0x41, 0x53, 0x43, 0x2d, 0x45, 0x31, 0x2e, 0x31, 0x37, 0x00, 0x00, 0x00 }; diff --git a/wled00/src/dependencies/network/Network.cpp b/wled00/src/dependencies/network/Network.cpp index d86bf127fd..6a97a2de8f 100644 --- a/wled00/src/dependencies/network/Network.cpp +++ b/wled00/src/dependencies/network/Network.cpp @@ -1,5 +1,9 @@ #include "Network.h" +#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) +//#define NetworkClass NetworkManager +#endif + IPAddress NetworkClass::localIP() { IPAddress localIP; @@ -88,4 +92,4 @@ bool NetworkClass::isEthernet() return false; } -NetworkClass Network; \ No newline at end of file +NetworkClass WL_Network; \ No newline at end of file diff --git a/wled00/src/dependencies/network/Network.h b/wled00/src/dependencies/network/Network.h index 9201d514ea..7daddf1c88 100644 --- a/wled00/src/dependencies/network/Network.h +++ b/wled00/src/dependencies/network/Network.h @@ -19,6 +19,10 @@ class NetworkClass bool isEthernet(); }; +#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) +extern NetworkClass WL_Network; +#else extern NetworkClass Network; +#endif #endif \ No newline at end of file diff --git a/wled00/wled.h b/wled00/wled.h index 96530ac286..7772445d56 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -128,6 +128,9 @@ #include #include "src/dependencies/network/Network.h" +#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) +#define Network WL_Network +#endif #ifdef WLED_USE_MY_CONFIG #include "my_config.h" @@ -327,7 +330,7 @@ WLED_GLOBAL int8_t irPin _INIT(-1); WLED_GLOBAL int8_t irPin _INIT(IRPIN); #endif -#if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S2) || (defined(RX) && defined(TX)) +#if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) ||defined(CONFIG_IDF_TARGET_ESP32S2) || (defined(RX) && defined(TX)) // use RX/TX as set by the framework - these boards do _not_ have RX=3 and TX=1 constexpr uint8_t hardwareRX = RX; constexpr uint8_t hardwareTX = TX; From e843d8af25049392c490e79076e34a809808c1d2 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:58:39 +0200 Subject: [PATCH 05/22] adding new type for -C6 (nodes overview, improv, info page) --- wled00/NodeStruct.h | 1 + wled00/improv.cpp | 4 +++- wled00/udp.cpp | 2 ++ wled00/xml.cpp | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/wled00/NodeStruct.h b/wled00/NodeStruct.h index 916c5a9a32..647c005af3 100644 --- a/wled00/NodeStruct.h +++ b/wled00/NodeStruct.h @@ -14,6 +14,7 @@ #define NODE_TYPE_ID_ESP32S2 33 #define NODE_TYPE_ID_ESP32S3 34 #define NODE_TYPE_ID_ESP32C3 35 +#define NODE_TYPE_ID_ESP32C6 36 /*********************************************************************************************\ * NodeStruct diff --git a/wled00/improv.cpp b/wled00/improv.cpp index eef8ad82e7..4458027eb4 100644 --- a/wled00/improv.cpp +++ b/wled00/improv.cpp @@ -10,7 +10,7 @@ #define DIMPROV_PRINTF(x...) #endif -#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3) +#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32S3) #undef WLED_DISABLE_IMPROV_WIFISCAN #define WLED_DISABLE_IMPROV_WIFISCAN #endif @@ -199,6 +199,8 @@ void sendImprovInfoResponse() { "esp8266" #elif CONFIG_IDF_TARGET_ESP32C3 "esp32-c3" + #elif CONFIG_IDF_TARGET_ESP32C6 + "esp32-c6" #elif CONFIG_IDF_TARGET_ESP32S2 "esp32-s2" #elif CONFIG_IDF_TARGET_ESP32S3 diff --git a/wled00/udp.cpp b/wled00/udp.cpp index 0a2d53324b..a7899e9379 100644 --- a/wled00/udp.cpp +++ b/wled00/udp.cpp @@ -703,6 +703,8 @@ void sendSysInfoUDP() data[38] = NODE_TYPE_ID_ESP8266; #elif defined(CONFIG_IDF_TARGET_ESP32C3) data[38] = NODE_TYPE_ID_ESP32C3; + #elif defined(CONFIG_IDF_TARGET_ESP32C6) + data[38] = NODE_TYPE_ID_ESP32C6; #elif defined(CONFIG_IDF_TARGET_ESP32S3) data[38] = NODE_TYPE_ID_ESP32S3; #elif defined(CONFIG_IDF_TARGET_ESP32S2) diff --git a/wled00/xml.cpp b/wled00/xml.cpp index 72fdf219fd..16051e6634 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -850,6 +850,8 @@ void getSettingsJS(AsyncWebServerRequest* request, byte subPage, char* dest) //W oappend(SET_F(".bin
(")); #if defined(CONFIG_IDF_TARGET_ESP32C3) oappend(SET_F("ESP32-C3")); + #elif defined(CONFIG_IDF_TARGET_ESP32C6) + oappend(SET_F("ESP32-C6")); #elif defined(CONFIG_IDF_TARGET_ESP32S3) oappend(SET_F("ESP32-S3")); #elif defined(CONFIG_IDF_TARGET_ESP32S2) From 404c88c138a2ff1d60779169f4cb343e8ea625a2 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:59:41 +0200 Subject: [PATCH 06/22] -C6: rtc_get_reset_reason --> esp_rom_get_reset_reason() --- wled00/json.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wled00/json.cpp b/wled00/json.cpp index 5456b45567..563d8790f9 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -771,7 +771,11 @@ void serializeState(JsonObject root, bool forPreset, bool includeBri, bool segme #ifdef ARDUINO_ARCH_ESP32 int getCoreResetReason(int core) { if (core >= ESP.getChipCores()) return 0; +#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) + return((int)esp_rom_get_reset_reason(core)); +#else return((int)rtc_get_reset_reason(core)); +#endif } String resetCode2Info(int reason) { @@ -1085,12 +1089,21 @@ void serializeInfo(JsonObject root) // begin WLEDMM #ifdef ARDUINO_ARCH_ESP32 +#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) + root[F("e32core0code")] = (int)esp_rom_get_reset_reason(0); + root[F("e32core0text")] = resetCode2Info(esp_rom_get_reset_reason(0)); + if(ESP.getChipCores() > 1) { + root[F("e32core1code")] = (int)esp_rom_get_reset_reason(1); + root[F("e32core1text")] = resetCode2Info(esp_rom_get_reset_reason(1)); + } +#else root[F("e32core0code")] = (int)rtc_get_reset_reason(0); root[F("e32core0text")] = resetCode2Info(rtc_get_reset_reason(0)); if(ESP.getChipCores() > 1) { root[F("e32core1code")] = (int)rtc_get_reset_reason(1); root[F("e32core1text")] = resetCode2Info(rtc_get_reset_reason(1)); } +#endif root[F("e32code")] = (int)getRestartReason(); root[F("e32text")] = restartCode2Info(getRestartReason()); From 3bf3a251876d9eab65662f7b7cb1a1f7c3065bd5 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 17:01:50 +0200 Subject: [PATCH 07/22] pinmanager update for -C6 The ESP32-C6 chip features 31 physical GPIO pins (GPIO0 ~ GPIO30). Each pin can be used as a general-purpose I/O, or to be connected to an internal peripheral signal. restrictions: ----------------- SPI0/1: GPIO24 ~ GPIO30 are usually used for SPI flash and not recommended for other uses. USB-JTAG: GPIO12 and GPIO13 are used by USB-JTAG by default. If they are reconfigured to operate as normal GPIOs, USB-JTAG functionality will be disabled. Strapping pin: GPIO4, GPIO5, GPIO8, GPIO9, and GPIO15 are strapping pins. For more information, please refer to datasheet. For chip variants with an SiP flash built in, GPIO24 ~ GPIO30 are dedicated to connecting the SiP flash; GPIO10 ~ GPIO11 are not led out to any chip pins; therefore, only the remaining 22 GPIO pins are available. For chip variants without an in-package flash, GPIO14 is not led out to any chip pins. --- wled00/pin_manager.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/wled00/pin_manager.cpp b/wled00/pin_manager.cpp index a9c31bde78..6f8232814d 100644 --- a/wled00/pin_manager.cpp +++ b/wled00/pin_manager.cpp @@ -131,7 +131,9 @@ String PinManagerClass::getPinSpecialText(int gpio) { // special purpose PIN in // ESP32-C3 if (gpio > 17 && gpio < 20) return (F("USB (CDC) / JTAG")); //if (gpio == 2 || gpio == 8 || gpio == 9) return (F("(strapping pin)")); - + #elif defined(CONFIG_IDF_TARGET_ESP32C6) + // ESP32-C6 + if (gpio > 11 && gpio < 14) return (F("USB (CDC) / JTAG")); #else // "classic" ESP32, or ESP32 PICO-D4 //if (gpio == 0 || gpio == 2 || gpio == 5) return (F("(strapping pin)")); @@ -261,7 +263,7 @@ String PinManagerClass::getPinSpecialText(int gpio) { // special purpose PIN in // ADC PINs - not for 8266 if (digitalPinToAnalogChannel(gpio) >= 0) { // ADC pin #ifdef SOC_ADC_CHANNEL_NUM - if (digitalPinToAnalogChannel(gpio) < SOC_ADC_CHANNEL_NUM(0)) return(F("ADC-1")); // for ESP32-S3, ESP32-S2, ESP32-C3 + if (digitalPinToAnalogChannel(gpio) < SOC_ADC_CHANNEL_NUM(0)) return(F("ADC-1")); // for ESP32-S3, ESP32-S2, ESP32-C3 , ESP32-C6 #else if (digitalPinToAnalogChannel(gpio) < 8) return(F("ADC-1")); // for classic ESP32 #endif @@ -654,7 +656,7 @@ bool PinManagerClass::joinWire(int8_t pinSDA, int8_t pinSCL) { if (gpio == A0) return true; // for 8266 #else // for ESP32 variants #ifdef SOC_ADC_CHANNEL_NUM - if (digitalPinToAnalogChannel(gpio) < SOC_ADC_CHANNEL_NUM(0)) return true; // ADC1 on ESP32-S3, ESP32-S2, ESP32-C3 + if (digitalPinToAnalogChannel(gpio) < SOC_ADC_CHANNEL_NUM(0)) return true; // ADC1 on ESP32-S3, ESP32-S2, ESP32-C3, ESP32-C6 #else if (digitalPinToAnalogChannel(gpio) < 8) return true; // ADC1 on classic ESP32 #endif @@ -685,7 +687,7 @@ bool PinManagerClass::joinWire(int8_t pinSDA, int8_t pinSCL) { #else // for ESP32 variants if ((adcUnit != ADC1) && (adcUnit != ADC2)) return(PM_NO_PIN); // catch errors - #if defined(SOC_ADC_MAX_CHANNEL_NUM) // for ESP32-S3, ESP32-S2, ESP32-C3 + #if defined(SOC_ADC_MAX_CHANNEL_NUM) // for ESP32-S3, ESP32-S2, ESP32-C3, ESP32-C6 int8_t analogChannel = (adcUnit == ADC1) ? adcPort : (SOC_ADC_MAX_CHANNEL_NUM + adcPort); if (adcPort >= SOC_ADC_MAX_CHANNEL_NUM) analogChannel = 255; #else // for classic ESP32 @@ -731,6 +733,11 @@ bool PinManagerClass::isPinOk(byte gpio, bool output) // strapping pins: 2, 8, & 9 if (gpio > 11 && gpio < 18) return false; // 11-17 SPI FLASH if (gpio > 17 && gpio < 20) return false; // 18-19 USB-JTAG + #elif defined(CONFIG_IDF_TARGET_ESP32C6) + // https://docs.espressif.com/projects/esp-idf/en/latest/esp32c6/api-reference/peripherals/gpio.html + // strapping pins: 4, 5, 8, 9 + if (gpio > 11 && gpio < 14) return false; // 12-13 USB-JTAG + if (gpio > 23 && gpio < 31) return false; // 24-30 SPI FLASH #elif defined(CONFIG_IDF_TARGET_ESP32S3) // 00 to 18 are for general use. Be careful about straping pins GPIO0 and GPIO3 - these may be pulled-up or pulled-down on your board. if (gpio > 18 && gpio < 21) return false; // 19 + 20 = USB-JTAG. Not recommended for other uses. @@ -764,7 +771,7 @@ PinOwner PinManagerClass::getPinOwner(byte gpio) { } #ifdef ARDUINO_ARCH_ESP32 -#if defined(CONFIG_IDF_TARGET_ESP32C3) +#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) #define MAX_LED_CHANNELS 6 #else #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) From 784affda4679b67252ff82842b7953e11c226e43 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 17:03:26 +0200 Subject: [PATCH 08/22] several places where -C6 should be treated like -C3 adding `#if defined(CONFIG_IDF_TARGET_ESP32C6)` whenever C3 was mentioned --- wled00/FX.cpp | 2 +- wled00/button.cpp | 2 +- wled00/const.h | 9 +++++++-- wled00/src/dependencies/dmx/SparkFunDMX.cpp | 2 +- wled00/wled.cpp | 6 +++--- wled00/wled_serial.cpp | 4 ++-- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 77efb26feb..81994b5b4b 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -7412,7 +7412,7 @@ uint16_t mode_freqmap(void) { // Map FFT_MajorPeak to SEGLEN. uint16_t pixCol = (log10f(FFT_MajorPeak) - 1.78f) * 255.0f/(MAX_FREQ_LOG10 - 1.78f); // Scale log10 of frequency values to the 255 colour index. if (FFT_MajorPeak < 61.0f) pixCol = 0; // handle underflow -#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) +#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C6) uint16_t bright = (int) (sqrtf(my_magnitude)*16.0f); // WLEDMM sqrt scaling, to make peaks more prominent #else uint16_t bright = (int)my_magnitude; diff --git a/wled00/button.cpp b/wled00/button.cpp index c1d0337667..9fdce29602 100644 --- a/wled00/button.cpp +++ b/wled00/button.cpp @@ -97,7 +97,7 @@ bool isButtonPressed(uint8_t i) if (digitalRead(pin) == HIGH) return true; break; case BTN_TYPE_TOUCH: - #if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) + #if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C6) if (touchRead(pin) <= touchThreshold) return true; #endif break; diff --git a/wled00/const.h b/wled00/const.h index 7857a1d33d..2e5b0c363b 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -28,7 +28,8 @@ #define WLED_MAX_BUSSES 3 #define WLED_MIN_VIRTUAL_BUSSES 2 #else - #if defined(CONFIG_IDF_TARGET_ESP32C3) // 2 RMT, 6 LEDC, only has 1 I2S but NPB does not support it ATM + #if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) // C6 is very similar to C3 + // 2 RMT, 6 LEDC, only has 1 I2S but NPB does not support it ATM #define WLED_MAX_BUSSES 3 // will allow 2 digital & 1 analog (or the other way around) #define WLED_MIN_VIRTUAL_BUSSES 3 #elif defined(CONFIG_IDF_TARGET_ESP32S2) // 4 RMT, 8 LEDC, only has 1 I2S bus, supported in NPB @@ -393,7 +394,7 @@ #ifdef ESP8266 #define MAX_LED_MEMORY 4000 #else - #if defined(ARDUINO_ARCH_ESP32S2) || defined(ARDUINO_ARCH_ESP32C3) + #if defined(ARDUINO_ARCH_ESP32S2) || defined(ARDUINO_ARCH_ESP32C3) || defined(ARDUINO_ARCH_ESP32C6) #define MAX_LED_MEMORY 32000 #else #define MAX_LED_MEMORY 64000 @@ -536,4 +537,8 @@ #define IRAM_ATTR_YN #endif +#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) +#define pcTaskGetTaskName pcTaskGetName +#endif + #endif diff --git a/wled00/src/dependencies/dmx/SparkFunDMX.cpp b/wled00/src/dependencies/dmx/SparkFunDMX.cpp index dbc9b15909..ae8df1e22c 100644 --- a/wled00/src/dependencies/dmx/SparkFunDMX.cpp +++ b/wled00/src/dependencies/dmx/SparkFunDMX.cpp @@ -17,7 +17,7 @@ Distributed as-is; no warranty is given. #if defined(ARDUINO_ARCH_ESP32) #include -#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S2) +#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32S2) #include "SparkFunDMX.h" #include diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 71050d997e..f73a7d3cf3 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -35,7 +35,7 @@ #error please fix your build environment. only one CONFIG_IDF_TARGET may be defined #endif // make sure we have a supported CONFIG_IDF_TARGET_ - #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S3) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) + #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S3) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C6) #error please fix your build environment. No supported CONFIG_IDF_TARGET was defined #endif #if CONFIG_IDF_TARGET_ESP32_SOLO || CONFIG_IDF_TARGET_ESP32SOLO @@ -902,7 +902,7 @@ void WLED::initAP(bool resetAP) USER_PRINTLN(apSSID); // WLEDMM WiFi.softAPConfig(IPAddress(4, 3, 2, 1), IPAddress(4, 3, 2, 1), IPAddress(255, 255, 255, 0)); WiFi.softAP(apSSID, apPass, apChannel, apHide, 8); // WLED-MM allow up to 8 clients for ad-hoc "in the field" syncing. - #if defined(LOLIN_WIFI_FIX) && (defined(ARDUINO_ARCH_ESP32C3) || defined(ARDUINO_ARCH_ESP32S2) || defined(ARDUINO_ARCH_ESP32S3)) + #if defined(LOLIN_WIFI_FIX) && (defined(ARDUINO_ARCH_ESP32C3) || defined(ARDUINO_ARCH_ESP32C6) || defined(ARDUINO_ARCH_ESP32S2) || defined(ARDUINO_ARCH_ESP32S3)) WiFi.setTxPower(WIFI_POWER_8_5dBm); #endif @@ -1090,7 +1090,7 @@ void WLED::initConnection() WiFi.begin(clientSSID, clientPass); #ifdef ARDUINO_ARCH_ESP32 - #if defined(LOLIN_WIFI_FIX) && (defined(ARDUINO_ARCH_ESP32C3) || defined(ARDUINO_ARCH_ESP32S2) || defined(ARDUINO_ARCH_ESP32S3)) + #if defined(LOLIN_WIFI_FIX) && (defined(ARDUINO_ARCH_ESP32C3) || defined(ARDUINO_ARCH_ESP32C6) || defined(ARDUINO_ARCH_ESP32S2) || defined(ARDUINO_ARCH_ESP32S3)) WiFi.setTxPower(WIFI_POWER_8_5dBm); #endif WiFi.setSleep(!noWifiSleep); diff --git a/wled00/wled_serial.cpp b/wled00/wled_serial.cpp index 9361891b5a..2f5551276a 100644 --- a/wled00/wled_serial.cpp +++ b/wled00/wled_serial.cpp @@ -73,8 +73,8 @@ void sendBytes(){ } bool canUseSerial(void) { // WLEDMM returns true if Serial can be used for debug output (i.e. not configured for other purpose) - #if defined(CONFIG_IDF_TARGET_ESP32C3) && ARDUINO_USB_CDC_ON_BOOT && !defined(WLED_DEBUG_HOST) - // on -C3, USB CDC blocks if disconnected! so check if Serial is active before printing to it. + #if ARDUINO_USB_CDC_ON_BOOT && !defined(WLED_DEBUG_HOST) + // USB CDC blocks if disconnected! so check if Serial is active before printing to it. if (!Serial) return false; #endif if (pinManager.isPinAllocated(hardwareTX) && (pinManager.getPinOwner(hardwareTX) != PinOwner::DebugOut)) From 9fdb4c6661cdfb8a1efc8f157d8a654388f8367e Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 17:04:55 +0200 Subject: [PATCH 09/22] adding -C6 to github action builds --- platformio.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platformio.ini b/platformio.ini index 5190622263..26185a63fa 100644 --- a/platformio.ini +++ b/platformio.ini @@ -49,6 +49,8 @@ ; =================== default_envs = + esp32c6dev_8MB ;; highly experimental. + esp32c6dev_4MB ;; highly experimental. esp32_4MB_S ;; experimental, optimized for speed esp32_4MB_M ;; esp32 recommended default esp32_4MB_M_eth From 1a66d6e02ab3b7e8f448b9949f556d466f6432b5 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 17:12:25 +0200 Subject: [PATCH 10/22] make non-C6 builds work again --- wled00/src/dependencies/network/Network.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wled00/src/dependencies/network/Network.cpp b/wled00/src/dependencies/network/Network.cpp index 6a97a2de8f..1bdca49996 100644 --- a/wled00/src/dependencies/network/Network.cpp +++ b/wled00/src/dependencies/network/Network.cpp @@ -92,4 +92,8 @@ bool NetworkClass::isEthernet() return false; } -NetworkClass WL_Network; \ No newline at end of file +#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) +NetworkClass WL_Network; +#else +NetworkClass Network; +#endif \ No newline at end of file From 7b42a702839bb9bb3402ece038cb7bed00b6a906 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 17:56:57 +0200 Subject: [PATCH 11/22] hack to make 8266 compile again lessons learned: one doesn't simply `#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)` ;-P --- wled00/const.h | 2 ++ wled00/src/dependencies/e131/ESPAsyncE131.cpp | 2 ++ wled00/src/dependencies/network/Network.cpp | 8 ++++---- wled00/src/dependencies/network/Network.h | 4 ++++ wled00/wled.h | 9 +++++++++ 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/wled00/const.h b/wled00/const.h index 2e5b0c363b..dee942cd40 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -537,8 +537,10 @@ #define IRAM_ATTR_YN #endif +#ifdef ARDUINO_ARCH_ESP32 #if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) #define pcTaskGetTaskName pcTaskGetName #endif +#endif #endif diff --git a/wled00/src/dependencies/e131/ESPAsyncE131.cpp b/wled00/src/dependencies/e131/ESPAsyncE131.cpp index b2b1f8c95c..ea99e55fb5 100644 --- a/wled00/src/dependencies/e131/ESPAsyncE131.cpp +++ b/wled00/src/dependencies/e131/ESPAsyncE131.cpp @@ -21,9 +21,11 @@ #include "../network/Network.h" #include +#ifdef ARDUINO_ARCH_ESP32 #if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) #define Network WL_Network #endif +#endif // E1.17 ACN Packet Identifier const byte ESPAsyncE131::ACN_ID[12] = { 0x41, 0x53, 0x43, 0x2d, 0x45, 0x31, 0x2e, 0x31, 0x37, 0x00, 0x00, 0x00 }; diff --git a/wled00/src/dependencies/network/Network.cpp b/wled00/src/dependencies/network/Network.cpp index 1bdca49996..5396e8f322 100644 --- a/wled00/src/dependencies/network/Network.cpp +++ b/wled00/src/dependencies/network/Network.cpp @@ -1,9 +1,5 @@ #include "Network.h" -#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) -//#define NetworkClass NetworkManager -#endif - IPAddress NetworkClass::localIP() { IPAddress localIP; @@ -92,8 +88,12 @@ bool NetworkClass::isEthernet() return false; } +#ifdef ARDUINO_ARCH_ESP32 #if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) NetworkClass WL_Network; #else NetworkClass Network; +#endif +#else +NetworkClass Network; #endif \ No newline at end of file diff --git a/wled00/src/dependencies/network/Network.h b/wled00/src/dependencies/network/Network.h index 7daddf1c88..55418973f3 100644 --- a/wled00/src/dependencies/network/Network.h +++ b/wled00/src/dependencies/network/Network.h @@ -19,10 +19,14 @@ class NetworkClass bool isEthernet(); }; +#ifdef ARDUINO_ARCH_ESP32 #if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) extern NetworkClass WL_Network; #else extern NetworkClass Network; #endif +#else +extern NetworkClass Network; +#endif #endif \ No newline at end of file diff --git a/wled00/wled.h b/wled00/wled.h index 7772445d56..9e3f71478d 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -13,6 +13,15 @@ // WLEDMM - you can check for this define in usermods, to only enabled WLEDMM specific code in the "right" fork. Its not defined in AC WLED. #define _MoonModules_WLED_ +// a few hacks +#if !defined(ARDUINO_ARCH_ESP32) +#undef ESP_IDF_VERSION +#endif +#if !defined(ESP_IDF_VERSION) && !defined(ESP_IDF_VERSION_VAL) +#undef ESP_IDF_VERSION +#define ESP_IDF_VERSION_VAL(a,b,c) 99999999 // dummy +#endif + //WLEDMM + Moustachauve/Wled-Native // You can define custom product info from build flags. // This is useful to allow API consumer to identify what type of WLED version From 6d4b61156035e942081e8b2a591f54a910f36a4d Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 18:01:18 +0200 Subject: [PATCH 12/22] fix for fix --- wled00/wled.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wled00/wled.h b/wled00/wled.h index 9e3f71478d..22201b6734 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -16,11 +16,10 @@ // a few hacks #if !defined(ARDUINO_ARCH_ESP32) #undef ESP_IDF_VERSION -#endif -#if !defined(ESP_IDF_VERSION) && !defined(ESP_IDF_VERSION_VAL) -#undef ESP_IDF_VERSION +#if !defined(ESP_IDF_VERSION_VAL) #define ESP_IDF_VERSION_VAL(a,b,c) 99999999 // dummy #endif +#endif //WLEDMM + Moustachauve/Wled-Native // You can define custom product info from build flags. From 4ddead450e7df08ee0d822ffcc91b396c592c3b1 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 19:10:15 +0200 Subject: [PATCH 13/22] Update platformio.ini * more debug output * added my own fork of FastLED ( looks like more bugs to solve ....) --- platformio.ini | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 26185a63fa..9f369865cb 100644 --- a/platformio.ini +++ b/platformio.ini @@ -242,7 +242,7 @@ upload_speed = 115200 lib_compat_mode = strict lib_deps = ;; fastled/FastLED @ 3.6.0 - https://github.com/netmindz/FastLED.git#ESP32-C6 ;; patched version needed for -C6 + https://github.com/softhack007/FastLED.git#ESP32-C6 ;; patched version needed for -C6 IRremoteESP8266 @ 2.8.2 ;;makuna/NeoPixelBus @ 2.7.5 ;; WLEDMM will be added in board specific sections ;;https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.7 @@ -481,9 +481,13 @@ framework = arduino board = esp32-c6-devkitc-1 build_unflags = ${common.build_unflags} + -D CORE_DEBUG_LEVEL=0 + -D NDEBUG build_flags = ${common.build_flags} ${esp32c6.build_flags} -D WLED_RELEASE_NAME=ESP32-C6_8MB -Wno-volatile -Wno-deprecated-declarations ;; silence compiler warnings -Wno-cpp ;; silence '#pragma warning' messages + -D DEBUG -g3 -ggdb + -D CORE_DEBUG_LEVEL=4 -D WLED_WATCHDOG_TIMEOUT=0 ;; -DLOLIN_WIFI_FIX ; might be needed on "-C6 mini" ;;-DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual CDC USB From ee5f09aaf0c48e5832d64782304b1a003764d6ce Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 21:38:16 +0200 Subject: [PATCH 14/22] Update platformio.ini --- platformio.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 9f369865cb..782330a21e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -457,6 +457,7 @@ platform_packages = board = esp32-c6-devkitm-1 build_flags = -g + -DESP32 -DARDUINO_ARCH_ESP32 -DARDUINO_ARCH_ESP32C6 -DCONFIG_IDF_TARGET_ESP32C6=1 @@ -504,7 +505,7 @@ lib_ignore = board_build.partitions = ${esp32.large_partitions} board_build.f_flash = 80000000L board_build.flash_mode = qio -board_build.arduino.memory_type = qio_qspi +;; board_build.arduino.memory_type = qio_qspi monitor_filters = esp32_exception_decoder [env:esp32c6dev_4MB] From af9cfaed4afe1f60aa7d9df60f60fcc57568fbb0 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 13 Jun 2024 22:52:00 +0200 Subject: [PATCH 15/22] ESP32-Chip_info does not yet support C6 --- wled00/wled.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/wled.cpp b/wled00/wled.cpp index f73a7d3cf3..ff75d1f2eb 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -10,7 +10,7 @@ #include "soc/rtc_cntl_reg.h" #endif -#if defined(WLED_DEBUG) && defined(ARDUINO_ARCH_ESP32) +#if defined(WLED_DEBUG) && defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C6) #include "../tools/ESP32-Chip_info.hpp" #endif @@ -542,7 +542,7 @@ void WLED::setup() #endif USER_PRINT(F(", speed ")); USER_PRINT(ESP.getFlashChipSpeed()/1000000);USER_PRINTLN(F("MHz.")); - #if defined(WLED_DEBUG) && defined(ARDUINO_ARCH_ESP32) + #if defined(WLED_DEBUG) && defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C6) showRealSpeed(); #endif From f21350d089cb51e20918bfe409ae2b7ef9fc4b67 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 13 Jun 2024 22:58:59 +0200 Subject: [PATCH 16/22] Update platformio.ini --- platformio.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platformio.ini b/platformio.ini index 782330a21e..fce5c6317c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -480,6 +480,7 @@ platform = ${esp32c6.platform} platform_packages = ${esp32c6.platform_packages} framework = arduino board = esp32-c6-devkitc-1 +;;build_type = debug build_unflags = ${common.build_unflags} -D CORE_DEBUG_LEVEL=0 @@ -489,6 +490,9 @@ build_flags = ${common.build_flags} ${esp32c6.build_flags} -D WLED_RELEASE_NAME= -Wno-cpp ;; silence '#pragma warning' messages -D DEBUG -g3 -ggdb -D CORE_DEBUG_LEVEL=4 + -D WLED_DEBUG + ;;-D FASTLED_RMT_SERIAL_DEBUG=1 + -DFASTLED_NO_FASTLED ;; disables the global "FastLED" object -D WLED_WATCHDOG_TIMEOUT=0 ;; -DLOLIN_WIFI_FIX ; might be needed on "-C6 mini" ;;-DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual CDC USB @@ -497,6 +501,7 @@ build_flags = ${common.build_flags} ${esp32c6.build_flags} -D WLED_RELEASE_NAME= -D WLED_DISABLE_ESPNOW ;; not sure if this will work -D WLED_DISABLE_ALEXA ;; compile errors -D WLED_DISABLE_WEBSOCKETS ;; not sure if this will work (hacks needed in asyncWebserver) + -D LEDPIN=2 upload_speed = 460800 lib_deps = ${esp32c6.lib_deps} lib_ignore = From 3a132783ce7a19997fce8cb0424e22fa9e4c5fe9 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 13 Jun 2024 23:21:19 +0200 Subject: [PATCH 17/22] use full arduino framework ... instead of reduced Tasmota-Arduino --- platformio.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platformio.ini b/platformio.ini index fce5c6317c..7dceb18df0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -450,10 +450,10 @@ lib_deps = [esp32c6] ;; generic definitions for all ESP32-C6 boards platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.06.10/platform-espressif32.zip -platform_packages = -;;platform_packages = -;; framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1 -;; framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip +;;platform_packages = +platform_packages = + framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1 + framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip board = esp32-c6-devkitm-1 build_flags = -g @@ -480,7 +480,7 @@ platform = ${esp32c6.platform} platform_packages = ${esp32c6.platform_packages} framework = arduino board = esp32-c6-devkitc-1 -;;build_type = debug +;; build_type = debug build_unflags = ${common.build_unflags} -D CORE_DEBUG_LEVEL=0 From d07fe96190a895f4f127f5c5cc323d326bc1c0b6 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 13 Jun 2024 23:36:56 +0200 Subject: [PATCH 18/22] use smaller littleFS for 4MB esp32-C6 --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 7dceb18df0..4594245769 100644 --- a/platformio.ini +++ b/platformio.ini @@ -517,7 +517,7 @@ monitor_filters = esp32_exception_decoder ;; ESP32-C6 "devkit M" with 4MB flash extends = env:esp32c6dev_8MB board = esp32-c6-devkitm-1 -board_build.partitions = ${esp32.default_partitions} +board_build.partitions = ${esp32.big_partitions} build_unflags = ${env:esp32c6dev_8MB.build_unflags} -D WLED_RELEASE_NAME=ESP32-C6_8MB build_flags = ${env:esp32c6dev_8MB.build_flags} -D WLED_RELEASE_NAME=ESP32-C6_4MB From 656d6ae35e235641383d1ee9621a9f0a6d015586 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Fri, 14 Jun 2024 13:00:20 +0200 Subject: [PATCH 19/22] FASTLED_NO_FASTLED --- platformio.ini | 4 ++-- wled00/pin_manager.h | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 4594245769..5431880d41 100644 --- a/platformio.ini +++ b/platformio.ini @@ -486,8 +486,8 @@ build_unflags = ${common.build_unflags} -D CORE_DEBUG_LEVEL=0 -D NDEBUG build_flags = ${common.build_flags} ${esp32c6.build_flags} -D WLED_RELEASE_NAME=ESP32-C6_8MB - -Wno-volatile -Wno-deprecated-declarations ;; silence compiler warnings - -Wno-cpp ;; silence '#pragma warning' messages + ;;-Wno-volatile ;; -Wno-deprecated-declarations ;; silence compiler warnings + ;; -Wno-cpp ;; silence '#pragma warning' messages -D DEBUG -g3 -ggdb -D CORE_DEBUG_LEVEL=4 -D WLED_DEBUG diff --git a/wled00/pin_manager.h b/wled00/pin_manager.h index cb107f49d2..bdbd67870c 100644 --- a/wled00/pin_manager.h +++ b/wled00/pin_manager.h @@ -3,6 +3,15 @@ /* * Registers pins so there is no attempt for two interfaces to use the same pin */ + +#ifdef ARDUINO_ARCH_ESP32 +// get prototypes for GPIO_IS_VALID_GPIO and GPIO_IS_VALID_OUTPUT_GPIO +extern "C" { +#include "esp32-hal.h" +#include "driver/gpio.h" +} +#endif + #include #include "const.h" // for USERMOD_* values From 45ccab2e344833b0715936671e126521f4b52c8a Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:13:57 +0200 Subject: [PATCH 20/22] Update platformio.ini * reduce debug level * enable websockets (seems to work) * move NO_FASTLED into chip section * adjust LEDPIN and BTNPIN, to match my board --- platformio.ini | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/platformio.ini b/platformio.ini index 5431880d41..df6ddcbcb5 100644 --- a/platformio.ini +++ b/platformio.ini @@ -463,6 +463,7 @@ build_flags = -g -DCONFIG_IDF_TARGET_ESP32C6=1 -D CONFIG_ASYNC_TCP_USE_WDT=0 -DCO + -DFASTLED_NO_FASTLED ;; disable the global "FastLED" object (avoids crash at startup) -DARDUINO_USB_MODE=1 ;; this flag is mandatory for ESP32-C3 ;; 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 @@ -480,19 +481,17 @@ platform = ${esp32c6.platform} platform_packages = ${esp32c6.platform_packages} framework = arduino board = esp32-c6-devkitc-1 -;; build_type = debug +;;build_type = debug build_unflags = ${common.build_unflags} - -D CORE_DEBUG_LEVEL=0 - -D NDEBUG + ;; -D CORE_DEBUG_LEVEL=0 + ;; -D NDEBUG build_flags = ${common.build_flags} ${esp32c6.build_flags} -D WLED_RELEASE_NAME=ESP32-C6_8MB - ;;-Wno-volatile ;; -Wno-deprecated-declarations ;; silence compiler warnings - ;; -Wno-cpp ;; silence '#pragma warning' messages - -D DEBUG -g3 -ggdb - -D CORE_DEBUG_LEVEL=4 - -D WLED_DEBUG - ;;-D FASTLED_RMT_SERIAL_DEBUG=1 - -DFASTLED_NO_FASTLED ;; disables the global "FastLED" object + ;; -Wno-volatile ;; -Wno-deprecated-declarations ;; silence compiler warnings + ;; -Wno-cpp ;; silence '#pragma warning' messages + ;; -D DEBUG -g3 -ggdb + ;; -D CORE_DEBUG_LEVEL=4 + ;; -D WLED_DEBUG -D WLED_WATCHDOG_TIMEOUT=0 ;; -DLOLIN_WIFI_FIX ; might be needed on "-C6 mini" ;;-DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual CDC USB @@ -500,8 +499,9 @@ build_flags = ${common.build_flags} ${esp32c6.build_flags} -D WLED_RELEASE_NAME= -D WLED_DISABLE_INFRARED ;; library not not compatible with -C6 -D WLED_DISABLE_ESPNOW ;; not sure if this will work -D WLED_DISABLE_ALEXA ;; compile errors - -D WLED_DISABLE_WEBSOCKETS ;; not sure if this will work (hacks needed in asyncWebserver) - -D LEDPIN=2 + ;;-D WLED_DISABLE_WEBSOCKETS ;; not sure if this will work (hacks needed in asyncWebserver) + -D BTNPIN=9 + -D LEDPIN=8 upload_speed = 460800 lib_deps = ${esp32c6.lib_deps} lib_ignore = From dc0371f918d4b54d74d00b1ec88581e04557e9fe Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:37:20 +0200 Subject: [PATCH 21/22] post-merge fixes --- wled00/bus_manager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index a24fdf2815..ce3efbee74 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -233,6 +233,7 @@ BusPwm::BusPwm(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite) { uint8_t numPins = NUM_PWM_PINS(bc.type); _frequency = bc.frequency ? bc.frequency : WLED_PWM_FREQ; +#if !defined(CONFIG_IDF_TARGET_ESP32C6) // PWM (ledc) not yet working, due to breaking changes in new API #ifdef ESP8266 analogWriteRange(255); //same range as one RGB channel analogWriteFreq(_frequency); @@ -261,6 +262,7 @@ BusPwm::BusPwm(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite) { USER_PRINTLN("] "); reversed = bc.reversed; _valid = true; +#endif } void BusPwm::setPixelColor(uint16_t pix, uint32_t c) { @@ -344,6 +346,7 @@ uint32_t BusPwm::getPixelColor(uint16_t pix) { void BusPwm::show() { if (!_valid) return; +#if !defined(CONFIG_IDF_TARGET_ESP32C6) // PWM (ledc) not yet working, due to breaking changes in new API uint8_t numPins = NUM_PWM_PINS(_type); for (uint8_t i = 0; i < numPins; i++) { uint8_t scaled = (_data[i] * _bri) / 255; @@ -354,6 +357,7 @@ void BusPwm::show() { ledcWrite(_ledcStart + i, scaled); #endif } +#endif } uint8_t BusPwm::getPins(uint8_t* pinArray) { @@ -370,11 +374,13 @@ void BusPwm::deallocatePins() { for (uint8_t i = 0; i < numPins; i++) { pinManager.deallocatePin(_pins[i], PinOwner::BusPwm); if (!pinManager.isPinOk(_pins[i])) continue; +#if !defined(CONFIG_IDF_TARGET_ESP32C6) // PWM (ledc) not yet working, due to breaking changes in new API #ifdef ESP8266 digitalWrite(_pins[i], LOW); //turn off PWM interrupt #else if (_ledcStart < 16) ledcDetachPin(_pins[i]); #endif +#endif } #ifdef ARDUINO_ARCH_ESP32 pinManager.deallocateLedc(_ledcStart, numPins); From 5e160b8d4cf62664ed99e6cfe920af4ffba1a9cb Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:57:26 +0200 Subject: [PATCH 22/22] upgrade to arduino 3.0.3 --- platformio.ini | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/platformio.ini b/platformio.ini index ad936fa3ff..b2efb4c217 100644 --- a/platformio.ini +++ b/platformio.ini @@ -450,11 +450,12 @@ lib_deps = [esp32c6] ;; generic definitions for all ESP32-C6 boards -platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.06.10/platform-espressif32.zip +;;platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.06.10/platform-espressif32.zip +platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.07.11/platform-espressif32.zip ;;platform_packages = platform_packages = - framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1 - framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip + framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.3 + framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.3/esp32-arduino-libs-3.0.3.zip board = esp32-c6-devkitm-1 build_flags = -g @@ -464,10 +465,11 @@ build_flags = -g -DCONFIG_IDF_TARGET_ESP32C6=1 -D CONFIG_ASYNC_TCP_USE_WDT=0 -DCO - -DFASTLED_NO_FASTLED ;; disable the global "FastLED" object (avoids crash at startup) + -DESP32_ARDUINO_NO_RGB_BUILTIN ;; avoids RMT driver abort on startup "E (98) rmt(legacy): CONFLICT! driver_ng is not allowed to be used with the legacy driver" -DARDUINO_USB_MODE=1 ;; this flag is mandatory for ESP32-C3 ;; 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 + -DFASTLED_NO_FASTLED ;; disable the global "FastLED" object (avoids crash at startup) lib_deps = ;;https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 https://github.com/softhack007/AsyncTCP.git#ESP32-C6 ;; patched version needed for -C6 @@ -488,7 +490,7 @@ build_unflags = ${common.build_unflags} ;; -D CORE_DEBUG_LEVEL=0 ;; -D NDEBUG build_flags = ${common.build_flags} ${esp32c6.build_flags} -D WLED_RELEASE_NAME=ESP32-C6_8MB - ;; -Wno-volatile ;; -Wno-deprecated-declarations ;; silence compiler warnings + -Wno-volatile ;; -Wno-deprecated-declarations ;; silence compiler warnings ;; -Wno-cpp ;; silence '#pragma warning' messages ;; -D DEBUG -g3 -ggdb ;; -D CORE_DEBUG_LEVEL=4