else
+ifdef WITH_SERIAL_FLASH
+
+BOOT_SERIAL ?= /dev/ttyUSB0
+
%.flash: %.bin
@printf " FLASH $<\n"
- $(Q)$(ROOT)/bin/st-flash write $(*).bin 0x8000000
+ $(Q)$(ROOT)/bin/stm32flash $(BOOT_SERIAL) -i 'dtr,-dtr' -w $< -g 0
.PHONY: reset
reset: all
+ $(Q)$(ROOT)/bin/stm32flash $(BOOT_SERIAL) -i 'dtr,-dtr' -g 0
+
+else
+
+%.flash: %.bin
+ @printf " FLASH $<\n"
+ $(Q)$(ROOT)/bin/st-flash write $(*).bin 0x8000000
+
+.PHONY: reset
+reset:
$(ROOT)/bin/st-flash reset
endif
+endif
.SECONDEXPANSION:
.SECONDARY: