From 515b4dd1f7c941f9e96790f7433015fc9bd385bf Mon Sep 17 00:00:00 2001 From: "Trevor Joynson (trevorj)" Date: Thu, 2 Mar 2017 18:21:45 -0800 Subject: [PATCH] Allow to specify serial to dfu-util flash --- tmk_core/chibios.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 062a712bd1..eb0c40138a 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -143,8 +143,13 @@ MCUFLAGS = -mcpu=$(MCU) DEBUG = gdb +DFU_ARGS = +ifneq ("$(SERIAL)","") + DFU_ARGS += -S $(SERIAL) +endif + # List any extra directories to look for libraries here. EXTRALIBDIRS = $(RULESPATH)/ld dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter - dfu-util -D $(BUILD_DIR)/$(TARGET).bin \ No newline at end of file + dfu-util $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin