aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tmk_core/avr.mk13
1 files changed, 8 insertions, 5 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index f5c125771..9118e497d 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -156,17 +156,20 @@ dfu-split-right: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size
156define EXEC_AVRDUDE 156define EXEC_AVRDUDE
157 USB= ;\ 157 USB= ;\
158 if $(GREP) -q -s Microsoft /proc/version; then \ 158 if $(GREP) -q -s Microsoft /proc/version; then \
159 echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \ 159 echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using QMK Toolbox, AVRDUDE, AVRDUDESS, or XLoader.'; \
160 else \ 160 else \
161 printf "Detecting USB port, reset your controller now."; \ 161 printf "Detecting USB port, reset your controller now."; \
162 ls /dev/tty* > /tmp/1; \ 162 TMP1=`mktemp`; \
163 TMP2=`mktemp`; \
164 ls /dev/tty* > $$TMP1; \
163 while [ -z $$USB ]; do \ 165 while [ -z $$USB ]; do \
164 sleep 0.5; \ 166 sleep 0.5; \
165 printf "."; \ 167 printf "."; \
166 ls /dev/tty* > /tmp/2; \ 168 ls /dev/tty* > $$TMP2; \
167 USB=`comm -13 /tmp/1 /tmp/2 | $(GREP) -o '/dev/tty.*'`; \ 169 USB=`comm -13 $$TMP1 $$TMP2 | $(GREP) -o '/dev/tty.*'`; \
168 mv /tmp/2 /tmp/1; \ 170 mv $$TMP2 $$TMP1; \
169 done; \ 171 done; \
172 rm $$TMP2 $$TMP1; \
170 echo ""; \ 173 echo ""; \
171 echo "Device $$USB has appeared; assuming it is the controller."; \ 174 echo "Device $$USB has appeared; assuming it is the controller."; \
172 if $(GREP) -q -s 'MINGW\|MSYS' /proc/version; then \ 175 if $(GREP) -q -s 'MINGW\|MSYS' /proc/version; then \