1
0
Fork 0

add st-link_cli flashing (#3899)

* add st-link_cli support

* format names
This commit is contained in:
Takuya Urakawa 2018-09-29 10:30:44 +09:00 committed by Jack Humbert
parent e4eeb1eb23
commit e2dee054d0

View file

@ -198,10 +198,13 @@ ifneq ("$(SERIAL)","")
DFU_ARGS += -S $(SERIAL) DFU_ARGS += -S $(SERIAL)
endif endif
ST_LINK_ARGS ?=
# List any extra directories to look for libraries here. # List any extra directories to look for libraries here.
EXTRALIBDIRS = $(RULESPATH)/ld EXTRALIBDIRS = $(RULESPATH)/ld
DFU_UTIL ?= dfu-util DFU_UTIL ?= dfu-util
ST_LINK_CLI ?= st-link_cli
# Generate a .qmk for the QMK-FF # Generate a .qmk for the QMK-FF
qmk: $(BUILD_DIR)/$(TARGET).bin qmk: $(BUILD_DIR)/$(TARGET).bin
@ -230,5 +233,8 @@ qmk: $(BUILD_DIR)/$(TARGET).bin
dfu-util: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter dfu-util: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter
$(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin
st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter
$(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst
bin: $(BUILD_DIR)/$(TARGET).bin sizeafter bin: $(BUILD_DIR)/$(TARGET).bin sizeafter
$(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin;