Skip to content

Commit

Permalink
Add DFU suffix on build
Browse files Browse the repository at this point in the history
  • Loading branch information
dallmair committed Oct 14, 2024
1 parent c5aca06 commit 5b2db2d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/build-firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
name: Download toolchain
run: ./util/install-toolchain.sh

- name: Install dfu-util
run: sudo apt-get update && sudo apt-get install --yes dfu-util

- name: Build Firmware
run: make -k all
env:
Expand Down
5 changes: 4 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ TARGET ?= STM32F042
include targets.mk

DFU_UTIL ?= dfu-util
DFUSE_VID_PID := 0483:df11
DFU_SUFFIX ?= dfu-suffix
DFUSE_VID := 0483
DFUSE_PID := df11
DFUSE_VID_PID := $(DFUSE_VID):$(DFUSE_PID)
DAP42_VID_PID := 1209:da42
DFU_VID_PID ?= $(DFUSE_VID_PID)
APP_VID_PID ?= $(DAP42_VID_PID)
Expand Down
1 change: 1 addition & 0 deletions src/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ locm3: $(LIB_DIR)/lib$(LIBNAME).a
%.bin: %.elf
@#printf " OBJCOPY $(*).bin\n"
$(Q)$(OBJCOPY) -Obinary $(*).elf $(*).bin
$(DFU_SUFFIX) -v $(DFUSE_VID) -p $(DFUSE_PID) --add $(*).bin

%.hex: %.elf
@#printf " OBJCOPY $(*).hex\n"
Expand Down

0 comments on commit 5b2db2d

Please sign in to comment.