Repository navigation
Description
Context
A bloat investigation found that a classic ESP32/Lolin D32 build on IDF 4.4 silently selects the generic blocking clockless driver instead of its real RMT hardware. A follow-up source/header audit found the same class of error in the FastLED WiFi API.
Audited master: e19e9e7a9cda9f3a0d85b5ab801829e3b6440ef0. Vendor headers: Arduino-ESP32 2.0.17, framework package 3.20017.241212+sha.dcc1105b, ESP-IDF 4.4.7, for ESP32, ESP32-S2, ESP32-S3, ESP32-C3. These findings concern FastLED capability detection; they do not mean Espressif omitted the hardware or its IDF 4.4 drivers.
Confirmed findings
| Target | SOC_RMT_SUPPORTED |
SOC_RMT_CHANNELS_PER_GROUP |
SOC_WIFI_SUPPORTED |
esp_wifi.h |
|---|---|---|---|---|
| ESP32 | absent | 8 | absent | present |
| ESP32-S2 | absent | 4 | absent | present |
| ESP32-S3 | absent | 8 | absent | present |
| ESP32-C3 | absent | 4 | absent | present |
1. RMT silently disabled. src/platforms/esp/32/feature_flags/enabled.h defaults a missing SOC_RMT_SUPPORTED to zero and derives FASTLED_ESP32_HAS_RMT from it. A build can therefore succeed with blocking output although RMT is present. Restoration is currently in progress on fix/esp32-legacy-rmt-selection; that working branch is not evidence of a merged fix. Enabling detection can expose previously uncompiled RMT4 compatibility defects, so a macro-only fix is insufficient.
2. FastLED WiFi API silently becomes unsupported. The same header defaults a missing SOC_WIFI_SUPPORTED to zero, producing FL_HAS_NETWORK=0. Independently, src/fl/net/wifi.h requires a positive SOC_WIFI_SUPPORTED plus esp_wifi.h, so FL_WIFI_AVAILABLE=0 on these SDKs even though the real WiFi API/header exists. This selects src/fl/net/wifi.cpp.hpp stubs: connectSta() and startAp() return false and status() returns Status::UNSUPPORTED; src/platforms/esp/32/net/wifi_esp32.cpp.hpp is excluded. The FL_HAS_NETWORK-guarded LwIP hook is also excluded; no IDF4.4 hook-related link failure was established by this audit.
This is FastLED's WiFi wrapper, not a claim that Arduino WiFi.h or user-written ESP-IDF WiFi calls are broken. WiFi findings were established by exact headers and preprocessor/source paths; no network association test was performed in this audit.
Primary vendor evidence
- IDF 4.4.7 ESP32 capability header, with corresponding S2, S3, C3 headers.
- ESP32 RMT API documents the legacy hardware/driver.
- IDF 4.4.7 WiFi APIs: ESP32, S2, S3, C3.
Proposal
Normalize SDK-version differences once at the ESP platform boundary, exposing consistent FastLED capability decisions to consumers. Distinguish hardware existence, SDK API availability, and implementation support. Prefer verified legacy geometry/configuration/target evidence where modern booleans are missing; do not blindly enable every absent vendor macro or globally pretend unsupported peripherals exist.
Make both the platform feature header and the standalone public WiFi header use that decision consistently. Test direct inclusion of fl/net/wifi.h as well as inclusion through FastLED.h, so unity-build/include ordering cannot hide inconsistent decisions.
Complete the capability audit for supported IDF4.4 targets. Record each missing/renamed macro and trace an actual consumer before declaring another regression. Current checks found SPI peripheral count, CPU core count, classic ESP32 LEDC high-speed support, RMT geometry and relevant PDM flags present where expected. The MCPWM RX implementation is deliberately RMT5-gated and uses newer driver/mcpwm_cap.h / driver/mcpwm_timer.h; its IDF4.4 exclusion is not established as another missing-macro regression. Similarly, IDF5-only SPI clockless/PARLIO paths must not be enabled just because older headers omit a boolean.
Acceptance criteria
- Capture RED → GREEN evidence before/after each confirmed fix: an IDF4.4 capability assertion fails on the original source and passes with the normalization, without external force-enabling defines.
- Classic ESP32 IDF4.4 default clockless compilation selects and links RMT4, not the generic blocking fallback; preserve explicit user opt-outs and legacy memory/driver compatibility. Coordinate with the RMT restoration already in progress rather than duplicate it.
- With real IDF4.4.7 headers, all four audited WiFi targets report
FL_WIFI_AVAILABLE=1and the correct network capability. Build/link a consumer of the real STA/AP API; verify real implementation symbols rather than successful compilation of stubs. - Exercise standalone
fl/net/wifi.hinclusion and ordinaryFastLED.hinclusion. Add negative controls for explicit unsupported/zero capabilities and WiFi-less targets such as H2/P4 using their supported newer SDKs. - Add focused regression checks to existing
./lintand/or existing test inventories. Selectively restore the old bad decision to show that the checks catch it, then restore the fix. No new GitHub Actions workflows. - Validate a supported modern SDK as a non-regression control. Broader claims about other 4.4 patch releases require checking those exact SDK headers/builds.
- Record the audit disposition of other consumed capability flags, distinguishing genuine regressions from intentional SDK restrictions or absent hardware. Hardware behavior claims require AutoResearch evidence, not just header presence.
Decisions
- Treat as a correctness regression with ordinary bug priority: successful compilation currently hides unavailable FastLED features on supported hardware.
- Keep confirmed RMT and WiFi cases together because they share the same incorrect missing-modern-boolean assumption and need common regression coverage.
- Scope verified results to IDF4.4.7 and the four named chips; do not extrapolate to chips unsupported by that SDK or claim every IDF4.4 patch has identical headers.
- Keep actual hardware support and SDK implementation support separate; no fabricated vendor register definitions or indiscriminate force-enable workaround.
Related issues
- Meta: decouple src/platforms/esp from the Arduino core — go straight to Espressif (ESP-IDF) headers, with IDF 3.x-6.x compat + per-IDF compile-test CI #3715 covers cross-IDF compatibility of native ESP implementations; this issue narrows that work to silent capability false negatives.
- ESP32 (Lolin D32): flash usage 2.5x higher in 3.10.6 vs 3.10.3 (+443 KB flash, +8 KB RAM) #4707 is the Lolin D32 size investigation where the RMT selection mismatch was encountered; its memory figures must not be treated as equivalent-driver measurements until selection is repaired.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
robertlipe commentedon Oct 22, 2026
I know you're trying to be everything for everyone, and I can respect that. However, it's OK to deliver some tough love to your users once in a while just to control your own costs and sanity.
IDF major releases have a shelf life about about 30 months (12 active + 18 maintenance) and Espressif keeps their word on that.
IDF4's final branch(4.4) reached EOL over two years ago now. It's been completely unsupported since 2024. IDF5 has been around since 2022 and thus even 5.0, 5.1, and 5.2 have similarly timed out. 5.3 ages out in January. 5.5 is already frozen, but will be maintained until Jan 2027.
ESP-IDF 6.0 is already well into its development phase, with 6.1 well established and IDF 6.2 due out by the end of this year. 6.2 should graduate ESP32-S31 from preview to supported and we're starting to see more hardware with that chip in the market.
The road to IDF5 was rocky. (OK, it was terrible...) That was driven by bad compatibility choices on Espressif's part, the well-known love withdrawal between PlatformIO and Espressif, several major new chips, and the large amount of abandoned Arduino libs that needed repair, which lead to version gridlock for a couple of quarters. It's not always like that. FWIW, in my own ESP-IDF projects, the needed changes for IDF6 from IDF5 were trivial in comparison. The 4->5 migration was just the intersection of several unpleasant factors and isn't normal. I understand the urge to be sticky to IDF4 a few years ago, but anything that's actively maintained has already migrated to IDF5 or IDF6 by now.
I'm not here to hard sell you on dropping it. (How you spend your nights and weekends isn't up to me.) I'm here to give your users hard data you can point to in case anyone whines if you DO drop it. Worrying about IDF4 in 2026 is spending your time so that other developers don't have to update THEIR code; a price that shouldn't be yours to pay. Helping move things to the path of current SDKs (like we just did in FastLED 3.10.8 to enable Arduino4 and IDF6) helps raise the tide of the whole software ecosystem instead of encouraging everyone to keep a Windows XP VM with ancient dependencies pinned on it. Having G++15 means that a big chunk of C++26 (alas, not reflection yet) so you don't have to constantly remember what subset of the language was available in 2018 when G++8, the version in IDF4, roamed the earth. Things like #embed and placement new are really handed in embeddedsville. Picking up ten years of language support is nice and it should reduce your cognitive load by not having to remember what language features you CAN'T use because some old compiler (like G++8) can't cope.
With FastLED 3.1.8 and similar, smaller changes to MrCodeTastic's HUB75 layer, I think my Arduino4 branch for https://github.com/robertlipe/NightDriver-afterglow is on the order of a dozen lines of C++. I landed over a hundred PRs in my own upstream (before my fork) to make Arduino3/IDF5 stable. My IDF-only projects were trivial to move from 5.5 to 6.0 and 6.1.
The one oncoming train is that I have one build that's super feature-packed that supports OTAs (so flash is halved) that's RISC-V (larger than Xtensa) and on a 4MB flash and the growing size of the framework is a concern. There are a few more tiny rabbits I can pull from that hat, but that IS one legit reason that someone might have to stay on old versions. OTOH, people staying on old frameworks should also stay on old libraries.
You support a crazy matrix of chips, LEDs, and toolkits. Here's one that announces their schedule of when new versions come and go. I get that Espressif is only one brand of chips that you support, but with ESP32, S2, S3, C3, P4, S31, C5, C6 multiplied mutiplied by different bit-blasting hardware (PARLIO? BitScramblr? RMT? SPI?) by three (five? six?) different IDF versions, it's likely disproportionately difficult. It's OK to just cleave off an old slice that even the vendor doesn't care about any longer.
It's OK to roll off old ones (like IDF4) when you add new ones (like IDF6, as you just did.) Circle of life. Collection of garbage. Tough love. Whatever cliche works for you. :-)
It's rare in open source to get encouragement to have FEWER features/platforms. Take the win.
zackees commentedon Oct 22, 2026
Resolved by #4877 (merged to master 2026-10-22).