mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
Merge pull request #13593 from aabadie/pr/boards/pyocd_export_remove
boards/pyocd: cleanup use of `export` keyword
This commit is contained in:
commit
6ba665858b
@ -10,7 +10,7 @@ ifeq (openocd,$(PROGRAMMER))
|
||||
else ifeq (pyocd,$(PROGRAMMER))
|
||||
# PyOCD doesn't recognize automatically the board ID, so target type has to
|
||||
# be passed explicitly
|
||||
export FLASH_TARGET_TYPE ?= -t nrf51
|
||||
FLASH_TARGET_TYPE ?= -t nrf51
|
||||
include $(RIOTMAKE)/tools/pyocd.inc.mk
|
||||
endif
|
||||
|
||||
|
@ -17,7 +17,7 @@ PROGRAMMER ?= pyocd
|
||||
ifeq (pyocd,$(PROGRAMMER))
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
export FLASH_TARGET_TYPE ?= -t nrf52840
|
||||
FLASH_TARGET_TYPE ?= -t nrf52840
|
||||
include $(RIOTMAKE)/tools/pyocd.inc.mk
|
||||
else ifeq (openocd,$(PROGRAMMER))
|
||||
DEBUG_ADAPTER ?= dap
|
||||
|
@ -6,7 +6,7 @@ PROGRAMMER ?= pyocd
|
||||
ifeq (pyocd,$(PROGRAMMER))
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
export FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||
FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||
include $(RIOTMAKE)/tools/pyocd.inc.mk
|
||||
else ifeq (openocd,$(PROGRAMMER))
|
||||
DEBUG_ADAPTER = dap
|
||||
|
@ -6,7 +6,7 @@ PROGRAMMER ?= pyocd
|
||||
ifeq (pyocd,$(PROGRAMMER))
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
export FLASH_TARGET_TYPE ?= -t nrf52840
|
||||
FLASH_TARGET_TYPE ?= -t nrf52840
|
||||
include $(RIOTMAKE)/tools/pyocd.inc.mk
|
||||
else ifeq (openocd,$(PROGRAMMER))
|
||||
DEBUG_ADAPTER = dap
|
||||
|
@ -4,7 +4,7 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# define pyocd as programmer to program with stlink
|
||||
ifeq (pyocd,$(PROGRAMMER))
|
||||
export FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||
FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||
include $(RIOTMAKE)/tools/pyocd.inc.mk
|
||||
endif
|
||||
|
||||
|
2
dist/tools/buildsystem_sanity_check/check.sh
vendored
2
dist/tools/buildsystem_sanity_check/check.sh
vendored
@ -84,6 +84,8 @@ UNEXPORTED_VARIABLES+=('USEMODULE_INCLUDES')
|
||||
UNEXPORTED_VARIABLES+=('OPENOCD_ADAPTER_INIT')
|
||||
UNEXPORTED_VARIABLES+=('OPENOCD_CONFIG')
|
||||
UNEXPORTED_VARIABLES+=('OPENOCD_RESET_USE_CONNECT_ASSERT_SRST')
|
||||
UNEXPORTED_VARIABLES+=('FLASH_TARGET_TYPE')
|
||||
UNEXPORTED_VARIABLES+=('PYOCD_ADAPTER_INIT')
|
||||
|
||||
EXPORTED_VARIABLES_ONLY_IN_VARS=()
|
||||
EXPORTED_VARIABLES_ONLY_IN_VARS+=('APPDEPS')
|
||||
|
@ -3,13 +3,22 @@ DEBUGGER = $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
|
||||
DEBUGSERVER = $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
|
||||
RESET ?= $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
|
||||
|
||||
FLASH_TARGET_TYPE ?=
|
||||
FLASHFILE ?= $(HEXFILE)
|
||||
FFLAGS ?= flash $(FLASHFILE)
|
||||
DEBUGGER_FLAGS ?= debug $(ELFFILE)
|
||||
DEBUGSERVER_FLAGS ?= debug-server
|
||||
RESET_FLAGS ?= reset
|
||||
|
||||
PYOCD_TARGETS = debug% flash% reset
|
||||
|
||||
# Export FLASH_TARGET_TYPE to required targets only if not empty
|
||||
ifneq (,$(FLASH_TARGET_TYPE))
|
||||
$(call target-export-variables,$(PYOCD_TARGETS),FLASH_TARGET_TYPE)
|
||||
endif
|
||||
|
||||
# Add serial matching command, only if DEBUG_ADAPTER_ID was specified
|
||||
ifneq (,$(DEBUG_ADAPTER_ID))
|
||||
export PYOCD_ADAPTER_INIT += -u $(DEBUG_ADAPTER_ID)
|
||||
PYOCD_ADAPTER_INIT += -u $(DEBUG_ADAPTER_ID)
|
||||
$(call target-export-variables,$(PYOCD_TARGETS),PYOCD_ADAPTER_INIT)
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user