Skip to content

fix(examples): include all_drivers.h in DriverTest TestRunner.h - #2477

Closed
zackees wants to merge 1 commit into
masterfrom
fix-driver-test-include-all-drivers
Closed

zackees wants to merge 1 commit into
masterfrom
fix-driver-test-include-all-drivers

Conversation

@zackees

@zackees zackees commented May 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes ESP32 link failure in SpecialDrivers/ESP/DriverTest now surfaced by master CI after #2476 switched ./compile to fbuild compile-many and added all to the esp32 workflow args.

Symptom (from master CI on commit 0bc9b8c3d2, target esp32s3):

ld: ... undefined reference to `_ZN8CFastLED16enableAllDriversEv'
ld: ... in function `_ZN16DriverTestRunner16testSingleDriverEPKc':
main.cpp:(.text._ZN16DriverTestRunner16testSingleDriverEPKc...): undefined reference to `CFastLED::enableAllDrivers()'
collect2: error: ld returned 1 exit status
FAILED: SpecialDrivers/ESP/DriverTest

Root cause: TestRunner.h calls FastLED.enableAllDrivers() (line 271) but never includes fl/channels/all_drivers.h, which provides the linker opt-in body for that method (see #2428). Adding the include resolves the unresolved symbol at link.

This is a one-line example-level fix; no library or build-system changes.

Known follow-up (out of scope)

Ports/PJRCSpectrumAnalyzer also now fails on teensy41 (and presumably teensy35/36/40) with:

undefined reference to `arm_cfft_radix4_init_q15'
undefined reference to `arm_cfft_radix4_q15'

That is a Teensy Audio library / CMSIS-DSP link resolution problem under fbuild compile-many — the math lib (libarm_cortexM7lfsp_math.a) isn't being pulled in. It's a fbuild/build-system issue, not an example issue, and warrants a separate investigation.

Test plan

  • build_esp32s3 workflow turns green on this branch
  • build_esp32dev_i2s workflow turns green on this branch
  • No other targets regress

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Ensured FastLED driver implementation is properly available during testing by correcting internal include dependencies.

Review Change Stack

…nner.h

DriverTest calls FastLED.enableAllDrivers() but never includes the header
that provides the linker opt-in body for that function. After PR #2476
switched ./compile to fbuild compile-many (and added `all` to the
esp32s3/esp32dev_i2s workflow args), this example is now built in CI on
all ESP32 targets and the resulting link fails with:

  undefined reference to `CFastLED::enableAllDrivers()'

Adding the include from fl/channels/all_drivers.h pulls in the body, per
the dual-mode API documented in #2428.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented May 13, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f327e251-b19d-4a38-8737-707b926b5645

📥 Commits

Reviewing files that changed from the base of the PR and between 0bc9b8c and 7e86f2e.

📒 Files selected for processing (1)
  • examples/SpecialDrivers/ESP/DriverTest/TestRunner.h

📝 Walkthrough

Walkthrough

TestRunner.h adds an explicit include for fl/channels/all_drivers.h to ensure FastLED's enable-all-drivers functionality is properly linked and available, rather than relying on transitive includes for this capability.

Changes

Driver availability setup

Layer / File(s) Summary
Enable all drivers header include
examples/SpecialDrivers/ESP/DriverTest/TestRunner.h
Added #include "fl/channels/all_drivers.h" to explicitly ensure FastLED.enableAllDrivers() is linked and available for the test runner's driver-discovery and exclusive-driver selection logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • FastLED/FastLED#2472: Also modifies TestRunner.h to support exclusive-driver selection by name and ensure enableAllDrivers() is available.
  • FastLED/FastLED#2448: Introduces fl::enableAllDrivers() and CFastLED::enableAllDrivers() in the header that this PR now explicitly includes.

Poem

🐰 A header so small, yet vital and bright,
One line to include makes the drivers all right!
No more silent links in the shadows of doubt,
FastLED's full power is what this is about! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding an include of all_drivers.h to TestRunner.h to fix a linking issue in the DriverTest example.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-driver-test-include-all-drivers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees

zackees commented May 14, 2026

Copy link
Copy Markdown
Member Author

Superseded by #2478, which addresses the underlying architectural issue (moves enableAllDrivers() body to a TU + relies on --gc-sections for tree-shaking) rather than papering over the missing include in this example.

@zackees zackees closed this May 14, 2026
@zackees
zackees deleted the fix-driver-test-include-all-drivers branch November 17, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant