summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/stm32/mboot/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/ports/stm32/mboot/Makefile b/ports/stm32/mboot/Makefile
index e892f9140..fa8b2a3d8 100644
--- a/ports/stm32/mboot/Makefile
+++ b/ports/stm32/mboot/Makefile
@@ -115,13 +115,17 @@ $(TOP)/lib/stm32lib/README.md:
$(ECHO) "stm32lib submodule not found, fetching it now..."
(cd $(TOP) && git submodule update --init lib/stm32lib)
-.PHONY: deploy
+.PHONY: deploy deploy-stlink
+
+FLASH_ADDR = 0x08000000
deploy: $(BUILD)/firmware.dfu
$(ECHO) "Writing $< to the board"
$(Q)$(PYTHON) $(PYDFU) -u $<
-FLASH_ADDR = 0x08000000
+deploy-stlink: $(BUILD)/firmware.dfu
+ $(ECHO) "Writing $< to the board via ST-LINK"
+ $(Q)$(STFLASH) write $(BUILD)/firmware.bin $(FLASH_ADDR)
$(BUILD)/firmware.dfu: $(BUILD)/firmware.elf
$(ECHO) "Create $@"