Skip to content

Commit

Permalink
picotool: picotool-ify flash process
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnsAnns committed Mar 6, 2025
1 parent 4857cf0 commit 464bbbb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dist/tools/picotool/picotool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

ELFFILE="$1"
UF2FILE="${UF2FILE:-${ELFFILE%%.elf}.uf2}"
PICOTOOL_MOUNT_PATH="${PICOTOOL_MOUNT_PATH:-/media/$USER/RPI-RP2}"

echo "Converting $ELFFILE to $UF2FILE"
echo "[INFO] Converting $ELFFILE to $UF2FILE"
"$(dirname "$0")"/picotool uf2 convert "$ELFFILE" "$UF2FILE"

echo "Flashing $UF2FILE to $PICOTOOL_MOUNT_PATH"
cp "$UF2FILE" "$PICOTOOL_MOUNT_PATH"
echo "[INFO] Loading $UF2FILE onto Pico"
"$(dirname "$0")"/picotool load "$UF2FILE"

echo "[INFO] Verifying $UF2FILE on Pico"
"$(dirname "$0")"/picotool verify "$UF2FILE"

0 comments on commit 464bbbb

Please sign in to comment.