can flash using DFU even if sofware reset is not possible

This commit is contained in:
King Kévin 2016-01-29 11:07:02 +01:00
parent b1a9b811ba
commit aa30d0db52
1 changed files with 3 additions and 0 deletions

View File

@ -104,6 +104,7 @@ OOCD_TARGET ?= stm32f1x
# which USB CDC ACM port is used bu the device, so we can reset it
ACMPORT = /dev/ttyACM0
ACMPORT_EXISTS = $(shell [ -e $(ACMPORT) ] && echo 1 || echo 0 )
# board specific USB DFU bootloader
BOOTLOADERS = STM32duino-bootloader
@ -172,8 +173,10 @@ flash-swd: $(BINARY).hex
# reset device by setting the data width to 5 bis on the USB CDC ACM port
reset:
ifeq ($(ACMPORT_EXISTS), 1)
$(Q)stty --file $(ACMPORT) 115200 raw cs5
$(Q)sleep 0.5
endif
flash-dfu: $(BINARY).bin reset
$(info flashing $(<) using DFU)