mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-10 06:59:54 +08:00
[dfu] add dfu-util support to flash stm32
display in paparazzi center is still confusing. It seems the verbose mode is not on stdout and the information status are red (dfuERROR status) while they are not errors
This commit is contained in:
+11
-2
@@ -231,17 +231,26 @@ $(AOBJ) : $(OBJDIR)/%.o : %.S
|
||||
# check which flash mode is configured
|
||||
#
|
||||
ifeq ($(FLASH_MODE),DFU)
|
||||
ifeq ($(DFU_UTIL),y)
|
||||
#
|
||||
# DFU flash mode using dfu-util
|
||||
DFU_ADDR ?= 0x08000000
|
||||
upload: $(OBJDIR)/$(TARGET).bin
|
||||
@echo "Using dfu-util at $(DFU_ADDR)"
|
||||
$(Q)dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s $(DFU_ADDR) -D $^ -v
|
||||
else
|
||||
#
|
||||
# DFU flash mode paparazzi stm32_mem
|
||||
ifdef DFU_ADDR
|
||||
DFU_ADDR_CMD = --addr=$(DFU_ADDR)
|
||||
endif
|
||||
ifdef DFU_PRODUCT
|
||||
DFU_PRODUCT_CMD = --product=$(DFU_PRODUCT)
|
||||
endif
|
||||
#
|
||||
# DFU flash mode
|
||||
upload: $(OBJDIR)/$(TARGET).bin
|
||||
@echo "Using stm32 mem dfu loader"
|
||||
$(PYTHON) $(PAPARAZZI_SRC)/sw/tools/dfu/stm32_mem.py $(DFU_PRODUCT_CMD) $(DFU_ADDR_CMD) $^
|
||||
endif
|
||||
|
||||
#
|
||||
# serial flash mode
|
||||
|
||||
@@ -19,8 +19,9 @@ HARD_FLOAT=yes
|
||||
|
||||
# default flash mode is via usb dfu bootloader
|
||||
# possibilities: DFU, SWD
|
||||
FLASH_MODE ?= SWD
|
||||
FLASH_MODE ?= DFU
|
||||
STLINK ?= y
|
||||
DFU_UTIL ?= y
|
||||
|
||||
#
|
||||
# default LED configuration
|
||||
|
||||
Reference in New Issue
Block a user