2026-02-28 11:58:23 -05:00

14 lines
320 B
Bash
Executable File

#!/bin/bash
# Flash SaltyLab — auto-reboot to DFU if serial port exists
PORT=/dev/cu.usbmodemSALTY0011
FW=.pio/build/f722/firmware.bin
if [ -e "$PORT" ]; then
echo "Sending reboot-to-DFU..."
echo -n 'R' > "$PORT"
sleep 2
fi
echo "Flashing..."
/opt/homebrew/bin/dfu-util -a 0 -s 0x08000000:leave -D "$FW"