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
This commit is contained in:
Drashna Jaelre 2019-05-03 08:24:22 -07:00 committed by MechMerlin
parent 29f68459a0
commit 41beecfc18
23 changed files with 30 additions and 0 deletions

View File

@ -13,10 +13,14 @@ env:
- MAKEFLAGS="-j3 --output-sync" - MAKEFLAGS="-j3 --output-sync"
before_install: 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 - 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: install:
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz - 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" - export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
- npm install -g moxygen - npm install -g moxygen
- sudo apt-get -y --force-yes install dfu-util
before_script: before_script:
- avr-gcc --version - avr-gcc --version
script: script:

View File

@ -31,6 +31,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -35,6 +35,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -13,6 +13,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -37,6 +37,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# LED Configuration # LED Configuration
LED_MATRIX_ENABLE = IS31FL3731 LED_MATRIX_ENABLE = IS31FL3731

View File

@ -40,6 +40,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -35,6 +35,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
BACKLIGHT_ENABLE = no BACKLIGHT_ENABLE = no

View File

@ -59,6 +59,7 @@ OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
# #
DFU_ARGS = -d 1c11:b007 DFU_ARGS = -d 1c11:b007
DFU_SUFFIX_ARGS = -p b007 -v 1c11
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)

View File

@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -58,6 +58,7 @@ OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000
# #
DFU_ARGS = -d 1c11:b007 DFU_ARGS = -d 1c11:b007
DFU_SUFFIX_ARGS = -p b007 -v 1c11
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)

View File

@ -57,6 +57,7 @@ ARMV = 7
OPT_DEFS = OPT_DEFS =
DFU_ARGS = -d 1c11:b007 DFU_ARGS = -d 1c11:b007
DFU_SUFFIX_ARGS = -p b007 -v 1c11
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -33,6 +33,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -55,6 +55,7 @@ ARMV = 7
OPT_DEFS = OPT_DEFS =
DFU_ARGS = -d 1c11:b007 DFU_ARGS = -d 1c11:b007
DFU_SUFFIX_ARGS = -p b007 -v 1c11
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.

View File

@ -34,6 +34,7 @@ ifneq ($(findstring STM32F303, $(MCU)),)
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
endif endif
ifneq (,$(filter $(MCU),atmega32u4 at90usb1286)) ifneq (,$(filter $(MCU),atmega32u4 at90usb1286))

View File

@ -42,3 +42,4 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing # Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p df11 -v 0483

View File

@ -201,6 +201,7 @@ DFU_ARGS ?=
ifneq ("$(SERIAL)","") ifneq ("$(SERIAL)","")
DFU_ARGS += -S $(SERIAL) DFU_ARGS += -S $(SERIAL)
endif endif
DFU_SUFFIX_ARGS ?=
ST_LINK_ARGS ?= ST_LINK_ARGS ?=
@ -208,6 +209,7 @@ ST_LINK_ARGS ?=
EXTRALIBDIRS = $(RULESPATH)/ld EXTRALIBDIRS = $(RULESPATH)/ld
DFU_UTIL ?= dfu-util DFU_UTIL ?= dfu-util
DFU_SUFFIX ?= dfu-suffix
ST_LINK_CLI ?= st-link_cli ST_LINK_CLI ?= st-link_cli
# Generate a .qmk for the QMK-FF # 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 $(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst
bin: $(BUILD_DIR)/$(TARGET).bin sizeafter 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; $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin;