Skip to content

Commit

Permalink
makefiles/jlink: export JLINK_PRE_FLASH to flash targets
Browse files Browse the repository at this point in the history
  • Loading branch information
aabadie committed Mar 6, 2020
1 parent 2f84365 commit d05743d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions makefiles/tools/jlink.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ JLINK_SERIAL ?= $(DEBUG_ADAPTER_ID)

JLINK_IF ?= SWD
JLINK_RESET_FILE ?= ${RIOTTOOLS}/jlink/reset.seg
JLINK_PRE_FLASH ?=

# Export JLINK_SERIAL to required targets
JLINK_TARGETS = debug% flash% reset term-rtt
Expand All @@ -27,3 +28,8 @@ $(call target-export-variables,$(JLINK_TARGETS),JLINK_IF)

# Export JLINK_RESET_FILE to required targets
$(call target-export-variables,$(JLINK_TARGETS),JLINK_RESET_FILE)

# Export JLINK_PRE_FLASH to flash targets only if not empty
ifneq (,$(JLINK_PRE_FLASH))
$(call target-export-variables,flash%,JLINK_PRE_FLASH)
endif

0 comments on commit d05743d

Please sign in to comment.