Skip to content

fix(rp2040): don't infer Adafruit_TinyUSB_Arduino unless USE_TINYUSB is selected (#1719) - #1721

Merged
zackees merged 1 commit into
mainfrom
fix/1719-rp2040-tinyusb-not-selected
Oct 24, 2026
Merged

zackees merged 1 commit into
mainfrom
fix/1719-rp2040-tinyusb-not-selected

Conversation

@zackees

@zackees zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member

Fixes #1719.

Arduino-Pico's bundled Adafruit_TinyUSB_Arduino #errors unless USE_TINYUSB (USB-stack menu) is defined, but library selection over-selects it through the core's #ifdef USE_TINYUSB includes in SPI/SD/LittleFS. Same approach as #1606 (bluetooth_libs.rs): new rp2040/tinyusb_libs.rs drops framework libraries whose headers have an #error under a !defined(USE_TINYUSB) / #ifndef USE_TINYUSB guard (structural marker, no hardcoded library name), unless USE_TINYUSB is defined by the menu or build_flags, or the library is named in lib_deps.

Verified end to end (Linux, dev daemon, Arduino-Pico 4.5.3): issue's sketch with FastLED 3.10.8 in lib/FastLED

  • main: Adafruit_TinyUSB_API.h:50:2: error: #error TinyUSB is not selected
  • this branch: build succeeded (flash: 360432 bytes)

Note: a bare #include <SPI.h> sketch, and FastLED master via lib_deps, already build on main, so the issue's "any SPI sketch" guess doesn't hold. The trigger is FastLED 3.10.8 in lib/.

Tests: 4 new unit tests in tinyusb_libs; cargo test -p fbuild-build-arm rp2040 40 passed; clippy clean. Docs: docs/architecture/library-selection.md.

…is selected (#1719)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between af838a4 and 42fce7c.

Files selected for processing: 4
  • crates/fbuild-build-arm/src/rp2040/mod.rs
  • crates/fbuild-build-arm/src/rp2040/orchestrator.rs
  • crates/fbuild-build-arm/src/rp2040/tinyusb_libs.rs
  • docs/architecture/library-selection.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@zackees
zackees merged commit 8ebbbb0 into main Oct 24, 2026
26 checks passed
@zackees
zackees deleted the fix/1719-rp2040-tinyusb-not-selected branch October 24, 2026 10:03
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

RP2040: Adafruit_TinyUSB_Arduino compiled without USE_TINYUSB, so FastLED Pico sketches fail

1 participant