Skip to content

esp32: CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 should be a boards.py default on all PARLIO-capable boards #3271

Closed

Description

@zackees

Summary

CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 and CONFIG_PARLIO_TX_ISR_CACHE_SAFE=1 are required for correct PARLIO TX ISR behavior — without them the ISR sits in flash, takes cache-miss stalls during execution, and violates LED protocol timing. The driver source explicitly #warnings when the flag is missing (src/platforms/esp/32/drivers/parlio/parlio_peripheral_esp.cpp.hpp:46-48).

Today these flags live only in the root platformio.ini under [env:esp32c6] (lines 76-77). They are not present in ci/boards.py for any board. CI builds get them by accident, via the root-merge in PioCompiler._init_platformio_build (ci/compiler/pio.py:155) — and only for esp32c6. Every other PARLIO-capable board compiles without them today.

Affected boards in ci/boards.py

PARLIO support is gated on SOC_PARLIO_SUPPORTED (src/platforms/esp/32/feature_flags/enabled.h:135). Boards in ci/boards.py that should set the flags:

  • esp32c6 (ESP32_C6_DEVKITC_1, boards.py:801) — currently missing in boards.py, masked by root merge
  • esp32s3 (ESP32_S3_DEVKITC_1, boards.py:815) — missing, no mask, compiles with #warning today
  • esp32h2 (ESP32_H2, boards.py:843) — missing
  • esp32p4 (ESP32_P4, boards.py:850) — missing
  • esp32c5 (boards.py:795) — missing
  • Anywhere else SOC_PARLIO_SUPPORTED is true

Why this matters now

Discovered while auditing the root platformio.ini → CI merge coupling (see parent issue / discussion of PR #2794 / #2664 / #3268). The planned cleanup is to sever root platformio.ini from the CI compile path entirely and make ci/boards.py the sole source of truth. If we do that without porting these PARLIO flags first, every esp32c6 build silently loses ISR-in-IRAM placement and becomes a runtime-timing regression with only a compile-time #warning as signal.

This issue should land before the root-merge sever, so the migration is safe.

Proposed fix

Add to build_flags on every PARLIO-capable board definition in ci/boards.py:

"-DCONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1",
"-DCONFIG_PARLIO_TX_ISR_CACHE_SAFE=1",

Preferred: extract a shared ESP32_PARLIO_BUILD_FLAGS constant (or a small mixin / helper) so the next PARLIO-capable board added doesn't quietly miss them. Alternative: emit them unconditionally from Board.to_platformio_ini() when the platform is ESP32 and SOC_PARLIO_SUPPORTED would be true — but the macro is per-target, so a board-side allowlist is simpler than a platform-side derivation.

Verification

  • After porting, remove the duplicate lines from [env:esp32c6] in root platformio.ini to confirm the flags now come from boards.py.
  • Compile each PARLIO board and confirm the #warning in parlio_peripheral_esp.cpp.hpp no longer fires.
  • Optional: add a static_assert next to the #warning so missing flags are a hard error on PARLIO-supporting targets (ratchet from warn → error).

Labels / refs

Activity

  1. zackees commented on Jun 19, 2026

    @zackees
    MemberAuthor

    Cross-link: this is Phase 1 / a blocker for #3274 (sever root platformio.ini from CI compile path). Porting the PARLIO IRAM flags into ci/boards.py here removes one of the two gaps that the root-merge is invisibly masking today.

  2. moved this from Triage to Done in FastLED Trackeron Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions