diff --git a/platformio.ini b/platformio.ini index faa6f162..4d3c292f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -162,8 +162,7 @@ lib_compat_mode = strict lib_deps = fastled/FastLED @ 3.4.0 IRremoteESP8266 @ 2.7.18 - https://github.com/lorol/LITTLEFS.git - https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.2 + https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.4 #For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line #TFT_eSPI #For use SSD1306 OLED display uncomment following @@ -198,6 +197,7 @@ build_flags = lib_deps = ${env.lib_deps} + https://github.com/lorol/LITTLEFS.git # ESPAsyncTCP @ 1.2.0 ESPAsyncUDP makuna/NeoPixelBus @ 2.6.7 # 2.6.5/2.6.6 and newer do not compile on ESP core < 3.0.0 @@ -212,13 +212,13 @@ default_partitions = tools/WLED_ESP32_4MB_1MB_FS.csv lib_deps = ${env.lib_deps} + https://github.com/lorol/LITTLEFS.git makuna/NeoPixelBus @ 2.6.7 https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 [esp32s2] build_flags = -g -DARDUINO_ARCH_ESP32 - -DCONFIG_LITTLEFS_FOR_IDF_3_2 -DARDUINO_ARCH_ESP32S2 -DCONFIG_IDF_TARGET_ESP32S2 -D CONFIG_ASYNC_TCP_USE_WDT=0 @@ -314,12 +314,10 @@ lib_deps = ${esp32.lib_deps} board_build.partitions = ${esp32.default_partitions} [env:esp32s2_saola] -board = esp32dev -board_build.mcu = esp32s2 -platform = espressif32 +board = esp32-s2-saola-1 +platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream platform_packages = - toolchain-xtensa32s2 - framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.0-alpha1 + framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.2 framework = arduino board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv upload_speed = 460800 diff --git a/wled00/file.cpp b/wled00/file.cpp index 0d0f59ca..d42ab45d 100644 --- a/wled00/file.cpp +++ b/wled00/file.cpp @@ -5,7 +5,7 @@ */ #ifdef ARDUINO_ARCH_ESP32 //FS info bare IDF function until FS wrapper is available for ESP32 -#if WLED_FS != LITTLEFS +#if WLED_FS != LITTLEFS || ESP_IDF_VERSION_MAJOR >= 4 #include "esp_spiffs.h" #endif #endif @@ -359,7 +359,7 @@ bool readObjectFromFile(const char* file, const char* key, JsonDocument* dest) void updateFSInfo() { #ifdef ARDUINO_ARCH_ESP32 - #if WLED_FS == LITTLEFS + #if WLED_FS == LITTLEFS && ESP_IDF_VERSION_MAJOR < 4 fsBytesTotal = LITTLEFS.totalBytes(); fsBytesUsed = LITTLEFS.usedBytes(); #else diff --git a/wled00/wled.h b/wled00/wled.h index 8be68f59..b5e4f7ad 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -70,10 +70,14 @@ #include #include //#include "SPIFFS.h" - #ifndef CONFIG_LITTLEFS_FOR_IDF_3_2 - #define CONFIG_LITTLEFS_FOR_IDF_3_2 + #if ESP_IDF_VERSION_MAJOR < 4 + #ifndef CONFIG_LITTLEFS_FOR_IDF_3_2 + #define CONFIG_LITTLEFS_FOR_IDF_3_2 + #endif + #include + #else + #include #endif - #include #endif #include "src/dependencies/network/Network.h" @@ -172,7 +176,11 @@ using PSRAMDynamicJsonDocument = BasicJsonDocument; #ifdef ESP8266 #define WLED_FS LittleFS #else - #define WLED_FS LITTLEFS + #if ESP_IDF_VERSION_MAJOR < 4 + #define WLED_FS LITTLEFS + #else + #define WLED_FS LittleFS + #endif #endif // GLOBAL VARIABLES