mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #15555 from dylad/pr/makefiles/dfu_optionnal_dfuse
boards: move DfuSe specific argument at board level
This commit is contained in:
commit
b801d57f0c
@ -5,23 +5,17 @@ ifeq (dfu-util,$(PROGRAMMER))
|
||||
# For older versions of the DFU bootloader, set DFU_USB_ID to 1d50:6017
|
||||
DFU_USB_ID ?= 1eaf:0003
|
||||
DFU_ALT ?= 2
|
||||
|
||||
DFU_USE_DFUSE = 1
|
||||
# Leave some space at the beginning of the flash for the bootloader
|
||||
ROM_OFFSET ?= 0x2000
|
||||
|
||||
# If using STM32duino bootloader, this change is necessary.
|
||||
# Bootloader available at
|
||||
# github.com/rogerclarkmelbourne/STM32duino-bootloader/tree/master/binaries
|
||||
ifeq (stm32duino,$(BOOTLOADER))
|
||||
FFLAGS_OPTS ?= -R
|
||||
FFLAGS ?= --device $(DFU_USB_ID) \
|
||||
--alt $(DFU_ALT) \
|
||||
--download $(FLASHFILE) \
|
||||
$(FFLAGS_OPTS)
|
||||
|
||||
# Flashing may be easier if using a software USB reset.
|
||||
# Future updates may provide USB support for stm32f1 which benefits
|
||||
# from this software reset.
|
||||
FFLAGS_OPTS += --reset
|
||||
endif
|
||||
|
||||
else ifeq (openocd,$(PROGRAMMER))
|
||||
|
@ -4,7 +4,7 @@ INCLUDES += -I$(RIOTBOARD)/common/weact-f4x1cx/include
|
||||
# default to flashing over USB
|
||||
PROGRAMMER ?= dfu-util
|
||||
DFU_USB_ID ?= 0483:df11
|
||||
DFU_FLAGS ?= -a 0 -s 0x08000000:leave
|
||||
DFU_USE_DFUSE = 1
|
||||
ROM_OFFSET ?= 0x0
|
||||
|
||||
# CDC ACM is available faster on STM32
|
||||
|
@ -8,3 +8,4 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
# this board is flashed using DFU
|
||||
PROGRAMMER ?= dfu-util
|
||||
DFU_USB_ID = 0483:df11
|
||||
DFU_USE_DFUSE = 1
|
||||
|
@ -8,4 +8,4 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
# this board is flashed using DFU
|
||||
PROGRAMMER ?= dfu-util
|
||||
DFU_USB_ID = 1d50:607f
|
||||
FFLAGS_OPTS = --reset
|
||||
DFU_USE_DFUSE = 1
|
||||
|
@ -11,3 +11,4 @@ ROM_OFFSET ?= 0x5000
|
||||
# this board is flashed using DFU
|
||||
PROGRAMMER ?= dfu-util
|
||||
DFU_USB_ID = 1d50:607f
|
||||
DFU_USE_DFUSE = 1
|
||||
|
@ -7,12 +7,15 @@ ROM_OFFSET ?= 0
|
||||
|
||||
_ROM_ADDR_WITH_OFFSET ?= $(shell printf "0x%x" $$(($(ROM_START_ADDR) + $(ROM_OFFSET))))
|
||||
FLASH_ADDR ?= $(if $(ROM_OFFSET),$(_ROM_ADDR_WITH_OFFSET),$(ROM_START_ADDR))
|
||||
|
||||
DFU_USE_DFUSE ?= 0
|
||||
# Optional flasher flags
|
||||
FFLAGS_OPTS ?=
|
||||
|
||||
FFLAGS ?= --device $(DFU_USB_ID) \
|
||||
--alt $(DFU_ALT) \
|
||||
--dfuse-address $(FLASH_ADDR):leave \
|
||||
--download $(FLASHFILE) \
|
||||
$(FFLAGS_OPTS)
|
||||
|
||||
ifeq ($(DFU_USE_DFUSE),1)
|
||||
FFLAGS += --dfuse-address $(FLASH_ADDR):leave
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user