2019-05-17 13:52:34 +02:00
|
|
|
FLASHER ?= $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
|
2019-05-17 13:52:34 +02:00
|
|
|
DEBUGGER = $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
|
|
|
|
DEBUGSERVER = $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
|
2019-05-17 13:52:34 +02:00
|
|
|
RESET ?= $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
|
2018-03-04 15:50:08 +01:00
|
|
|
|
2020-03-08 15:03:18 +01:00
|
|
|
FLASH_TARGET_TYPE ?=
|
2019-03-14 17:48:30 +01:00
|
|
|
FLASHFILE ?= $(HEXFILE)
|
|
|
|
FFLAGS ?= flash $(FLASHFILE)
|
2019-05-17 13:52:34 +02:00
|
|
|
DEBUGGER_FLAGS ?= debug $(ELFFILE)
|
|
|
|
DEBUGSERVER_FLAGS ?= debug-server
|
2019-05-17 13:52:34 +02:00
|
|
|
RESET_FLAGS ?= reset
|
2019-09-10 16:27:43 +02:00
|
|
|
|
2020-03-08 15:03:18 +01:00
|
|
|
PYOCD_TARGETS = debug% flash% reset
|
|
|
|
|
|
|
|
# Export FLASH_TARGET_TYPE to required targets only if not empty
|
|
|
|
ifneq (,$(FLASH_TARGET_TYPE))
|
|
|
|
$(call target-export-variables,$(PYOCD_TARGETS),FLASH_TARGET_TYPE)
|
|
|
|
endif
|
|
|
|
|
2019-09-10 16:27:43 +02:00
|
|
|
# Add serial matching command, only if DEBUG_ADAPTER_ID was specified
|
|
|
|
ifneq (,$(DEBUG_ADAPTER_ID))
|
2020-03-08 15:10:11 +01:00
|
|
|
PYOCD_ADAPTER_INIT += -u $(DEBUG_ADAPTER_ID)
|
|
|
|
$(call target-export-variables,$(PYOCD_TARGETS),PYOCD_ADAPTER_INIT)
|
2019-09-10 16:27:43 +02:00
|
|
|
endif
|