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
|
|
|
|
2023-05-03 10:26:44 +02:00
|
|
|
FLASHFILE ?= $(ELFFILE)
|
2015-08-05 19:49:10 +02:00
|
|
|
|
2019-05-17 13:52:34 +02:00
|
|
|
FFLAGS ?= flash $(FLASHFILE)
|
2022-05-31 12:39:16 +02:00
|
|
|
DEBUGGER_FLAGS ?= debug $(DEBUG_ELFFILE)
|
2019-05-17 13:52:34 +02:00
|
|
|
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 ?=
|
2024-07-06 19:24:55 +02:00
|
|
|
JLINK_POST_FLASH ?=
|
|
|
|
|
|
|
|
JLINK_FLASH_TARGETS = flash flash%
|
|
|
|
JLINK_TARGETS = debug% $(JLINK_FLASH_TARGETS) reset term-rtt
|
2020-03-03 16:07:57 +01:00
|
|
|
|
2019-11-17 22:18:57 +01:00
|
|
|
# Export JLINK_SERIAL to required targets
|
|
|
|
$(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
|
|
|
|
2024-07-06 19:24:55 +02:00
|
|
|
ifneq (,$(JLINK))
|
|
|
|
# Export JLINK to required targets if not empty
|
|
|
|
$(call target-export-variables,$(JLINK_TARGETS),JLINK)
|
|
|
|
endif
|
|
|
|
|
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))
|
2024-07-06 19:24:55 +02:00
|
|
|
$(call target-export-variables,JLINK_FLASH_TARGETS,JLINK_PRE_FLASH)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Export JLINK_POST_FLASH to flash targets only if not empty
|
|
|
|
ifneq (,$(JLINK_POST_FLASH))
|
|
|
|
$(call target-export-variables,JLINK_FLASH_TARGETS,JLINK_POST_FLASH)
|
2020-03-03 16:42:37 +01:00
|
|
|
endif
|