From 2f7a57a6de1af48262702eabad39c2563c02f253 Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 31 May 2019 00:53:49 +0100 Subject: Copy avr teensy flash logic to arm (#6016) --- tmk_core/chibios.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tmk_core/chibios.mk') diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 44c00bdd15..11715cf346 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -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 ;\ -- cgit v1.2.3 From 75795186135e6d83de1ff3bb108f9c5471742ba4 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Sun, 7 Jul 2019 09:08:49 -0700 Subject: Fix chibios so the dfu-suffix is only applied once. (#6270) --- tmk_core/chibios.mk | 6 ------ 1 file changed, 6 deletions(-) (limited to 'tmk_core/chibios.mk') diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 11715cf346..4aebb47762 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -201,7 +201,6 @@ DFU_ARGS ?= ifneq ("$(SERIAL)","") DFU_ARGS += -S $(SERIAL) endif -DFU_SUFFIX_ARGS ?= ST_LINK_ARGS ?= @@ -209,7 +208,6 @@ ST_LINK_ARGS ?= EXTRALIBDIRS = $(RULESPATH)/ld DFU_UTIL ?= dfu-util -DFU_SUFFIX ?= dfu-suffix ST_LINK_CLI ?= st-link_cli # Generate a .qmk for the QMK-FF @@ -274,7 +272,3 @@ 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 ;\ - fi - $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; -- cgit v1.2.3