ESP32 memory management, Neopixels, and RGBPanels
summary
ESP32 reports 520KB spec, ~160KB usable for large global arrays, but memory is fragmented (DMA vs instruction cache regions) so big framebuffers blow out linking or crash at runtime; a 12 KB framebuffer fits on other MCUs but fails on a 1 KB task stack (1KB task stack), and converting large static arrays to malloced chunks saves about 39 KB in one case. Built a layer to run SmartMatrix / Adafruit FastLED / RGBPanel code on multiple backends, moved heavy work to a Raspberry Pi when 4096 Neopixels and RGB panels overwhelm the ESP32.
AI-written summary · about
chapters (7)
- 0:00Start
- 3:50Then I switched to RGBPanels, they need a lot more RAM
- 7:13Global Arrays can barely access 160KB
- 7:47Your program may compile, but crash at runtime
- 8:37Only 8KB of stack
- 10:56Converting arrays to mallocs
- 12:17Multi dimensional arrays with malloc and memory saved
related talks
17mI can stop adding more LEDs anytime I want, I just choose not to
17mI can stop adding more LEDs anytime I want, I just choose not to
25mMicroPython for ESP32
33mmruby on the minimal embedded resource
37mEnabling Multi-image Applications with AMP Support on ESP32
19mAdventures with blinking lights
40mInspecting and Optimizing Memory Usage in Linux
23m"Six Clock Cycle per Pixel - Graphics on the Neotron Pico"
