Skip to content

Commit

Permalink
Merge pull request #42 from zsa/feature/add_dfu_util_signature
Browse files Browse the repository at this point in the history
Add DFU Suffix for ARM boards (qmk#5763)
  • Loading branch information
fdidron authored May 6, 2019
2 parents 7a136f7 + caef39b commit 3504bf3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions quantum/mcu_selection.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions quantum/stm32/proton_c.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions tmk_core/chibios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,15 @@ DFU_ARGS ?=
ifneq ("$(SERIAL)","")
DFU_ARGS += -S $(SERIAL)
endif
DFU_SUFFIX_ARGS ?=

ST_LINK_ARGS ?=

# List any extra directories to look for libraries here.
EXTRALIBDIRS = $(RULESPATH)/ld

DFU_UTIL ?= dfu-util
DFU_SUFFIX ?= dfu-suffix
ST_LINK_CLI ?= st-link_cli

# Generate a .qmk for the QMK-FF
Expand Down Expand Up @@ -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;

0 comments on commit 3504bf3

Please sign in to comment.