diff options
Diffstat (limited to 'stmhal/Makefile')
| -rw-r--r-- | stmhal/Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile index 7e001bc30..93ff92bc8 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -29,6 +29,7 @@ USE_PYDFU ?= 1 PYDFU ?= ../tools/pydfu.py DFU_UTIL ?= dfu-util DEVICE=0483:df11 +STFLASH ?= st-flash CROSS_COMPILE = arm-none-eabi- @@ -286,6 +287,12 @@ else $(Q)$(DFU_UTIL) -a 0 -d $(DEVICE) -D $< endif +deploy-stlink: $(BUILD)/firmware.dfu + $(ECHO) "Writing $(BUILD)/firmware0.bin to the board via ST-LINK" + $(Q)$(STFLASH) write $(BUILD)/firmware0.bin 0x08000000 + $(ECHO) "Writing $(BUILD)/firmware1.bin to the board via ST-LINK" + $(Q)$(STFLASH) --reset write $(BUILD)/firmware1.bin 0x08020000 + $(BUILD)/firmware.dfu: $(BUILD)/firmware.elf $(ECHO) "Create $@" $(Q)$(OBJCOPY) -O binary -j .isr_vector $^ $(BUILD)/firmware0.bin |
