Skip to content

Instantly share code, notes, and snippets.

@ninp0
Last active July 12, 2024 08:20
Show Gist options
  • Save ninp0/beeb3205a0a6cd0497d1593e7a0cbe49 to your computer and use it in GitHub Desktop.
Save ninp0/beeb3205a0a6cd0497d1593e7a0cbe49 to your computer and use it in GitHub Desktop.
#!/bin/bash --login
usage() {
echo "USAGE: ${0} <QMK Firmware.bin Path>"
exit 1
}
if (( $# == 1 )); then
firmware_bin_path="${1}"
dfu-util --list
printf "Enter DFU Device ID from Listing Above (e.g. DEAD:BEEF): "; read dfu
# Example DFU => 04AA:df22
dfu-util \
--alt 0 \
--device $dfu \
--dfuse-address 0x08000000:leave \
--download $firmware_bin_path
else
usage
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment