1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles: introduce OPENOCD_POST_INIT_CMDS

This commit is contained in:
crasbe 2024-11-08 16:03:17 +01:00
parent 76b9b711a8
commit 5d7194a4ee
2 changed files with 12 additions and 0 deletions

View File

@ -346,6 +346,7 @@ do_flash() {
-c 'telnet_port 0' \
-c 'gdb_port 0' \
-c 'init' \
${OPENOCD_POST_INIT_CMDS} \
-c 'targets' \
${OPENOCD_CMD_RESET_HALT} \
${OPENOCD_PRE_FLASH_CMDS} \

View File

@ -34,6 +34,12 @@ $(call target-export-variables,$(OPENOCD_TARGETS),OPENOCD_CORE)
# Export OPENOCD_ADAPTER_INIT to required targets
$(call target-export-variables,$(OPENOCD_TARGETS),OPENOCD_ADAPTER_INIT)
# Export OPENOCD_EXTRA_INIT to required targets
$(call target-export-variables,$(OPENOCD_TARGETS),OPENOCD_EXTRA_INIT)
# Export OPENOCD_EXTRA_RESET_INIT to required targets
$(call target-export-variables,$(OPENOCD_TARGETS),OPENOCD_EXTRA_RESET_INIT)
# Export OPENOCD_RESET_USE_CONNECT_ASSERT_SRST to required targets
$(call target-export-variables,$(OPENOCD_TARGETS),OPENOCD_RESET_USE_CONNECT_ASSERT_SRST)
@ -67,6 +73,11 @@ ifneq (,$(IMAGE_OFFSET))
$(call target-export-variables,$(OPENOCD_FLASH_TARGETS),IMAGE_OFFSET)
endif
ifneq (,$(OPENOCD_POST_INIT_CMDS))
# Export OPENOCD_POST_INIT_CMDS only to the flash/flash-only target
$(call target-export-variables,$(OPENOCD_FLASH_TARGETS),OPENOCD_POST_INIT_CMDS)
endif
ifneq (,$(OPENOCD_PRE_VERIFY_CMDS))
# Export OPENOCD_PRE_VERIFY_CMDS only to the flash/flash-only target
$(call target-export-variables,$(OPENOCD_FLASH_TARGETS),OPENOCD_PRE_VERIFY_CMDS)