summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-05-03 08:24:22 -0700
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-05-03 08:24:22 -0700
commit41beecfc1847bd0039c508753a212fa18f207e3f (patch)
tree48569d636367b6f1ec50d7010ebf47315f4412d8
parent29f68459a01c155ca64aed4ec0ba083d0dee0d2e (diff)
Add DFU Suffix for ARM boards (#5763)
* Add DFU Suffix for ARM boards * Blindly flash DFU SUFFIX ARGS for now * Fix commented out check * Fix DFU Suffix Argument check Thank you jack! * Update Travis CI Scripts to include dfu-util So we can get dfu-suffix as well * Manually add dfu-suffix package * Use external repo for newer version of dfu-util One that includes dfu-suffix * Update .travis.yml * Silence unnecessary output from dfu-suffix
-rw-r--r--.travis.yml4
-rw-r--r--keyboards/candybar/rules.mk1
-rw-r--r--keyboards/clueboard/60/rules.mk1
-rw-r--r--keyboards/clueboard/66/rev4/rules.mk1
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/rules.mk1
-rw-r--r--keyboards/dztech/dz40rgb/rules.mk1
-rw-r--r--keyboards/dztech/dz60rgb/rules.mk1
-rw-r--r--keyboards/ergodox_infinity/rules.mk1
-rw-r--r--keyboards/hs60/v2/keymaps/ansi_via/rules.mk1
-rw-r--r--keyboards/hs60/v2/keymaps/default_via/rules.mk1
-rw-r--r--keyboards/hs60/v2/keymaps/goatmaster/rules.mk1
-rw-r--r--keyboards/hs60/v2/keymaps/hhkb_via/rules.mk1
-rw-r--r--keyboards/hs60/v2/keymaps/iso_andys8/rules.mk1
-rw-r--r--keyboards/hs60/v2/keymaps/stanrc85/rules.mk1
-rw-r--r--keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk1
-rw-r--r--keyboards/hs60/v2/rules.mk1
-rw-r--r--keyboards/infinity60/rules.mk1
-rw-r--r--keyboards/k_type/rules.mk1
-rw-r--r--keyboards/vinta/rules.mk1
-rw-r--r--keyboards/whitefox/rules.mk1
-rw-r--r--quantum/mcu_selection.mk1
-rw-r--r--quantum/stm32/proton_c.mk1
-rw-r--r--tmk_core/chibios.mk5
23 files changed, 30 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index a50b205ec0..796be6c045 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,10 +13,14 @@ env:
- MAKEFLAGS="-j3 --output-sync"
before_install:
- wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
+ # Need DFU > .5 for dfu-suffix
+ - sudo add-apt-repository --yes ppa:tormodvolden/ppa
+ - sudo apt-get update -qq
install:
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
- npm install -g moxygen
+ - sudo apt-get -y --force-yes install dfu-util
before_script:
- avr-gcc --version
script:
diff --git a/keyboards/candybar/rules.mk b/keyboards/candybar/rules.mk
index 6f39ee0e74..0bc9a5b3e6 100644
--- a/keyboards/candybar/rules.mk
+++ b/keyboards/candybar/rules.mk
@@ -31,6 +31,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/clueboard/60/rules.mk b/keyboards/clueboard/60/rules.mk
index aada073525..a0927025bb 100644
--- a/keyboards/clueboard/60/rules.mk
+++ b/keyboards/clueboard/60/rules.mk
@@ -35,6 +35,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/clueboard/66/rev4/rules.mk b/keyboards/clueboard/66/rev4/rules.mk
index 846b1eee0b..4d20ff2e96 100644
--- a/keyboards/clueboard/66/rev4/rules.mk
+++ b/keyboards/clueboard/66/rev4/rules.mk
@@ -13,6 +13,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/clueboard/66_hotswap/gen1/rules.mk b/keyboards/clueboard/66_hotswap/gen1/rules.mk
index 6b1ee92c18..326912a34b 100644
--- a/keyboards/clueboard/66_hotswap/gen1/rules.mk
+++ b/keyboards/clueboard/66_hotswap/gen1/rules.mk
@@ -37,6 +37,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# LED Configuration
LED_MATRIX_ENABLE = IS31FL3731
diff --git a/keyboards/dztech/dz40rgb/rules.mk b/keyboards/dztech/dz40rgb/rules.mk
index 99cbafb8cc..d0ddec838c 100644
--- a/keyboards/dztech/dz40rgb/rules.mk
+++ b/keyboards/dztech/dz40rgb/rules.mk
@@ -40,6 +40,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/dztech/dz60rgb/rules.mk b/keyboards/dztech/dz60rgb/rules.mk
index 98e95c88df..20ca7f2eb6 100644
--- a/keyboards/dztech/dz60rgb/rules.mk
+++ b/keyboards/dztech/dz60rgb/rules.mk
@@ -35,6 +35,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
BACKLIGHT_ENABLE = no
diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk
index 1cc95193cb..af8e9ef200 100644
--- a/keyboards/ergodox_infinity/rules.mk
+++ b/keyboards/ergodox_infinity/rules.mk
@@ -59,6 +59,7 @@ OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
#
DFU_ARGS = -d 1c11:b007
+DFU_SUFFIX_ARGS = -p b007 -v 1c11
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
diff --git a/keyboards/hs60/v2/keymaps/ansi_via/rules.mk b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk
index a2850a8305..deb4fc889b 100644
--- a/keyboards/hs60/v2/keymaps/ansi_via/rules.mk
+++ b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk
@@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/hs60/v2/keymaps/default_via/rules.mk b/keyboards/hs60/v2/keymaps/default_via/rules.mk
index a2850a8305..deb4fc889b 100644
--- a/keyboards/hs60/v2/keymaps/default_via/rules.mk
+++ b/keyboards/hs60/v2/keymaps/default_via/rules.mk
@@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk
index a2850a8305..deb4fc889b 100644
--- a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk
+++ b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk
@@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk
index a2850a8305..deb4fc889b 100644
--- a/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk
+++ b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk
@@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk
index a2850a8305..deb4fc889b 100644
--- a/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk
+++ b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk
@@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk
index c46a6b9528..817785d7aa 100644
--- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk
+++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk
@@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk
index c89d909695..05193af4bb 100644
--- a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk
+++ b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk
@@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/hs60/v2/rules.mk b/keyboards/hs60/v2/rules.mk
index 5659d28c9f..64948c2e9a 100644
--- a/keyboards/hs60/v2/rules.mk
+++ b/keyboards/hs60/v2/rules.mk
@@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk
index 8cb2b37559..1f02e05c84 100644
--- a/keyboards/infinity60/rules.mk
+++ b/keyboards/infinity60/rules.mk
@@ -58,6 +58,7 @@ OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000
#
DFU_ARGS = -d 1c11:b007
+DFU_SUFFIX_ARGS = -p b007 -v 1c11
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk
index a1c56903b5..7762f18682 100644
--- a/keyboards/k_type/rules.mk
+++ b/keyboards/k_type/rules.mk
@@ -57,6 +57,7 @@ ARMV = 7
OPT_DEFS =
DFU_ARGS = -d 1c11:b007
+DFU_SUFFIX_ARGS = -p b007 -v 1c11
# Build Options
# comment out to disable the options.
diff --git a/keyboards/vinta/rules.mk b/keyboards/vinta/rules.mk
index 9d89d96636..3ddb8d5bc0 100644
--- a/keyboards/vinta/rules.mk
+++ b/keyboards/vinta/rules.mk
@@ -33,6 +33,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk
index 9f222bf4f3..d9aa911c54 100644
--- a/keyboards/whitefox/rules.mk
+++ b/keyboards/whitefox/rules.mk
@@ -55,6 +55,7 @@ ARMV = 7
OPT_DEFS =
DFU_ARGS = -d 1c11:b007
+DFU_SUFFIX_ARGS = -p b007 -v 1c11
# Build Options
# comment out to disable the options.
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index 209b578ea5..fa6dc8b53c 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -34,6 +34,7 @@ ifneq ($(findstring STM32F303, $(MCU)),)
# Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave
+ DFU_SUFFIX_ARGS = -p DF11 -v 0483
endif
ifneq (,$(filter $(MCU),atmega32u4 at90usb1286))
diff --git a/quantum/stm32/proton_c.mk b/quantum/stm32/proton_c.mk
index a0fa013736..a65e283d3f 100644
--- a/quantum/stm32/proton_c.mk
+++ b/quantum/stm32/proton_c.mk
@@ -42,3 +42,4 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p df11 -v 0483
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index 01edebfd74..44c00bdd15 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -201,6 +201,7 @@ DFU_ARGS ?=
ifneq ("$(SERIAL)","")
DFU_ARGS += -S $(SERIAL)
endif
+DFU_SUFFIX_ARGS ?=
ST_LINK_ARGS ?=
@@ -208,6 +209,7 @@ ST_LINK_ARGS ?=
EXTRALIBDIRS = $(RULESPATH)/ld
DFU_UTIL ?= dfu-util
+DFU_SUFFIX ?= dfu-suffix
ST_LINK_CLI ?= st-link_cli
# Generate a .qmk for the QMK-FF
@@ -259,4 +261,7 @@ st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter
$(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst
bin: $(BUILD_DIR)/$(TARGET).bin sizeafter
+ if [ ! -z "$(DFU_SUFFIX_ARGS)" ]; then \
+ $(DFU_SUFFIX) $(DFU_SUFFIX_ARGS) -a $(BUILD_DIR)/$(TARGET).bin 1>/dev/null ;\
+ fi
$(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin;