Skip to content

Commit

Permalink
makefiles/boards/stm32.ink.mk: use USB_VID/USB_PID for DFU_USB_ID
Browse files Browse the repository at this point in the history
The variable `DFU_USB_ID` is used to specify the device to be used by `dfu-util`. The STM32 make system rejects the use of `dfu-util` as programmer if this variable is not set. This in turn prevents the use of USBUS DFU without setting the variable, although `dfu-util.mk` can generate the required variable `DFU_USB_ID` from `USB_VID` and `USB_PID` if needed. Therefore the STM32 make system is modified to accept an empty `DFU_USB_ID` variable when using `dfu-util` for USBUS DFU (module `usbus_dfu` is used).
  • Loading branch information
gschorcht committed Nov 24, 2022
1 parent a6ff838 commit 6a76b94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion makefiles/boards/stm32.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ifeq (dfu-util,$(PROGRAMMER))
# with blackmagic_dfu, see https://github.com/blacksphere/blackmagic/
# To stop bootloader from loading an existing firmware, pull down
# (ground) GPIO B1.
ifeq (,$(DFU_USB_ID))
ifeq (,$(DFU_USB_ID) $(filter usbus_dfu,$(USEMODULE)))
$(error DFU_USB_ID is not set)
endif
endif
Expand Down

0 comments on commit 6a76b94

Please sign in to comment.