]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Add DFU Suffix for ARM boards (#5763)
authorDrashna Jaelre <drashna@live.com>
Fri, 3 May 2019 15:24:22 +0000 (08:24 -0700)
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>
Fri, 3 May 2019 15:24:22 +0000 (08:24 -0700)
* 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

23 files changed:
.travis.yml
keyboards/candybar/rules.mk
keyboards/clueboard/60/rules.mk
keyboards/clueboard/66/rev4/rules.mk
keyboards/clueboard/66_hotswap/gen1/rules.mk
keyboards/dztech/dz40rgb/rules.mk
keyboards/dztech/dz60rgb/rules.mk
keyboards/ergodox_infinity/rules.mk
keyboards/hs60/v2/keymaps/ansi_via/rules.mk
keyboards/hs60/v2/keymaps/default_via/rules.mk
keyboards/hs60/v2/keymaps/goatmaster/rules.mk
keyboards/hs60/v2/keymaps/hhkb_via/rules.mk
keyboards/hs60/v2/keymaps/iso_andys8/rules.mk
keyboards/hs60/v2/keymaps/stanrc85/rules.mk
keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk
keyboards/hs60/v2/rules.mk
keyboards/infinity60/rules.mk
keyboards/k_type/rules.mk
keyboards/vinta/rules.mk
keyboards/whitefox/rules.mk
quantum/mcu_selection.mk
quantum/stm32/proton_c.mk
tmk_core/chibios.mk

index a50b205ec07a0b0db955d0b8aa67bcaf4a5fa6ba..796be6c045bcea5549dbfaea9015a18073dfaf6c 100644 (file)
@@ -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:
index 6f39ee0e74a1526e5fa8643d244929afb2e3ae3f..0bc9a5b3e691672dc58cabd9e385e9f6aa351c3f 100644 (file)
@@ -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.
index aada073525918f0ad36e9596e0ee05e3f0cfa72d..a0927025bb518f46408719a904e479bc51a0b186 100644 (file)
@@ -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.
index 846b1eee0b74f4ea21524e6cb993c9b938406b41..4d20ff2e96e40c5109068beab4c3b0291b01cff8 100644 (file)
@@ -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.
index 6b1ee92c180af5d25d7712f577d4069976b0bf67..326912a34b8c7fbf5f03ca78fdcb89dfe3f219e9 100644 (file)
@@ -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
index 99cbafb8cc5c2427e40e629244e67e7e71ca4b51..d0ddec838ccf90bd42f86ea922c1235506da23a6 100644 (file)
@@ -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.
index 98e95c88dfe2a5bdd64da0547a4166a172e14fe2..20ca7f2eb648d5e7fe0f51ea4fc791016536d9bf 100644 (file)
@@ -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
index 1cc95193cb55f307fa135fe28c23dd9aaa9c1a01..af8e9ef200c51b93cdfecf5077a3802118f642ba 100644 (file)
@@ -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)
index a2850a83057d400490679023cc9a214f30b682d7..deb4fc889b9c557fcbc7019791f4ab8f35b491de 100644 (file)
@@ -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.
index a2850a83057d400490679023cc9a214f30b682d7..deb4fc889b9c557fcbc7019791f4ab8f35b491de 100644 (file)
@@ -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.
index a2850a83057d400490679023cc9a214f30b682d7..deb4fc889b9c557fcbc7019791f4ab8f35b491de 100644 (file)
@@ -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.
index a2850a83057d400490679023cc9a214f30b682d7..deb4fc889b9c557fcbc7019791f4ab8f35b491de 100644 (file)
@@ -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.
index a2850a83057d400490679023cc9a214f30b682d7..deb4fc889b9c557fcbc7019791f4ab8f35b491de 100644 (file)
@@ -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.
index c46a6b9528c29613e17814a51d26c2c0d3962744..817785d7aac6f1ff05b8d1e8a2d7ff8d8e691afd 100644 (file)
@@ -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.
index c89d90969572eafc7cd9cc01d558f193ef9a379e..05193af4bbc5665fc53e95347f964d6f6d5a2b09 100644 (file)
@@ -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.
index 5659d28c9ff1017a7a6795e45b53cb759e79db8d..64948c2e9a718e7b2018c60b55119ee92c5211d1 100644 (file)
@@ -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.
index 8cb2b3755951106553303797e5cf858014c57ea2..1f02e05c84cdc928c3530261b297fd89de1ec1e9 100644 (file)
@@ -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.)
index a1c56903b5c6d9c170b61a2b394ac9b42a03c8ca..7762f1868204a6569aeb27478e79f69bbdcabbd4 100644 (file)
@@ -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.
index 9d89d9663635326633c06d294bbd7a063609efd8..3ddb8d5bc0db1556517f9b23bf40fc4d137152db 100644 (file)
@@ -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.
index 9f222bf4f3004dfd0215492a57c7d1bcc56d63c5..d9aa911c54e5cfb2fc6607ebf59fa1b169bd25e9 100644 (file)
@@ -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.
index 209b578ea55eb08f3a83e233f1fcb1e71812e3bb..fa6dc8b53ca8ae8ac2a458b2893346d9fc4a228e 100644 (file)
@@ -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))
index a0fa013736b876317b058223b41318d4781a6c78..a65e283d3f1686166183e58c90c3ab38e051c979 100644 (file)
@@ -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
index 01edebfd74c7cbf1d06d821946786dd351dcea3f..44c00bdd151b1e5c97667aa6fd98ccf803aa45e1 100644 (file)
@@ -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;