2021-02-09 18:48:00 +01:00
|
|
|
FLASHER ?= $(RIOTTOOLS)/jlink/jlink.sh
|
2020-11-21 22:31:03 +01:00
|
|
|
DEBUGGER ?= $(RIOTTOOLS)/jlink/jlink.sh
|
|
|
|
DEBUGSERVER ?= $(RIOTTOOLS)/jlink/jlink.sh
|
2019-06-06 16:25:20 +02:00
|
|
|
RESET ?= $(RIOTTOOLS)/jlink/jlink.sh
|
2015-08-05 19:49:10 +02:00
|
|
|
|
2018-12-19 19:33:31 +01:00
|
|
|
FLASHFILE ?= $(BINFILE)
|
2015-08-05 19:49:10 +02:00
|
|
|
|
2019-05-17 13:52:34 +02:00
|
|
|
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-11-17 22:18:57 +01:00
|
|
|
|
|
|
|
JLINK_SERIAL ?= $(DEBUG_ADAPTER_ID)
|
|
|
|
|
2020-03-03 16:07:57 +01:00
|
|
|
JLINK_IF ?=
|
2020-03-03 16:19:15 +01:00
|
|
|
JLINK_RESET_FILE ?=
|
2020-03-03 16:42:37 +01:00
|
|
|
JLINK_PRE_FLASH ?=
|
2020-03-03 16:07:57 +01:00
|
|
|
|
2019-11-17 22:18:57 +01:00
|
|
|
# Export JLINK_SERIAL to required targets
|
|
|
|
JLINK_TARGETS = debug% flash% reset term-rtt
|
|
|
|
$(call target-export-variables,$(JLINK_TARGETS),JLINK_SERIAL)
|
2020-03-03 11:56:09 +01:00
|
|
|
|
|
|
|
# Export JLINK_DEVICE to required targets
|
|
|
|
$(call target-export-variables,$(JLINK_TARGETS),JLINK_DEVICE)
|
2020-03-03 16:07:57 +01:00
|
|
|
|
|
|
|
ifneq (,$(JLINK_IF))
|
|
|
|
# Export JLINK_IF to required targets if not empty
|
|
|
|
$(call target-export-variables,$(JLINK_TARGETS),JLINK_IF)
|
|
|
|
endif
|
2020-03-03 16:19:15 +01:00
|
|
|
|
|
|
|
ifneq (,$(JLINK_RESET_FILE))
|
|
|
|
# Export JLINK_RESET_FILE to required targets if not empty
|
|
|
|
$(call target-export-variables,$(JLINK_TARGETS),JLINK_RESET_FILE)
|
|
|
|
endif
|
2020-03-03 16:42:37 +01:00
|
|
|
|
|
|
|
# Export JLINK_PRE_FLASH to flash targets only if not empty
|
|
|
|
ifneq (,$(JLINK_PRE_FLASH))
|
|
|
|
$(call target-export-variables,flash%,JLINK_PRE_FLASH)
|
|
|
|
endif
|