Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use arduino-esp32 2.0.2 for ESP32-S2 #2452

Merged
merged 6 commits into from Jan 14, 2022
Merged

Conversation

misery
Copy link
Contributor

@misery misery commented Dec 26, 2021

LittleFS is merged into it.

@misery
Copy link
Contributor Author

misery commented Dec 26, 2021

Seems ESP Async Web Server needs an update, too.

Linking .pio/build/esp32s2_saola/firmware.elf
/home/andre/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: .pio/build/esp32s2_saola/lib57f/libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0xc): undefined reference to `SHA1Init'
/home/andre/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: .pio/build/esp32s2_saola/lib57f/libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x14): undefined reference to `SHA1Update'
/home/andre/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: .pio/build/esp32s2_saola/lib57f/libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x18): undefined reference to `SHA1Final'
/home/andre/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: .pio/build/esp32s2_saola/lib57f/libESP Async WebServer.a(AsyncWebSocket.cpp.o): in function `AsyncWebSocketResponse::AsyncWebSocketResponse(String const&, AsyncWebSocket*)':
/home/andre/git/WLED/.pio/libdeps/esp32s2_saola/ESP Async WebServer/src/AsyncWebSocket.cpp:1271: undefined reference to `SHA1Init'
/home/andre/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: /home/andre/git/WLED/.pio/libdeps/esp32s2_saola/ESP Async WebServer/src/AsyncWebSocket.cpp:1272: undefined reference to `SHA1Update'
/home/andre/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: /home/andre/git/WLED/.pio/libdeps/esp32s2_saola/ESP Async WebServer/src/AsyncWebSocket.cpp:1273: undefined reference to `SHA1Final'
/home/andre/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: .pio/build/esp32s2_saola/lib57f/libESP Async WebServer.a(WebAuthentication.cpp.o):(.literal._ZL6getMD5PhtPc+0x4): undefined reference to `mbedtls_md5_starts'
/home/andre/.platformio/packages/toolchain-xtensa-esp32s2/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: .pio/build/esp32s2_saola/lib57f/libESP Async WebServer.a(WebAuthentication.cpp.o): in function `getMD5(unsigned char*, unsigned short, char*)':
/home/andre/git/WLED/.pio/libdeps/esp32s2_saola/ESP Async WebServer/src/WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts'
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32s2_saola/firmware.elf] Error 1

@misery
Copy link
Contributor Author

misery commented Dec 26, 2021

Needs this: me-no-dev/ESPAsyncWebServer@5613e66

@blazoncek
Copy link
Collaborator

WLED uses customised ESPAsyncWebServer.

@Aircoookie
Copy link
Owner

Will apply the patch to my EspAsyncWebServer fork, thank you :)

@misery
Copy link
Contributor Author

misery commented Dec 27, 2021

Thanks! I tried it and it compiled without errors here. :-)
Aircoookie/ESPAsyncWebServer#4

LittleFS is merged into it.
@blazoncek
Copy link
Collaborator

Why are you force-pushing commits?
This is dangerous and not transparent. Please, follow instructions here and resubmit both PRs (this and #2454) as one complete PR.

@misery
Copy link
Contributor Author

misery commented Dec 29, 2021

Because it is tiny crap that isn't necessary as a separate changeset. ;-) Just to clean up the history. C3 isn't ready and cannot be merged. So it should be a different PR for S2.

@blazoncek
Copy link
Collaborator

Cleaning up history is described in the link provided.
Finish your changes in your fork, with as many commits as you want, then make PR as suggested.

@misery
Copy link
Contributor Author

misery commented Dec 29, 2021

Well, I thought it was ready. Then I find some tiny nitpics. So ready to go. :-)

@ByronAP
Copy link

ByronAP commented Dec 30, 2021

Compiled without issues but after flashing...

[20:56:55]ESP-ROM:esp32s2-rc4-20191025
[20:56:55]Build:Oct 25 2019
[20:56:55]rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
[20:56:55]Invalid chip id. Expected 2 read 0. Bootloader for wrong chip?
[20:56:55]ets_main.c 386 

(ESP32-S2-Saola-1R Dev Board)

Upload and Monitor output...

ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DOUT, clock div:1
load:0x3ffe6100,len:0x484
load:0x4004c000,len:0x82c
load:0x40050000,len:0x2760
entry 0x4004c174
./components/esp_littlefs/src/littlefs/lfs.c:1071:error: Corrupted dir pair at {0x0, 0x1}
E (409) esp_littlefs: mount failed,  (-84)
E (410) esp_littlefs: Failed to initialize LittleFS
[   844][E][esp32-hal-misc.c:125] disableCore0WDT(): Failed to remove Core 0 IDLE task from WDT
./components/esp_littlefs/src/littlefs/lfs.c:1790:debug: Bad block at 0x0
./components/esp_littlefs/src/littlefs/lfs.c:1796:warn: Superblock 0x0 has become unwritable
E (4709) esp_littlefs: Failed to format filesystem
[  5143][E][LittleFS.cpp:119] format(): Formatting LittleFS failed! Error: -1
[  5149][E][LittleFS.cpp:94] begin(): Mounting LittleFS failed! Error: -1
[  5156][E][vfs_api.cpp:22] open(): File system is not mounted
[  5234][E][vfs_api.cpp:22] open(): File system is not mounted
[  5236][E][vfs_api.cpp:22] open(): File system is not mounted
[  5238][E][vfs_api.cpp:22] open(): File system is not mounted
Ada

OK so it looks like it is something with using ESPHome to flash, uploading from PIO works but still issues with LittleFS.

@misery
Copy link
Contributor Author

misery commented Dec 30, 2021

Thanks for testing! I have the same error here but this isn't a regression as the previous -alpha1 has the same problem. Also WLED is running (see AP).
I tried to replace LittleFS by SPIFFS but got a similar error. I'm still searching for the problem...

---WLED 0.13.0-b6 2112080 INIT---
esp32 v4.4-beta1-189-ga79dc75f0a
heap 155120
Registering usermods ...
Mount FS
E (377) SPIFFS: mount failed, -10025
[   806][E][esp32-hal-misc.c:135] disableCore0WDT(): Failed to remove Core 0 IDLE task from WDT
E (6863) SPIFFS: mount failed, -10025
[  7290][E][SPIFFS.cpp:114] format(): Formatting SPIFFS failed! Error: -1
[  7296][E][SPIFFS.cpp:89] begin(): Mounting SPIFFS failed! Error: -1
FS failed!
Reading config
Reading settings from /wsec.json...

See platformio/platform-espressif32#546 and espressif/arduino-esp32#6039

Use platform of tasmota until upstream released it and
use board_build.flash_mode = qio
@misery
Copy link
Contributor Author

misery commented Dec 30, 2021

@ByronAP Ok, I found a fix for it. 😉

@misery
Copy link
Contributor Author

misery commented Dec 30, 2021

@Aircoookie Could you trigger a PR action? It isn't running for my commits. :-)

@ByronAP
Copy link

ByronAP commented Dec 30, 2021

Well it kinda works... hehee

ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x510
load:0x4004c000,len:0xa50
load:0x40050000,len:0x28bc
entry 0x4004c18c
[   763][E][vfs_api.cpp:102] open(): /littlefs/ledmap.json does not exist, no permits for creation
Ada
[127352][E][vfs_api.cpp:102] open(): /littlefs/favicon.ico does not exist, no permits for creation
[161068][E][vfs_api.cpp:102] open(): /littlefs/JNAP/index.htm does not exist, no permits for creation
[162058][E][vfs_api.cpp:102] open(): /littlefs/HNAP1/index.htm does not exist, no permits for creation
[162065][E][vfs_api.cpp:102] open(): /littlefs/index.htm does not exist, no permits for creation
[183283][E][vfs_api.cpp:102] open(): /littlefs/index.htm does not exist, no permits for creation
[183571][E][vfs_api.cpp:102] open(): /littlefs/skin.css does not exist, no permits for creation
[266474][E][vfs_api.cpp:102] open(): /littlefs/ledmap.json does not exist, no permits for creation
[274694][E][vfs_api.cpp:102] open(): /littlefs/index.htm does not exist, no permits for creation
[274821][E][vfs_api.cpp:102] open(): /littlefs/skin.css does not exist, no permits for creation
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40153290: f01d1662 c0004136 22820020
Core  0 register dump:
PC      : 0x40153296  PS      : 0x00060031  A0      : 0x40028969  A1      : 0x3ffc4b50
A2      : 0x3ffc3f5c  A3      : 0x3f416000  A4      : 0x00000001  A5      : 0x00000001
A6      : 0x00000001  A7      : 0x00000020  A8      : 0x8002592f  A9      : 0x00000020
A10     : 0x3ffee1cc  A11     : 0x3ffee1cc  A12     : 0xffffffff  A13     : 0x00000000  
A14     : 0x3ffc3f68  A15     : 0x3ffee0a4  SAR     : 0x00000011  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0xffffffff  LEND    : 0x00000000  LCOUNT  : 0x40028849
Core  0 was running in ISR context:
EPC1    : 0x400e325b  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x00000000


Backtrace:0x40153293:0x3ffc4b500x40028966:0x3ffc4b90 0x40030918:0x3ffe5dd0 0x40030b4f:0x3ffe5e00 0x40032a07:0x3ffe5e30 0x40033513:0x3ffe5e70 0x40033541:0x3ffe5e90 0x400334c5:0x3ffe5ec0 0x40032f8a:0x3ffe5ef0 0x40026df1:0x3ffe5f70 0x400ddd77:0x3ffe5fc0 0x4010605f:0x3ffe5fe0 0x40107205:0x3ffe6010 0x401072f9:0x3ffe6040 0x401078fd:0x3ffe6070 0x40107a5d:0x3ffe60b0 0x401094bd:0x3ffe6120 0x4010577d:0x3ffe6140 0x400e43d1:0x3ffe6160 0x4001a193:0x3ffe6180 0x4001a6c5:0x3ffe61a0 0x40001b0e:0x3ffe61c0 0x40001b94:0x3ffe61e0 0x400014a3:0x3ffe6210 0x4013e213:0x3ffe6240 0x4013e275:0x3ffe6280 0x4013ab3f:0x3ffe62a0 0x400bf059:0x3ffe62c0 0x4015140d:0x3ffe62f0 0x4009780f:0x3ffe6310 0x400978d6:0x3ffe6330 0x40097887:0x3ffe6350 0x400978e7:0x3ffe6370 0x400978e7:0x3ffe6390 0x400978e7:0x3ffe63b0 0x40097961:0x3ffe63d0 0x4009982e:0x3ffe6400 0x400a6e3f:0x3ffe66c0 0x400b3206:0x3ffe6970 0x400b32d9:0x3ffe6a10 0x400cceda:0x3ffe6a30 0x400caba9:0x3ffe6a80 0x400cac19:0x3ffe6ad0 0x400be3e9:0x3ffe6af0 0x400be479:0x3ffe6b20 0x400bec8e:0x3ffe6b40 

@misery
Copy link
Contributor Author

misery commented Dec 30, 2021

Strange, my S2 drive my 600 LED Stripes here. I have an ESP12k from AI Thinker. What do you use?

@ByronAP
Copy link

ByronAP commented Dec 30, 2021

And now it's bootlooping

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x400272fd
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x510
load:0x4004c000,len:0xa50
load:0x40050000,len:0x28bc
entry 0x4004c18c
[   773][E][vfs_api.cpp:102] open(): /littlefs/ledmap.json does not exist, no permits for creation
Ada
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40153290: f01d1662 c0004136 22820020
Core  0 register dump:
PC      : 0x40153296  PS      : 0x00060031  A0      : 0x40028969  A1      : 0x3ffc4b50
A2      : 0x3ffc3f5c  A3      : 0x3f416000  A4      : 0x00000001  A5      : 0x00000001  
A6      : 0x00000001  A7      : 0x00000020  A8      : 0x8002592f  A9      : 0x00000020
A10     : 0x3ffdd0c8  A11     : 0x3ffdd0c8  A12     : 0xffffffff  A13     : 0x00000000  
A14     : 0x3ffc3f68  A15     : 0x3ffda8f4  SAR     : 0x00000013  EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000  LBEG    : 0xffffffff  LEND    : 0x00000000  LCOUNT  : 0x40028849  
Core  0 was running in ISR context:
EPC1    : 0x400e325b  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x00000000


Backtrace:0x40153293:0x3ffc4b500x40028966:0x3ffc4b90 0x40030cce:0x3ffe2e00 0x40032ec7:0x3ffe2e20 0x40026ce6:0x3ffe2ea0 0x400ddef3:0x3ffe2ee0 0x400df752:0x3ffe2f10 0x400dfc7d:0x3ffe2f30 0x400e0435:0x3ffe2f50 0x400de82b:0x3ffe2fc0 0x400dedd0:0x3ffe3010 0x400df5dd:0x3ffe3080 0x400de527:0x3ffe30a0 0x4011e8a9:0x3ffe30d0 0x4011eb3f:0x3ffe3110 0x4011cbbc:0x3ffe3130 0x4011b4ee:0x3ffe3150 0x40156771:0x3ffe3170 




ELF file SHA256: 0000000000000000

I'm using ESP32-S2-Saola-1R Dev Boards https://www.amazon.com/gp/product/B087T7HWFQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

@misery
Copy link
Contributor Author

misery commented Dec 30, 2021

Well, could you erase the flash and re-flash again?
esptool.py erase_flash

board_build.mcu = esp32s2
platform = espressif32
board = esp32-s2-saola-1
platform = https://github.com/tasmota/platform-espressif32/releases/download/v3.4.1/Tasmota-platform-espressif32.zip
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diner time but yeah I'll try this in a bit

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ehh no real difference from changing platforms

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tried another board fresh out the bag and same

rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x510
load:0x4004c000,len:0xa50
load:0x40050000,len:0x28bc
entry 0x4004c18c
./components/esp_littlefs/src/littlefs/lfs.c:1071:error: Corrupted dir pair at {0x0, 0x1}
E (284) esp_littlefs: mount failed,  (-84)
E (285) esp_littlefs: Failed to initialize LittleFS
[   749][E][esp32-hal-misc.c:125] disableCore0WDT(): Failed to remove Core 0 IDLE task from WDT
[  5149][E][vfs_api.cpp:102] open(): /littlefs/presets.json does not exist, no permits for creation
[  5173][E][vfs_api.cpp:102] open(): /littlefs/wsec.json does not exist, no permits for creation
[  5247][E][vfs_api.cpp:102] open(): /littlefs/ledmap.json does not exist, no permits for creation
Ada

@ByronAP
Copy link

ByronAP commented Jan 1, 2022

Side note: The usable GPIOs on the S2 are different (more options) and should be reflected in the UI

@Aircoookie
Copy link
Owner

Thank you for the PR! My S2 seems to be able to retain settings in principle now, though write operations (presets or config) will occasionally trigger the crash @BryonaP has observed above. I need to check if there is already an exception decoder for the S2.

@misery
Copy link
Contributor Author

misery commented Jan 3, 2022

Side note: The usable GPIOs on the S2 are different (more options) and should be reflected in the UI

Thanks! Maybe it would be enough to upgrade to FastLED 3.5.0 (FastLED/FastLED@60fa753) which is required for ESP32-C3, too.

@Aircoookie
Copy link
Owner

FastLED is only used for palettes and math by WLED, the driving is done by NeoPixelBus :)
I agree that the custom pin manager code should be updated at some point once this is merged to accommodate for the different capabilities of the S2 (more GPIO, but half each of RMT, I2S, and LEDC interfaces)

@misery
Copy link
Contributor Author

misery commented Jan 5, 2022

Tried it with pio device monitor -e esp32s2_saola --filter esp32_exception_decoder and debug build.

diff --git a/platformio.ini b/platformio.ini
index 37f26d7..ce292f7 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -323,7 +323,9 @@ board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv
 board_build.flash_mode = qio
 upload_speed = 460800
 build_unflags = ${common.build_unflags}
+build_flags = ${common.debug_flags}
 lib_deps = ${esp32s2.lib_deps}
+build_type = debug
 
 [env:esp8285_4CH_MagicHome]
 board = esp8285

I changed "Disable WiFi sleep:" and I got this. After this the WiFi setting was gone. But all other settings were still stored. I cannot reproduce this.

Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40190d4c: f01d1662 c0004136 22820020
Core  0 register dump:
PC      : 0x40190d52  PS      : 0x00060031  A0      : 0x400289ad  A1      : 0x3ffc4bb0  
A2      : 0x3ffc3fbc  A3      : 0x3f416000  A4      : 0x00000001  A5      : 0x00000001  
A6      : 0x00000001  A7      : 0x00000000  A8      : 0x80025973  A9      : 0x00000020  
A10     : 0x3ffede3c  A11     : 0x3ffede3c  A12     : 0xffffffff  A13     : 0x00000020  
A14     : 0x3ffc3fc8  A15     : 0x3ffda848  SAR     : 0x00000013  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0xffffffff  LEND    : 0x00000020  LCOUNT  : 0x4002888d  
Core  0 was running in ISR context:
EPC1    : 0x4011ef73  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x00000000


Backtrace:0x40190d4f:0x3ffc4bb00x400289aa:0x3ffc4bf0 0x4003106e:0x3ffe5750 0x40030c99:0x3ffe5770 0x40032a53:0x3ffe57a0 0x4003355f:0x3ffe57e0 0x400331f2:0x3ffe5800 0x4003353d:0x3ffe5830 0x40032fd6:0x3ffe5860 0x40026e35:0x3ffe58e0 0x40119a87:0x3ffe5930 0x4014111b:0x3ffe5950 0x401430e9:0x3ffe5980 0x401431dd:0x3ffe59b0 0x401437e1:0x3ffe59e0 0x40143941:0x3ffe5a20 0x401453a1:0x3ffe5a90 0x40140839:0x3ffe5ab0 0x401200e9:0x3ffe5ad0 0x4001a193:0x3ffe5af0 0x4001a6c5:0x3ffe5b10 0x40001b0e:0x3ffe5b30 0x40001b94:0x3ffe5b50 0x400014a3:0x3ffe5b80 0x40179773:0x3ffe5bb0 0x401797d5:0x3ffe5bf0 0x40176026:0x3ffe5c10 0x400f6c4d:0x3ffe5c30 0x400a346a:0x3ffe5c50 0x400a3225:0x3ffe5ca0 0x400a32ee:0x3ffe5cf0 0x400a3225:0x3ffe5d40 0x400a32ee:0x3ffe5d90 0x400a32ee:0x3ffe5de0 0x400a32ee:0x3ffe5e30 0x400a34e1:0x3ffe5e80 0x400a3509:0x3ffe5eb0 0x400a351d:0x3ffe5ed0 0x400a723a:0x3ffe5ef0 0x400c883f:0x3ffe6940 0x400dfecb:0x3ffe6d00 0x400e0761:0x3ffe6da0 0x400dedbb:0x3ffe6dc0 0x4010823d:0x3ffe6df0 0x40105185:0x3ffe6e40 0x40105345:0x3ffe6ea0 0x400f6457:0x3ffe6ec0 0x400f64a6:0x3ffe6ef0 0x400f64e9:0x3ffe6f10 0x400f6636:0x3ffe6f30 0x400f66b0:0x3ffe6f50 
  #0  0x40190d4f:0x3ffc4bb00 in rmt_ll_enable_rx_thres_interrupt at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/hal/esp32s2/include/hal/rmt_ll.h:315

ELF file SHA256: 0000000000000000

Rebooting...

https://github.com/espressif/esp-idf/blob/master/components/hal/esp32s2/include/hal/rmt_ll.h#L314

The stacktrace seems really short. Maybe you get a better stacktrace @ByronAP ?

@Aircoookie
Copy link
Owner

Hmm it crashes within an RMT (LED driving peripheral) interrupt service routine. I think there may be a problem with LED driving while saving to the filesystem. If that is the case, saving to presets or config should frequently crash if an effect mode is running and never if the LED strip is turned off via the GUI. I don't have the slightest idea about how one would work around that issue, except making sure that all LED updates are finished before writing to the filesystem, which I don't think is possible from asyncronous network functions.

@blazoncek
Copy link
Collaborator

@Aircoookie I have updated saveTemporaryPreset() in my fork which can handle such situation.
It stores current state as serialized JSON in RAM (or PSRAM) and can be then saved within loop().

@ByronAP
Copy link

ByronAP commented Jan 9, 2022

sorry @misery been a bit busy, I will try and get to it sometime tomorrow or Monday

@Aircoookie
Copy link
Owner

Will merge this now since it boosts usability of the s2 from "not practical" to "somewhat usable". We can create a separate issue for the FS write crash, or continue discussion here.

@Aircoookie Aircoookie merged commit f8c8028 into Aircoookie:master Jan 14, 2022
@misery misery deleted the s2 branch January 14, 2022 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants