From 6a76b94c6e0ae97bc743cc90d0811e691a35869e Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Thu, 24 Nov 2022 13:18:15 +0100 Subject: [PATCH] makefiles/boards/stm32.ink.mk: use USB_VID/USB_PID for DFU_USB_ID 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). --- makefiles/boards/stm32.inc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefiles/boards/stm32.inc.mk b/makefiles/boards/stm32.inc.mk index aadac2e625d87..020e5d30c8ccb 100644 --- a/makefiles/boards/stm32.inc.mk +++ b/makefiles/boards/stm32.inc.mk @@ -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