Skip to content

fix(esp32): repair or reject legacy RMT4 selection on IDF 5 #3936

Closed

Description

@zackees

Problem

On the current supported ESP32 Arduino/IDF 5 toolchain, the documented legacy-RMT4 compatibility selection does not compile even after supplying the guard-required definitions:

bash compile esp32dev --examples Blink --defines FASTLED_RMT5=0,ESP32_ARDUINO_NO_RGB_BUILTIN=1

This was discovered while validating #3932. I searched open FastLED issues and PRs for RMT4 IDF5 compile FASTLED_RMT5=0; no existing tracker covers the aggregate failure.

Reproduction

Environment observed on 2026-08-20:

  • pioarduino platform archive 53.03.10
  • Arduino ESP32 core 3.3.11
  • xtensa-esp-elf-gcc 14.2.0
  • fbuild 2.5.18

The first attempt with only FASTLED_RMT5=0 correctly stops at FastLED.h and instructs the caller to also define ESP32_ARDUINO_NO_RGB_BUILTIN=1. Adding that definition gets into the legacy implementation, where compilation fails in multiple pre-existing areas.

Current failures

RMT4 TX engine

  • ChannelEngineRMT4Impl::canHandle(...) is defined in channel_driver_rmt4.cpp.hpp but is not declared on the concrete class.
  • ChannelEngineRMT4Impl does not implement the now-pure IChannelDriver::getCapabilities() contract, so factory construction sees an abstract type.
  • Direct RMTMEM access in configureChannel() is unavailable through the current IDF 5 headers. The installed SDK still has the deprecated legacy RMT API, but no compatible RMTMEM symbol is exposed by the included public headers.

RMT4 RX engine

The same forced selection also compiles rmt_rx_4 and fails independently:

  • DecodeError::INVALID_SYMBOL no longer exists.
  • RxConfig::hz is now optional and cannot be assigned directly to u32.
  • RmtRxChannelImpl lacks current pure virtual implementations such as getPin() and getResolutionHz().

These failures are unrelated to the reset-timing change being validated; they reproduce after the documented compatibility guard is satisfied.

Expected behavior

One of these policies should be made explicit and enforced consistently:

  1. Fully support FASTLED_RMT5=0 on IDF 5 by porting both legacy TX/RX implementations and adding a compile gate, or
  2. Reject RMT4 on IDF 5 with a direct unsupported-configuration error instead of telling users that ESP32_ARDUINO_NO_RGB_BUILTIN=1 enables it.

Acceptance criteria

  • The supported policy is documented in the ESP32 backend selection guide and FastLED.h guard text.
  • If compatibility remains supported, the exact reproduction command compiles on esp32dev and CI continuously covers it.
  • If compatibility is removed, FASTLED_RMT5=0 on IDF 5 fails immediately with one accurate diagnostic and does not suggest an ineffective second define.
  • IDF 4 builds remain covered so the native legacy backend is not accidentally removed.

Decisions made while filing

  • Group TX and RX failures because they make the same advertised build configuration unusable and require one support-policy decision.
  • Mark deferred: this is a multi-subsystem IDF 5 compatibility port/policy change, not a focused reset/latch correction, and current IDF 5 builds have the RMT5 backend available.

Activity

  1. added
    type: bug
    priority: medium
    platform: esp32
    area: drivers
    deferred
    on Aug 20, 2026
  2. moved this from Triage to Done in FastLED Trackeron Aug 22, 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

    area: driversdeferredplatform: esp32priority: mediumtype: bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions