Skip to content

Instantly share code, notes, and snippets.

@Hermann-SW

Hermann-SW/flash

Last active May 27, 2021
Embed
What would you like to do?
"Flash .uf2 file to"/reboot Raspberry Pico with baudrate switching method [+picotool reboot]
#!/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
@Hermann-SW

This comment has been minimized.

Copy link
Owner Author

@Hermann-SW Hermann-SW commented Feb 8, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment