diff options
| author | Christopher Arndt | 2016-03-08 11:29:22 +0100 |
|---|---|---|
| committer | Damien George | 2016-03-09 23:00:17 +0000 |
| commit | 9b5e05a7c793ae0f3817af3ecba63f7b02713dea (patch) | |
| tree | 5fff38df95c7d4a4808bcc385d620840d72d7bee /stmhal/Makefile | |
| parent | ad725a6661b2672cff5cdb7332dd01128505d3d9 (diff) | |
stmhal: Add makefile target and configuration to deploy via OpenOCD.
Diffstat (limited to 'stmhal/Makefile')
| -rw-r--r-- | stmhal/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile index 93ff92bc8..847cb4e8b 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -30,6 +30,8 @@ PYDFU ?= ../tools/pydfu.py DFU_UTIL ?= dfu-util DEVICE=0483:df11 STFLASH ?= st-flash +OPENOCD ?= openocd +OPENOCD_CONFIG ?= boards/openocd_stm32f4.cfg CROSS_COMPILE = arm-none-eabi- @@ -293,6 +295,10 @@ deploy-stlink: $(BUILD)/firmware.dfu $(ECHO) "Writing $(BUILD)/firmware1.bin to the board via ST-LINK" $(Q)$(STFLASH) --reset write $(BUILD)/firmware1.bin 0x08020000 +deploy-openocd: $(BUILD)/firmware.dfu + $(ECHO) "Writing $(BUILD)/firmware{0,1}.bin to the board via ST-LINK using OpenOCD" + $(Q)$(OPENOCD) -f $(OPENOCD_CONFIG) -c "stm_flash $(BUILD)/firmware0.bin $(BUILD)/firmware1.bin" + $(BUILD)/firmware.dfu: $(BUILD)/firmware.elf $(ECHO) "Create $@" $(Q)$(OBJCOPY) -O binary -j .isr_vector $^ $(BUILD)/firmware0.bin |
