Repository navigation
Description
Symptom
esp_extra_libs workflow (drives ci/kitchensink/ against pioarduino/[email protected], esp32-s3-devkitc-1) fails on master with two distinct errors:
Error 1 — clearDelayFunction undeclared
src/platforms/stub_main.hpp:48:13: error: 'clearDelayFunction' was not declared in this scope
48 | clearDelayFunction();
Error 2 — mcpwm_ll.h volatile-reference binding
hal/esp32s3/include/hal/mcpwm_ll.h:1598:58: error: no matching function for call to
'mcpwm_timer_cfg0_reg_t(volatile mcpwm_timer_cfg0_reg_t&)'
hal/esp32s3/include/hal/mcpwm_ll.h:1598:58: error: binding reference of type
'const mcpwm_timer_cfg0_reg_t&' to 'volatile mcpwm_timer_cfg0_reg_t' discards qualifiers
Root causes
Error 1 — preprocessor guard mismatch
stub_main.hpp:48 calls clearDelayFunction() unconditionally, but the include of the header that declares it (platforms/stub/time_stub.h) is gated:
#if !defined(ARDUINO) || defined(FASTLED_USE_STUB_ARDUINO)
#include "platforms/stub/time_stub.h"
#include "fl/stl/noexcept.h"
#endifOn a real Arduino build (kitchensink defines ARDUINO and does not define FASTLED_USE_STUB_ARDUINO), the include is skipped but the call site still fires. There's also no clearDelayFunction to call in that mode — there's no stub delay override to clear.
Error 2 — unused IDF include triggers C++17 strict-binding error
src/platforms/esp/32/drivers/gpio_isr_rx/mcpwm_timer.cpp.hpp:54 includes hal/mcpwm_ll.h. That header defines mcpwm_ll_timer_get_clock_prescale (line 1598) which copies a volatile mcpwm_timer_cfg0_reg_t field into a non-volatile local — in C this is fine, in C++17+ the implicit copy constructor takes const T& and binding const T& to volatile T& is ill-formed.
FastLED's mcpwm_timer.cpp.hpp doesn't actually USE any mcpwm_ll_* function. It only needs the register-struct types (mcpwm_dev_t, MCPWM0, cap_chn[].val) which come from soc/mcpwm_struct.h (the include on the line above). The hal/mcpwm_ll.h include is dead weight.
Affected jobs
esp_extra_libs(the kitchensink workflow exercising stock pioarduino ESP-IDF 5.x with extra libs).
Fix
Both are one-line edits:
stub_main.hpp:48— wrap theclearDelayFunction()call in the same#if !defined(ARDUINO) || defined(FASTLED_USE_STUB_ARDUINO)guard that controls its include.mcpwm_timer.cpp.hpp:54— drop the unused#include "hal/mcpwm_ll.h". (Add a comment explaining the volatile-binding error in IDF 5.x for future readers.)
Test plan
-
bash lintclean (cpp_linting + others). -
bash test fastled_core --cpp— host smoke test still passes. - CI:
esp_extra_libsworkflow should compile cleanly.
Notes
A third concern surfaced by an earlier triage agent — ESP_CACHE_MSYNC_FLAG_DIR_C2M at lcd_spi_peripheral_esp.cpp.hpp:364 — did NOT appear in the current run's failure log. The neighboring rmt5_peripheral_esp.cpp.hpp already has the fallback #ifndef ESP_CACHE_MSYNC_FLAG_DIR_C2M / #define ... 0 pattern; if CI surfaces the same on lcd_spi, a one-line follow-up will copy that pattern.
Filed during a coordinated CI-green sweep; fix PR landing immediately.
Activity