Skip to content

flash.py: handle RPI-RP2 block device not yet mounted on Linux#147

Merged
spencerhhubert merged 1 commit into
mainfrom
spencer/flash-bootloader-blockdev-fix
May 29, 2026
Merged

flash.py: handle RPI-RP2 block device not yet mounted on Linux#147
spencerhhubert merged 1 commit into
mainfrom
spencer/flash-bootloader-blockdev-fix

Conversation

@spencerhhubert

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a case where flash.py bails with "No Pico boards found over USB" on Linux when the Pico is already in bootloader mode but the RPI-RP2 volume hasn't been auto-mounted yet (block device exists at e.g. /dev/sda1 but no mount point)
  • Adds a _find_rpi_rp2_blockdev() check before falling through to serial port scanning

Test plan

  • Reproduce: reboot Pico to bootloader, run flash.py before OS auto-mounts — previously failed, now flashes correctly

🤖 Generated with Claude Code

When a Pico is already in bootloader mode, the block device appears
(/dev/sda1, label RPI-RP2) but may not be auto-mounted. The previous
code only checked mounted paths, so it fell through to serial scanning
and bailed with "No Pico boards found over USB". Now checks the block
device before scanning serial ports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented May 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sorter-v2-docs Ready Ready Preview, Comment May 29, 2026 8:35pm
sorteros-setup Building Building Preview, Comment May 29, 2026 8:35pm

@spencerhhubert spencerhhubert merged commit 790afd6 into main May 29, 2026
2 of 3 checks passed
@spencerhhubert spencerhhubert deleted the spencer/flash-bootloader-blockdev-fix branch May 29, 2026 20:35
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