-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for ESP32-S2 + Async config updates
pio - add pbolduc/AsyncTCP - add CONFIG_ASYNC_TCP_USE_WDT=0 !! - add CONFIG_IDF_TARGET_ESP32 - add lolin_s2_mini - lolin_s2_mini uses WLED_ESP32_4MB_256KB_FS AppModLeds - FastLED.addLeds for CONFIG_IDF_TARGET_ESP32S2 SysModModel - Add RAM_Allocator: use PSRam if present - Replace DynamicJsonDocument by BasicJsonDocument<RAM_Allocator> for model so model uses PSRam if present SysModSystem - add chip info - add psram info (if present)
- Loading branch information
Showing
6 changed files
with
198 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,11 @@ | |
[starmod] | ||
lib_deps = | ||
https://github.com/bblanchon/ArduinoJson.git#v6.21.4 | ||
; https://github.com/ewowi/ESPAsyncWebServer.git ;me-no-dev + 64 + queueLength | ||
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 ;; WLEDMM this must be first in the list, otherwise Aircoookie/ESPAsyncWebServer pulls in an older version of AsyncTCP !! | ||
https://github.com/ewoudwijma/ESPAsyncWebServer.git ;aircoookie + getClients + 64 | ||
; https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 ;optionally combine with aircoookie | ||
; https://github.com/ewowi/ESPAsyncWebServer.git ;me-no-dev + 64 + queueLength - alternative | ||
; https://github.com/lost-hope/ESPAsyncWebServer.git#master ;artifx on <ip>/edit | ||
; https://github.com/Jason2866/ESP32_Show_Info.git | ||
|
||
[appmod_leds] | ||
build_flags = | ||
|
@@ -43,29 +44,55 @@ lib_deps = | |
https://github.com/netmindz/WLED-sync#v0.14.0.b16 | ||
|
||
[env:esp32dev] | ||
platform = espressif32 ;using platformio/framework-arduinoespressif32 @ ~3.20014.0 / framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) | ||
board = esp32dev | ||
platform = espressif32 ;using platformio/framework-arduinoespressif32 @ ~3.20014.0 / framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) | ||
framework = arduino | ||
monitor_speed = 115200 | ||
upload_speed = 1500000 | ||
monitor_speed = 115200 | ||
monitor_filters = esp32_exception_decoder | ||
board_build.filesystem = littlefs | ||
build_flags = | ||
${appmod_leds.build_flags} | ||
${usermod_e131.build_flags} | ||
; ${usermod_ha.build_flags} | ||
${usermod_wledaudio.build_flags} | ||
-DCONFIG_IDF_TARGET_ESP32=1 | ||
-DCONFIG_ASYNC_TCP_USE_WDT=0 | ||
${appmod_leds.build_flags} | ||
${usermod_e131.build_flags} | ||
; ${usermod_ha.build_flags} | ||
${usermod_wledaudio.build_flags} | ||
lib_deps = | ||
${starmod.lib_deps} | ||
${appmod_leds.lib_deps} | ||
${usermod_e131.lib_deps} | ||
; ${usermod_ha.lib_deps} | ||
${usermod_wledaudio.lib_deps} | ||
${starmod.lib_deps} | ||
${appmod_leds.lib_deps} | ||
${usermod_e131.lib_deps} | ||
; ${usermod_ha.lib_deps} | ||
${usermod_wledaudio.lib_deps} | ||
; RAM: [== ] 15.6% (used 51124 bytes from 327680 bytes) | ||
; Flash: [======= ] 68.1% (used 892033 bytes from 1310720 bytes) | ||
|
||
|
||
|
||
[env:lolin_s2_mini] | ||
board = lolin_s2_mini | ||
platform = [email protected] | ||
framework = arduino | ||
upload_speed = 256000 | ||
monitor_speed = 115200 | ||
board_build.partitions = tools/WLED_ESP32_4MB_256KB_FS.csv ;; 1.8MB firmware, 256KB filesystem (esptool erase_flash needed when changing from "standard WLED" partitions) | ||
monitor_filters = esp32_exception_decoder | ||
board_build.filesystem = littlefs | ||
build_flags = | ||
-DCONFIG_IDF_TARGET_ESP32S2=1 | ||
${appmod_leds.build_flags} | ||
${usermod_e131.build_flags} | ||
; ${usermod_ha.build_flags} | ||
${usermod_wledaudio.build_flags} | ||
lib_deps = | ||
${starmod.lib_deps} | ||
${appmod_leds.lib_deps} | ||
${usermod_e131.lib_deps} | ||
; ${usermod_ha.lib_deps} | ||
${usermod_wledaudio.lib_deps} | ||
; RAM: [== ] 24.5% (used 80240 bytes from 327680 bytes) | ||
; Flash: [========= ] 92.4% (used 1210894 bytes from 1310720 bytes) | ||
; after WLED_ESP32_4MB_256KB_FS: | ||
; RAM: [== ] 24.5% (used 80240 bytes from 327680 bytes) | ||
; Flash: [====== ] 63.7% (used 1210894 bytes from 1900544 bytes) | ||
|
||
; Compiler warnings FastLed: | ||
; In file included from .pio/libdeps/esp32dev/FastLED/src/FastLED.h:75, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Question @ewoudwijma is the sysModModel (that creates the JSON object) created with new()? Because there is one tricky thing about ArduinoJSON and PSRAM - the psram drivers/allocator does not work for global objects, so you have to explicitly create the JSON doc in setup() or later.
https://arduinojson.org/v6/how-to/use-external-ram-on-esp32/
that's why I added this line into MM, which magically pushes the global doc into PSRAM
https://github.com/MoonModules/WLED/blob/731f8efed80cdb60949c489328852a2a65627844/wled00/wled.cpp#L632
A bit later Blaz made a less "hackish" implementation in upstream, see AC WLED pr 3610