Last active
March 14, 2025 11:18
-
-
Save Hermann-SW/ca07f46b7f9456de41f0956d81de01a7 to your computer and use it in GitHub Desktop.
"Flash .uf2 file to"/reboot Raspberry Pico with baudrate switching method [+picotool reboot]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo stty -F /dev/ttyACM0 1200 | |
echo waiting | |
while [ ! -d /media/pi/RPI-RP2 ]; do sleep 0.1; done | |
sleep 0.5 | |
if [ "$*" = "" ]; then echo rebooting; sudo picotool reboot; exit; fi | |
echo copying | |
cp $1 /media/pi/RPI-RP2 | |
echo done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated flash tool allows to flash .uf2 files as well as to reboot the Pico over USB. No change needed anywhere, besides using new V1.1.0 SDK. Projects not using USB can add single command to CMakeLists.txt to work (as hello_serial.c in animation):

https://www.raspberrypi.org/forums/viewtopic.php?f=145&t=305458&p=1833379#p1833379