Skip to content

Commit

Permalink
Copy avr teensy flash logic to arm (qmk#6016)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored and drashna committed May 30, 2019
1 parent 1893532 commit e44488e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tmk_core/chibios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,19 @@ dfu-util-wait: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter
st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter
$(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst


# Autodetect teensy loader
ifndef TEENSY_LOADER_CLI
ifneq (, $(shell which teensy-loader-cli 2>/dev/null))
TEENSY_LOADER_CLI ?= teensy-loader-cli
else
TEENSY_LOADER_CLI ?= teensy_loader_cli
endif
endif

teensy: $(BUILD_DIR)/$(TARGET).hex cpfirmware sizeafter
$(TEENSY_LOADER_CLI) -mmcu=$(MCU_LDSCRIPT) -w -v $(BUILD_DIR)/$(TARGET).hex

bin: $(BUILD_DIR)/$(TARGET).bin sizeafter
if [ ! -z "$(DFU_SUFFIX_ARGS)" ]; then \
$(DFU_SUFFIX) $(DFU_SUFFIX_ARGS) -a $(BUILD_DIR)/$(TARGET).bin 1>/dev/null ;\
Expand Down

0 comments on commit e44488e

Please sign in to comment.