Explorar o código

Allow to specify serial to dfu-util flash

Trevor Joynson (trevorj) %!s(int64=8) %!d(string=hai) anos
pai
achega
515b4dd1f7
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      tmk_core/chibios.mk

+ 6 - 1
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
+	dfu-util $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin