Explorar el Código

Add PYOCD_OPTION

Added PYOCD_OPTION to pass board-specific options to build
mainr hace 4 años
padre
commit
b169db3fd6
Se han modificado 2 ficheros con 2 adiciones y 1 borrados
  1. 1 1
      examples/rules.mk
  2. 1 0
      hw/bsp/samd21/boards/curiosity_nano/board.mk

+ 1 - 1
examples/rules.mk

@@ -170,7 +170,7 @@ flash-stlink: $(BUILD)/$(PROJECT).elf
 
 
 # flash with pyocd
 # flash with pyocd
 flash-pyocd: $(BUILD)/$(PROJECT).hex
 flash-pyocd: $(BUILD)/$(PROJECT).hex
-	pyocd flash -t $(PYOCD_TARGET) -O dap_protocol=swd $<
+	pyocd flash -t $(PYOCD_TARGET) $(PYOCD_OPTION) $<
 	pyocd reset -t $(PYOCD_TARGET)
 	pyocd reset -t $(PYOCD_TARGET)
 
 
 # flash with Black Magic Probe
 # flash with Black Magic Probe

+ 1 - 0
hw/bsp/samd21/boards/curiosity_nano/board.mk

@@ -10,4 +10,5 @@ JLINK_DEVICE = atsamd21g17a
 #flash: flash-jlink
 #flash: flash-jlink
 
 
 PYOCD_TARGET = atsamd21g17a
 PYOCD_TARGET = atsamd21g17a
+PYOCD_OPTION = -O dap_protocol=swd
 flash: flash-pyocd
 flash: flash-pyocd