-
-
Save feiz/21293cbdff8a2e70b2d0af1389f2f279 to your computer and use it in GitHub Desktop.
WSLでavrdudeを簡単に使う為の奴 qmk用
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
MODECMD='/mnt/c/Windows/System32/mode.com' | |
COMPORT1=$(${MODECMD}|grep -o 'COM[0-9]*') | |
COMPORT2="" | |
while [ "$COMPORT2" = "" ];do | |
sleep 0.5 | |
printf "." | |
COMPORT2=$(${MODECMD}|grep -v '${COMPORT1}'|grep -o 'COM[0-9]*') | |
done | |
PORTNUM=$(echo $COMPORT2|sed -e 's/COM//') | |
avrdude -c avr109 -p atmega32u4 -P /dev/ttyS${PORTNUM} -U flash:w:$* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment