When running:
picotool load firmware.uf2 -f
If the device is not already in BOOTSEL mode, picotool appears to:
- trigger reboot into BOOTSEL
- but does not wait long enough for USB re-enumeration
As a result:
- first invocation fails or does nothing
- second invocation succeeds
Expected behavior:
picotool should wait and retry for a short period (e.g. 2–3 seconds)
for the BOOTSEL device to appear before failing.
It may be advantageous to add an optional parameter to define delay, e.g. to wait 2000ms before re-enumerating USB
picotool load firmware.uf2 -f -d 2000
or to wait for 5 re-enumeration attempts, each with 20ms delay:
picotool load firmware.uf2 -f -d 20 -r 5
Workaround:
Adding a delay between reboot and load works reliably:
picotool reboot -u -f && sleep 1 && picotool load firmware.uf2 -f
Environment:
- OS: Debian Linux subsystem on ChromeOS (possibly causing delay in USB re-enumeration
- Pico SDK version: 2.2.0
- picotool version: v2.2.0-a4 (Linux, GNU-12.2.0, Release)