Skip to content

feat(deploy): add stock RP2040 UF2 deployment#1041

Merged
zackees merged 1 commit into
mainfrom
feat/rp2040-uf2-deploy
Jul 14, 2026
Merged

feat(deploy): add stock RP2040 UF2 deployment#1041
zackees merged 1 commit into
mainfrom
feat/rp2040-uf2-deploy

Conversation

@zackees

@zackees zackees commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • generate RP2040/RP2350 UF2 from firmware.bin and deploy through stock RPI-RP2 mass storage
  • support 1200-baud BOOTSEL entry, marker-volume discovery, ambiguity rejection, and post-flash CDC handoff
  • allow no-pre-port deployment and emit FBUILD_DEPLOY_PORT for AutoResearch

Validation

  • soldr cargo test -p fbuild-deploy rp2040 --lib (5 passed)
  • soldr cargo check -p fbuild-daemon (passed)
  • soldr cargo fmt --check

Related: #1040, FastLED/FastLED#3626

Summary by CodeRabbit

  • New Features

    • Added firmware deployment support for Raspberry Pi RP2040/RP2350 boards.
    • Firmware can now be transferred through the board’s BOOTSEL drive using UF2 format.
    • Added automatic BOOTSEL detection and post-deployment serial reconnection.
    • Deployment responses now report the port used for recovery and monitoring.
  • Bug Fixes

    • Improved serial recovery when no deployment port is selected in advance.

@zackees
zackees merged commit 8b9a60c into main Jul 14, 2026
91 of 93 checks passed
@coderabbitai

coderabbitai Bot commented Jul 14, 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: 631102e9-e462-4910-9388-67c29704f38d

📥 Commits

Reviewing files that changed from the base of the PR and between 4ac1ae9 and 884ea8b.

📒 Files selected for processing (3)
  • crates/fbuild-daemon/src/handlers/operations/deploy.rs
  • crates/fbuild-deploy/src/lib.rs
  • crates/fbuild-deploy/src/rp2040.rs

📝 Walkthrough

Walkthrough

Adds RP2040/RP2350 UF2 deployment, BOOTSEL volume discovery, serial port recovery, Raspberry Pi deployer dispatch, and deploy responses containing the recovered port.

Changes

RP2040 deployment

Layer / File(s) Summary
UF2 encoding and BOOTSEL discovery
crates/fbuild-deploy/src/rp2040.rs
Adds UF2 generation, BOOTSEL volume scanning, serial 1200-baud triggering, UF2 writing, and unit tests.
RP2040 deployer execution
crates/fbuild-deploy/src/rp2040.rs
Implements board-specific family selection, deployment orchestration, CDC port detection, and post-deploy recovery.
Daemon dispatch and deploy response
crates/fbuild-deploy/src/lib.rs, crates/fbuild-daemon/src/handlers/operations/deploy.rs
Exports the RP2040 module, dispatches Raspberry Pi targets, derives recovery ports, and reports FBUILD_DEPLOY_PORT.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DeployHandler
  participant Rp2040Deployer
  participant SerialPort
  participant BootselVolume
  DeployHandler->>Rp2040Deployer: select RaspberryPi deployer
  Rp2040Deployer->>SerialPort: trigger BOOTSEL with 1200-baud touch
  Rp2040Deployer->>BootselVolume: discover marker volume
  Rp2040Deployer->>BootselVolume: write firmware.uf2
  Rp2040Deployer->>SerialPort: wait for CDC port recovery
  Rp2040Deployer-->>DeployHandler: return deployment result and port
Loading

Possibly related issues

✨ 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 feat/rp2040-uf2-deploy

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