diff options
| author | Christopher Arndt | 2016-03-08 08:42:30 +0100 |
|---|---|---|
| committer | Damien George | 2016-03-09 13:26:23 +0000 |
| commit | 07554486eeb73665b1bf61ee9af32e4a6e7e458a (patch) | |
| tree | dec1d52f1570fc6aed6abc6581c3de2348a37693 /stmhal/Makefile | |
| parent | 6b80ebe32ef57cc3bef1b6309433354181867611 (diff) | |
stmhal: Add makefile target to deploy stmhal build via ST-LINK.
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 |
