diff options
Diffstat (limited to 'tmk_core/avr.mk')
-rw-r--r-- | tmk_core/avr.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 106b771507..853b8f02f2 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -183,6 +183,10 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size done; \ echo ""; \ echo "Detected controller on USB port at $$USB"; \ + if grep -q -s 'MINGW\|MSYS' /proc/version; then \ + USB=`echo "$$USB" | perl -pne 's/\/dev\/ttyS(\d+)/COM.($$1+1)/e'`; \ + echo "Remapped MSYS2 USB port to $$USB"; \ + fi; \ sleep 1; \ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ fi |