Repository navigation
Description
Problem
The PARLIO IRAM flags in ci/boards.py (constant _ESP32_PARLIO_BUILD_FLAGS, spread into the build_flags of every PARLIO-capable board) are applied via a hand-maintained allowlist of board names: esp32c5, esp32c6, esp32h2, esp32p4. (My PR #3276 originally included esp32s3 too — incorrectly, since S3 has no PARLIO peripheral. That bug shipped to master because the list was a manual transcription instead of derived from a canonical source.)
The authoritative source of "which chips have PARLIO" is Espressif's SOC_PARLIO_SUPPORTED capability bit, set per-target in components/soc/<chip>/include/soc/soc_caps.h. FastLED already consumes it: FASTLED_ESP32_HAS_PARLIO = SOC_PARLIO_SUPPORTED (src/platforms/esp/32/feature_flags/enabled.h:135).
Today's drift risk:
- A new Espressif chip ships with PARLIO. FastLED's driver code automatically picks it up because the driver is gated by
FASTLED_ESP32_HAS_PARLIO. Butci/boards.pywon't apply the IRAM flag to the new board — silent regression (the#warninginparlio_peripheral_esp.cpp.hpp:48fires at compile time, easy to miss in CI noise). - A chip is added to FastLED's board list (
ci/boards.py) but the maintainer forgets to add it to the PARLIO allowlist. Same silent regression.
Goal
Drive the PARLIO IRAM flag application from the SoC capability, not a hand-maintained list. Concretely:
- Add a
parlio_capable(orsoc_features) field to theBoarddataclass inci/boards.py. DefaultFalse. - Set it explicitly on each PARLIO-capable board today (C5, C6, H2, P4). Mark it via a comment that points at the ESP-IDF SoC capability — "PARLIO peripheral: see
soc_caps.hSOC_PARLIO_SUPPORTED". Board.to_platformio_ini()auto-applies_ESP32_PARLIO_BUILD_FLAGSwhenparlio_capable=True— no manual spread needed at the call site.- (Stretch / cleaner): derive
parlio_capablefrom a per-chip-family table (or fetch from a vendored copy of ESP-IDF'ssoc_caps.hparsed at codegen time) so adding a new PARLIO chip means updating one place (the SoC table), not auditing every board definition.
Acceptance criteria
ci/boards.pyhas no manual*_ESP32_PARLIO_BUILD_FLAGSspread at the call site of each PARLIO board — the flags are emitted byto_platformio_ini()based on a capability field.- Adding a new ESP32 chip to
ci/boards.pyrequires touching ONE place to opt it into PARLIO flags (parlio_capable=Trueor its equivalent), not three places (the spread, the constant, the comment). - A snapshot test verifies that
boards.py's PARLIO-capable set equals FastLED's driver allowlist (the four boards listed insrc/platforms/esp/32/drivers/parlio/bus_traits.h:6andchannel_driver_parlio.cpp.hpp:8). esp32s3is NOT in the PARLIO set (it currently is — that's the bug surfaced in PR docs(channels): list supported chipsets in the fl::Bus enum table #3299).
Why this matters
The hand-maintained list has already caused one bug (esp32s3 incorrectly listed as PARLIO-capable in PR #3276; documented in PR #3299). The pattern of "drift between code-level capability flags and CI-side board lists" is exactly the kind of thing #3274 worked to eliminate for platformio.ini. Same medicine for PARLIO.
Refs
- Discovered via: PR fix(ci/boards): set PARLIO TX ISR IRAM flags on all PARLIO-capable boards (#3271) #3275 triage (user caught the esp32s3 misclassification)
- Documented in: PR docs(channels): list supported chipsets in the fl::Bus enum table #3299 (channels README)
- Authoritative chip list:
src/platforms/esp/32/drivers/parlio/bus_traits.h:6
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
refactor(boards): derive PARLIO flag emission from per-chip capabilit…