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
Remove the unused experimental ESP-DSP adapter and call FastLED's existing optimized real kiss_fftr transform directly at all eight production call sites. The old dispatcher already called kiss_fftr unconditionally; its extra size argument was ignored. Public FFT APIs, numeric precision, FFT math, windowing, magnitude batching and CQ/binning are unchanged.
The adapter's umbrella esp_dsp.h included mat.h and <iostream>, whose static std::ios_base::Init retained stream/locale support through the audio unity object even for LED-only sketches. Removing this unused path eliminates that dependency. The fixed Lolin image has no std::ios_base::Init symbols.
Per maintainer direction, this supersedes the initial narrower-header patch: the experimental alternative and its dedicated AudioFftParity example are removed entirely. The real Audio example and FFT golden suite validate production callers. Removed example inventory and lint-baseline entries are cleaned up.
RMT buffering, network detection, interrupt handling, recovery and diagnostics are unchanged. No new settings or GitHub Actions changes. No comparison claims that ESP-DSP is smaller or faster; production continues using the same tested FFT.
Measured result
The reporter's unchanged 96-pixel sketch, pinned to Lolin D32 / espressif32 6.13.0 / Arduino ESP32 2.0.17 / IDF 4.4.7 / GCC 8.4 patch5, using fbuild 2.5.42:
Library
Board flash
Static RAM
3.10.3
253,022 B
22,216 B
3.10.8 / master control 528a6fdbeb
513,110 B
30,344 B
Fixed
272,434 B
23,292 B
240,676 B less flash and 7,052 B less static RAM, recovering about 93% and 87% of the controlled increases, respectively. These are matched local controls, not exact reproduction of the reporter's unspecified resolved toolchain/flags. Residual versus 3.10.3: 19,412 B flash / 1,076 B static RAM. No runtime heap or hardware waveform claim.
Regression guard and validation
New legacy ESP32 Blink budget: bash bloat esp32dev_idf44 --build --budget tests/data/esp32dev_idf44_bloat_budget.jsonpasses. The saved original report fails both ceilings; the fixed report passes.
Legacy Blink physical board flash/RAM: 473,598/24,292 -> 232,250/17,248 B. Budget metrics separately: image flash 473,613 -> 232,265 B; attributed RAM 33,005 -> 21,511 B. Attributed RAM includes aliases and is not physical static RAM.
Existing production Audio SDK builds pass on both legacy esp32dev_idf44 and modern esp32dev. FFT golden tests pass before and after the cleanup. No hardware execution claimed.
bash test --cpp --debug: 321 unit suites + 95 examples passed with sanitizers. Earlier quick runs stopped at stale-artifact validation before assertions; the complete debug rebuild/run passed.
Full bash lint passes; 18 example/smoke inventory tests and 3 lint-baseline tests pass; independent repository code review found no issues.
Methodology, pinned sketch reference, toolchains and remaining costs: docs/ESP32_MEMORY_4870.md.
Summary by CodeRabbit
Bug Fixes
Improved ESP32 memory usage by streamlining FFT processing, reducing flash by approximately 240 KB and static RAM by 7 KB.
Preserved existing FFT and audio-pipeline behavior while improving compatibility with ESP32 memory budgets.
Documentation
Added measurements, validation results, regression context, and troubleshooting details for the ESP32 memory improvement.
Tests
Added an ESP32 default-profile size budget and documented cross-version and native validation results.
Reviewing files that changed from the base of the PR and between 560a928 and 0a3c606.
📒 Files selected for processing: 9
agents/tasks/todo.md
ci/examples/example_groups.py
ci/lint_cpp_rs/src/checkers/int_template.rs
ci/standardized_smoke_sketches.py
docs/ESP32_MEMORY_4870.md
examples/AudioFftParity/AudioFftParity.ino
src/fl/audio/fft/fft_backend.h
src/fl/audio/fft/fft_impl.cpp.hpp
tests/data/esp32dev_idf44_bloat_budget.json
💤 Files with no reviewable changes: 4
ci/examples/example_groups.py
ci/lint_cpp_rs/src/checkers/int_template.rs
src/fl/audio/fft/fft_backend.h
examples/AudioFftParity/AudioFftParity.ino
🚧 Files skipped from review as they are similar to previous changes: 3
agents/tasks/todo.md
docs/ESP32_MEMORY_4870.md
tests/data/esp32dev_idf44_bloat_budget.json
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
📝 Walkthrough
The PR removes the unused ESP-DSP FFT adapter and dispatcher. Production FFT paths now call kiss_fftr directly. It removes the related parity sketch and CI entries, then adds ESP32 memory-budget validation and regression documentation.
Changes: ESP32 memory regression
Layer / File(s)
Summary
Route production FFT paths through kiss_fftr src/fl/audio/fft/fft_backend.h, src/fl/audio/fft/fft_impl.cpp.hpp
The FFT backend header and dispatcher are removed. Log-rebin, naive, octave-wise, and hybrid FFT paths call kiss_fftr directly.
The AudioFftParity sketch and its inventory and lint-baseline entries are removed. Smoke-sketch documentation now describes existing per-sketch filtering.
Record memory budgets and validation tests/data/esp32dev_idf44_bloat_budget.json, docs/ESP32_MEMORY_4870.md, agents/tasks/todo.md
The PR adds ESP32 flash and RAM ceilings and records measurements, validation results, and completed regression checks.
The FFT cleanup is mergeable; no concrete correctness, availability, or integration risk remains.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (3 skipped: 3 …
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main changes: preserving the tested FFT path and removing the unused ESP-DSP adapter for ESP32.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (3 skipped: 3 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
zackees
changed the title
fix(esp32): recover RAM and flash retained by ESP-DSP umbrella header
fix(esp32): preserve tested FFT and remove unused ESP-DSP adapter
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ci-fullRun the complete release-equivalent CI matrix on this PR SHA
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #4870.
Remove the unused experimental ESP-DSP adapter and call FastLED's existing optimized real
kiss_fftrtransform directly at all eight production call sites. The old dispatcher already calledkiss_fftrunconditionally; its extra size argument was ignored. Public FFT APIs, numeric precision, FFT math, windowing, magnitude batching and CQ/binning are unchanged.The adapter's umbrella
esp_dsp.hincludedmat.hand<iostream>, whose staticstd::ios_base::Initretained stream/locale support through the audio unity object even for LED-only sketches. Removing this unused path eliminates that dependency. The fixed Lolin image has nostd::ios_base::Initsymbols.Per maintainer direction, this supersedes the initial narrower-header patch: the experimental alternative and its dedicated
AudioFftParityexample are removed entirely. The realAudioexample and FFT golden suite validate production callers. Removed example inventory and lint-baseline entries are cleaned up.RMT buffering, network detection, interrupt handling, recovery and diagnostics are unchanged. No new settings or GitHub Actions changes. No comparison claims that ESP-DSP is smaller or faster; production continues using the same tested FFT.
Measured result
The reporter's unchanged 96-pixel sketch, pinned to Lolin D32 / espressif32 6.13.0 / Arduino ESP32 2.0.17 / IDF 4.4.7 / GCC 8.4 patch5, using fbuild 2.5.42:
528a6fdbeb240,676 B less flash and 7,052 B less static RAM, recovering about 93% and 87% of the controlled increases, respectively. These are matched local controls, not exact reproduction of the reporter's unspecified resolved toolchain/flags. Residual versus 3.10.3: 19,412 B flash / 1,076 B static RAM. No runtime heap or hardware waveform claim.
Regression guard and validation
bash bloat esp32dev_idf44 --build --budget tests/data/esp32dev_idf44_bloat_budget.jsonpasses. The saved original report fails both ceilings; the fixed report passes.AudioSDK builds pass on both legacyesp32dev_idf44and modernesp32dev. FFT golden tests pass before and after the cleanup. No hardware execution claimed.bash test --cpp --debug: 321 unit suites + 95 examples passed with sanitizers. Earlier quick runs stopped at stale-artifact validation before assertions; the complete debug rebuild/run passed.bash lintpasses; 18 example/smoke inventory tests and 3 lint-baseline tests pass; independent repository code review found no issues.docs/ESP32_MEMORY_4870.md.Summary by CodeRabbit
Bug Fixes
Documentation
Tests