mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
makefiles: add riotboot_dfu-util.mk to override board's dfu-util config
Boards that are shipped with a DFU bootloader define the `dfu-util` configuration in their `Makefile.include`. However, when `riotboot_dfu` is used as the DFU bootloader, the board's `dfu-util` configuration must be overridden by the configuration as required by `riotboot_dfu` to use it to flash applications. Therefore, all `dfu-util` configurations are defined as overridable in the board's `Makefile.include` and the configuration as required by `riotboot_dfu` is included before the board's `Makefile.include`.
This commit is contained in:
parent
9fa01d69d8
commit
3100345214
@ -461,6 +461,11 @@ else
|
|||||||
include $(RIOTMAKE)/dependency_resolution.inc.mk
|
include $(RIOTMAKE)/dependency_resolution.inc.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Include dfu-util configuration when using riotboot_dfu bootloader before
|
||||||
|
# including the board's Makefile.include which could define dfu-util
|
||||||
|
# configuration for other DFU bootloaders in use.
|
||||||
|
include $(RIOTMAKE)/boot/riotboot_dfu-util.mk
|
||||||
|
|
||||||
# Include Board and CPU configuration
|
# Include Board and CPU configuration
|
||||||
INCLUDES += $(addprefix -I,$(wildcard $(BOARDDIR)/include))
|
INCLUDES += $(addprefix -I,$(wildcard $(BOARDDIR)/include))
|
||||||
include $(BOARDDIR)/Makefile.include
|
include $(BOARDDIR)/Makefile.include
|
||||||
|
10
makefiles/boot/riotboot_dfu-util.mk
Normal file
10
makefiles/boot/riotboot_dfu-util.mk
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
ifneq (,$(filter usbus_dfu,$(USEMODULE)))
|
||||||
|
ifeq (,$(filter riotboot_usb_dfu,$(USEMODULE)))
|
||||||
|
# If module usbus_dfu is used but not module riotboot_usb_dfu, the
|
||||||
|
# application uses DFU Runtime and dfu-util as programmer to flash the
|
||||||
|
# application with the bootloader riotboot_dfu which uses the VID/PID pair
|
||||||
|
# allocated for the RIOT bootloader https://pid.codes/1209/7D02/
|
||||||
|
DFU_USB_ID ?= 1209:7d02
|
||||||
|
DFU_USE_DFUSE ?= 0
|
||||||
|
endif
|
||||||
|
endif
|
Loading…
Reference in New Issue
Block a user