Introduces new memory allocation functions, based on wled#4895 by @DedeHai
* keep a minimum of 15KB RAM available to UI - improves stability
* S3/S2/C3 automatically use "fast RTC Ram" for small data (reduces fragmentation)
* auto-detects PSRAM (or no PSRAM) when firmware was built with -D BOARD_HAS_PSRAM
* d_malloc() and d_calloc() prefer DRAM if possible (faster), but fall back to PSRAM when free RAM gets low.
* introducing WLED_MAX_SEGNAME_LEN from upstream
* default: max name length = 48
* hopefully found all places where the segment name length was hardcoded (32, 33, 34)
* some comments still refer to "32" but wtf
* make sure that gamma LUT is always initialized
* remove some unnecessary safety checks
* make gamma8() inline, for more speed
* use fast unGamma8 for preview
* add super-fast unGamma8 for HUB75 - old function lost 3-10 fps, this version does not reduce fps at all *grins*
* a few new error constants
* WLED_O2_ATTR - ask the compiler for stronger optimization of a single function
* WLED_O3_ATTR (WLEDMM) optimize even more
* use a more meaningful max universes limit of 112 (safe up to 128x128 pixels)
* accept more universes, but only track sequences for the configures max universes
* made e131LastSequenceNumber[] local (its only used in e131.cpp)
* optimized fadeToBlackBy() - don't repaint unchanged pixels
* made MIN_HEAP_SIZE configurable by build_flags
* specific error message when not enough memory for LEDs buffer
According to the technical manual, GPIO 16 + 17 are used for onboard flash, so cannot be used by WLED.
example buildenv:
[env:esp32_pico]
extends = env:esp32dev_qio80
board = pico32
I've found a code spellchecker, so this is what can be corrected easily. Changes are only affecting comments, readme and a few user-visible strings. So no functional impact expected.
we can use `-D CONFIG_ASYNC_TCP_TASK_STACK_SIZE=xxxx` to increase the stack size of AsyncWebserver - default is 8196.
This should give us a bit of headroom for new UI items.
We still need PR #94 for more savings.
Found out that the main JSON 'doc' is still living in normal RAM, even when PSRAM is available...
This results is very low RAM especially on -S2.
This change tries to find a balance between "need large json buffer" and "other features become unstable when free RAM is low".
* espressif32@5.2.0 --> espressif32@5.3.0
* pxmagic.htm added in cdata.js
* minor updates in style.css
* align some constants and definitions (wled.h, const.h)
* npm run build