What happened?
After upgrading the AtomS3 Lite to version 16 the web interface shows the error "Error 8: Effect RAM depleted”.
To Reproduce Bug
Simply install version 15.4 to an Atoms3 Lite and confirm full function, then upgrade to v16. The web interface will show "Error 8: Effect RAM depleted” and the attached Led will not work
Expected Behavior
Since it works fine under 15.4 should it not still function under v16 ?
Install Method
Binary from WLED.me
What version of WLED?
WLED Version 16.0
Which microcontroller/board are you seeing the problem on?
ESP32-S3
Relevant log/trace output
Anything else?
I build a debug version and traced the source of the error to a _pixel buffer allocation in FX_fcn.cpp that uses the flag BFRALLOC_ENFORCE_PSRAM but since the Atoms3 Lite has no PSRAM the allocation fails and thus the error mesage.
I tried a build with following change
diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp
index cbd937fb..0c999ce4 100644
--- a/wled00/FX_fcn.cpp
+++ b/wled00/FX_fcn.cpp
@@ -1274,7 +1274,7 @@ void WS2812FX::finalizeInit() {
// allocate frame buffer after matrix has been set up (gaps!)
p_free(_pixels); // using realloc on large buffers can cause additional fragmentation instead of reducing it
// use PSRAM if available: there is no measurable perfomance impact between PSRAM and DRAM on S2/S3 with QSPI PSRAM for this buffer
- _pixels = static_cast<uint32_t*>(allocate_buffer(getLengthTotal() * sizeof(uint32_t), BFRALLOC_ENFORCE_PSRAM | BFRALLOC_NOBYTEACCESS | BFRALLOC_CLEAR));
+ _pixels = static_cast<uint32_t*>(allocate_buffer(getLengthTotal() * sizeof(uint32_t), BFRALLOC_PREFER_PSRAM | BFRALLOC_NOBYTEACCESS | BFRALLOC_CLEAR));
DEBUG_PRINTF_P(PSTR("strip buffer size: %uB\n"), getLengthTotal() * sizeof(uint32_t));
DEBUG_PRINTF_P(PSTR("Heap after strip init: %uB\n"), getFreeHeapSize());
}
Is this a valid change? Is there a better fix?
Code of Conduct
What happened?
After upgrading the AtomS3 Lite to version 16 the web interface shows the error "Error 8: Effect RAM depleted”.
To Reproduce Bug
Simply install version 15.4 to an Atoms3 Lite and confirm full function, then upgrade to v16. The web interface will show "Error 8: Effect RAM depleted” and the attached Led will not work
Expected Behavior
Since it works fine under 15.4 should it not still function under v16 ?
Install Method
Binary from WLED.me
What version of WLED?
WLED Version 16.0
Which microcontroller/board are you seeing the problem on?
ESP32-S3
Relevant log/trace output
Anything else?
I build a debug version and traced the source of the error to a _pixel buffer allocation in FX_fcn.cpp that uses the flag BFRALLOC_ENFORCE_PSRAM but since the Atoms3 Lite has no PSRAM the allocation fails and thus the error mesage.
I tried a build with following change
Is this a valid change? Is there a better fix?
Code of Conduct