You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Teensy 4: ObjectFLED fixed 38.4 KB DMAMEM bitdata buffer is paid by every addLeds sketch #4711
ObjectFLEDDmaManager::bitdata[BYTES_PER_DMA * 64] (src/third_party/object_fled/src/ObjectFLEDDmaManager.h:63) is a fixed 38,400 B static in DMAMEM, declared __attribute__((used)). ObjectFLED is now the Teensy 4 default Bus::FLEX_IO driver, so every plain addLeds<WS2812, PIN> sketch pays for it, whatever its LED count.
teensy41 DemoReel100 RAM: 27,264 B (3.10.3, bit-bang default) → 70,016 B (HEAD).
Options: size the buffer to the registered LED count, allocate it lazily on first show, or drop used so an unused driver can be garbage-collected.
Investigated in #4710. bitdata is a circular double buffer: dma2's TCD always walks two full BYTES_PER_DMA halves (fixed CITER/BITER, DLASTSGA back to the start), and BYTES_PER_DMA >= 90 is the ISR refill-margin floor from #3416. Sizing it to the LED count would change the DMA addressing, which needs hardware validation, so it was left at 38.4 KB.
#4710 does recover RAM around it on the same addLeds path: newlib printf and the fl::printf engine are no longer linked (ITCM 59,664 → 35,680 B), and unused drivers' DMAMEM buffers are no longer kept (#4713). The remaining options for this buffer (lazy heap allocation in OCRAM2, or a smaller chunk with hardware validation via bash autoresearch teensy41) stay open here.
Activity
zackees commentedon Oct 6, 2026
Investigated in #4710.
bitdatais a circular double buffer: dma2's TCD always walks two fullBYTES_PER_DMAhalves (fixed CITER/BITER, DLASTSGA back to the start), andBYTES_PER_DMA >= 90is the ISR refill-margin floor from #3416. Sizing it to the LED count would change the DMA addressing, which needs hardware validation, so it was left at 38.4 KB.#4710 does recover RAM around it on the same
addLedspath: newlib printf and the fl::printf engine are no longer linked (ITCM 59,664 → 35,680 B), and unused drivers' DMAMEM buffers are no longer kept (#4713). The remaining options for this buffer (lazy heap allocation in OCRAM2, or a smaller chunk with hardware validation viabash autoresearch teensy41) stay open here.fix(objectfled): address review on sized bitdata (#4711)
fix(objectfled): size the DMA bit buffer to the frame (#4711)
fix(objectfled): address review on sized bitdata (#4711)
fix(objectfled): size the DMA bit buffer to the frame (#4711)
fix(objectfled): address review on sized bitdata (#4711)
fix(objectfled): size the DMA bit buffer to the frame (#4711)
fix(objectfled): address review on sized bitdata (#4711)
fix(objectfled): size the DMA bit buffer to the frame (#4711)
fix(objectfled): address review on sized bitdata (#4711)
fix(objectfled): size the DMA bit buffer to the frame (#4711) (#4716)