makefiles/openocd: define flash targets in a variable
This commit is contained in:
parent
405c0cfef5
commit
75e828fdeb
@ -30,17 +30,19 @@ ifneq (,$(OPENOCD_CMD_RESET_RUN))
|
||||
$(call target-export-variables,reset,OPENOCD_CMD_RESET_RUN)
|
||||
endif
|
||||
|
||||
OPENOCD_FLASH_TARGETS = flash flash-only
|
||||
|
||||
ifneq (,$(OPENOCD_PRE_VERIFY_CMDS))
|
||||
# Export OPENOCD_PRE_VERIFY_CMDS only to the flash/flash-only target
|
||||
$(call target-export-variables,flash%,OPENOCD_PRE_VERIFY_CMDS)
|
||||
$(call target-export-variables,$(OPENOCD_FLASH_TARGETS),OPENOCD_PRE_VERIFY_CMDS)
|
||||
endif
|
||||
|
||||
ifneq (,$(OPENOCD_PRE_FLASH_CMDS))
|
||||
# Export OPENOCD_PRE_FLASH_CMDS only to the flash/flash-only targets
|
||||
$(call target-export-variables,flash%,OPENOCD_PRE_FLASH_CMDS)
|
||||
$(call target-export-variables,$(OPENOCD_FLASH_TARGETS),OPENOCD_PRE_FLASH_CMDS)
|
||||
endif
|
||||
|
||||
ifneq (,$(PRE_FLASH_CHECK_SCRIPT))
|
||||
# Export PRE_FLASH_CHECK_SCRIPT only to the flash/flash-only targets
|
||||
$(call target-export-variables,flash%,PRE_FLASH_CHECK_SCRIPT)
|
||||
$(call target-export-variables,$(OPENOCD_FLASH_TARGETS),PRE_FLASH_CHECK_SCRIPT)
|
||||
endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user