Last active
September 7, 2024 11:45
-
-
Save ninp0/beeb3205a0a6cd0497d1593e7a0cbe49 to your computer and use it in GitHub Desktop.
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 --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