diff options
| author | Danny <nooges@users.noreply.github.com> | 2018-02-28 16:40:43 -0500 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2018-02-28 16:40:43 -0500 |
| commit | 524053e3c0eceab0eadf04cde6c2c0f1a77520fe (patch) | |
| tree | 63af7911576188cb3700287df04f52ebd570ba81 | |
| parent | 19b02bf2673e891888cdbf00fc5f7a3776e50505 (diff) | |
| download | qmk_firmware-524053e3c0eceab0eadf04cde6c2c0f1a77520fe.tar.gz qmk_firmware-524053e3c0eceab0eadf04cde6c2c0f1a77520fe.zip | |
Remap msys2 usb, fix USB port detection (#2301)
* Add AVRDUDE to MSYS2 setup
* Remap detected USB port in MSYS2 to COM port
| -rw-r--r-- | tmk_core/avr.mk | 4 | ||||
| -rw-r--r-- | util/msys2_install.sh | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 106b77150..853b8f02f 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk | |||
| @@ -183,6 +183,10 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size | |||
| 183 | done; \ | 183 | done; \ |
| 184 | echo ""; \ | 184 | echo ""; \ |
| 185 | echo "Detected controller on USB port at $$USB"; \ | 185 | echo "Detected controller on USB port at $$USB"; \ |
| 186 | if grep -q -s 'MINGW\|MSYS' /proc/version; then \ | ||
| 187 | USB=`echo "$$USB" | perl -pne 's/\/dev\/ttyS(\d+)/COM.($$1+1)/e'`; \ | ||
| 188 | echo "Remapped MSYS2 USB port to $$USB"; \ | ||
| 189 | fi; \ | ||
| 186 | sleep 1; \ | 190 | sleep 1; \ |
| 187 | avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ | 191 | avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ |
| 188 | fi | 192 | fi |
diff --git a/util/msys2_install.sh b/util/msys2_install.sh index 282053fe4..c64685754 100644 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh | |||
| @@ -16,6 +16,7 @@ function install_avr { | |||
| 16 | wget "http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe" | 16 | wget "http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe" |
| 17 | 7z x avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe | 17 | 7z x avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe |
| 18 | rm avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe | 18 | rm avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe |
| 19 | pacman --needed -S mingw-w64-x86_64-avrdude | ||
| 19 | } | 20 | } |
| 20 | 21 | ||
| 21 | function install_arm { | 22 | function install_arm { |
