Skip to content

fix(rp2040): use Arduino-compatible UF2 write semantics - #1067

Merged
zackees merged 1 commit into
mainfrom
fix/rp2040-direct-uf2-write
Jul 15, 2026
Merged

fix(rp2040): use Arduino-compatible UF2 write semantics#1067
zackees merged 1 commit into
mainfrom
fix/rp2040-direct-uf2-write

Conversation

@zackees

@zackees zackees commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

  • replace Windows-sensitive std::fs::copy with Arduino-Pico-compatible create/truncate + whole-buffer direct write to NEW.UF2
  • count reported bytes so an eject-race error is accepted only after the complete artifact and observed BOOTSEL disappearance
  • preserve failures for partial writes and for Windows 1006/121/1392 when ROM acceptance is not established
  • add actionable Windows 1006/121 diagnostics without filesystem repair, driver changes, raw-disk writes, or copy retries

Validation

  • uv run python ci/test.py -p fbuild-deploy: 180 passed, 8 hardware-specific ignored
  • soldr cargo test -p fbuild-deploy rp2040: 32 passed
  • soldr cargo clippy -p fbuild-deploy --all-targets -- -D warnings
  • soldr cargo fmt --all -- --check
  • git diff --check
  • independent review: approved

Hardware status

The editable build has been exercised on the attached stock Pico 1 (2E8A:0003, RPI-RP2, serial E0C9125B0D9B). The prior whole-file copy failed with Windows error 1006 while the marker remained. A repeated-small-write experiment failed with error 121 and was discarded. The whole-buffer writer is staged, but the current device is behind a Genesys Logic 05E3:0610 USB 2.0 hub and has not yet produced a valid ROM eject/runtime CDC transition. This PR remains draft until a fresh direct-port BOOTSEL run provides the required hardware evidence.

Closes the remaining Phase 2 gap in #1049.
Supports #1040.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@zackees, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 11 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e229328c-b988-4939-b41e-78f74dcd7468

📥 Commits

Reviewing files that changed from the base of the PR and between 29adb7a and 1229d73.

📒 Files selected for processing (1)
  • crates/fbuild-deploy/src/rp2040.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rp2040-direct-uf2-write

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 commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@zackees
zackees marked this pull request as ready for review July 15, 2026 05:53
@zackees
zackees merged commit 7ea127e into main Jul 15, 2026
81 of 93 checks passed
@zackees
zackees deleted the fix/rp2040-direct-uf2-write branch July 15, 2026 05:54
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 16, 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.

1 participant