Skip to content

refactor(deploy): consume FastLED/boards USB profiles#1060

Merged
zackees merged 1 commit into
mainfrom
refactor/usb-profile-deploy-consumers
Jul 15, 2026
Merged

refactor(deploy): consume FastLED/boards USB profiles#1060
zackees merged 1 commit into
mainfrom
refactor/usb-profile-deploy-consumers

Conversation

@zackees

@zackees zackees commented Jul 15, 2026

Copy link
Copy Markdown
Member

Closes the remaining deploy-consumer rows in #1047 and #1049.\n\n- automatic deploy-port selection uses board membership and typed runtime profiles instead of embedded vendor lists\n- missing profiles fail closed instead of choosing an unrelated COM port\n- RP2040/RP2350 generation selection uses runtime profile family metadata\n- Teensy CDC, NXP probe discovery, and LPC-Link2 factory-firmware detection use typed purpose/role/platform/family/generation metadata\n- dfu-util argv construction requires a caller-supplied registry selector\n- exact identities remain test-only fixtures\n\nDepends on FastLED/boards#52 for the split LPC-Link2 semantics.\n\nValidation:\n- fbuild-daemon deploy_port: 8 passed\n- fbuild-deploy: 169 passed, 8 hardware tests ignored\n- strict clippy for daemon/deploy passed\n- rustfmt and diff check passed\n- independent pre-push review: clean

Summary by CodeRabbit

  • Bug Fixes

    • Improved deploy-port selection by matching connected devices to the selected board and runtime.
    • Improved detection of Raspberry Pi, LPC-Link2, and Teensy devices using USB profile information.
    • Reduced incorrect device matches caused by broad or outdated USB identifiers.
    • Improved warnings and handling when no devices or multiple devices match.
  • Documentation

    • Updated USB identifier audit documentation to reflect profile-based device detection.

@zackees
zackees merged commit 7e84d97 into main Jul 15, 2026
86 of 93 checks passed
@zackees
zackees deleted the refactor/usb-profile-deploy-consumers branch July 15, 2026 03:55
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: df10c8c2-2246-43fa-9f0e-e84a6eb6fdcb

📥 Commits

Reviewing files that changed from the base of the PR and between 1c43d56 and e99d12c.

📒 Files selected for processing (6)
  • crates/fbuild-daemon/src/handlers/operations/deploy.rs
  • crates/fbuild-daemon/src/handlers/operations/deploy_port.rs
  • crates/fbuild-deploy/src/lpc_debugger_reflash.rs
  • crates/fbuild-deploy/src/probe_rs.rs
  • crates/fbuild-deploy/src/teensy/port_discovery.rs
  • docs/usb-vidpid-audit.md

📝 Walkthrough

Walkthrough

Deploy-port selection and LPC-Link2, Probe-RS, and Teensy discovery now use FastLED/boards USB profile metadata instead of fixed VID/PID heuristics. Board identifiers flow into deployment matching, DFU selectors are explicit, and related tests and audit documentation were updated.

Changes

USB profile matching migration

Layer / File(s) Summary
Board-aware deploy-port selection
crates/fbuild-daemon/src/handlers/operations/deploy.rs, crates/fbuild-daemon/src/handlers/operations/deploy_port.rs, docs/usb-vidpid-audit.md
Deploy selection receives board identifiers, matches runtime USB profiles, handles Raspberry Pi generation profiles, updates warnings, and tests no-match behavior.
LPC-Link2 reflash detection
crates/fbuild-deploy/src/lpc_debugger_reflash.rs
Factory firmware detection uses USB profiles in production, while dfu-util receives an explicit device selector.
NXP probe profile selection
crates/fbuild-deploy/src/probe_rs.rs
LPC-Link2 probe discovery filters candidates using NXP debug-probe profile semantics and updates the documented selector example.
Teensy runtime CDC discovery
crates/fbuild-deploy/src/teensy/port_discovery.rs
Teensy CDC selection uses profile-derived runtime identities instead of vendor-only matching.
Estimated code review effort: 4 (Complex) ~45 minutes

Possibly related issues

Possibly related PRs

  • FastLED/fbuild#1053 — Introduces the typed USB transport profile API used by these matching changes.
✨ 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 refactor/usb-profile-deploy-consumers

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.

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.

1 participant