mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #13452 from aabadie/pr/tools/openocd_config_export
tools/openocd: only export OPENOCD_CONFIG to required targets
This commit is contained in:
commit
f451eb692c
@ -1,3 +1,3 @@
|
||||
export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/blxxxpill/dist/openocd-128kib.cfg
|
||||
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/blxxxpill/dist/openocd-128kib.cfg
|
||||
|
||||
include $(RIOTBOARD)/common/blxxxpill/Makefile.include
|
||||
|
@ -1,3 +1,3 @@
|
||||
export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/blxxxpill/dist/openocd.cfg
|
||||
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/blxxxpill/dist/openocd.cfg
|
||||
|
||||
include $(RIOTBOARD)/common/blxxxpill/Makefile.include
|
||||
|
@ -1,3 +1,3 @@
|
||||
export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/blxxxpill/dist/openocd-128kib.cfg
|
||||
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/blxxxpill/dist/openocd-128kib.cfg
|
||||
|
||||
include $(RIOTBOARD)/common/blxxxpill/Makefile.include
|
||||
|
@ -1,3 +1,3 @@
|
||||
export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/blxxxpill/dist/openocd.cfg
|
||||
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/blxxxpill/dist/openocd.cfg
|
||||
|
||||
include $(RIOTBOARD)/common/blxxxpill/Makefile.include
|
||||
|
@ -11,7 +11,7 @@ DEBUG_ADAPTER ?= dap
|
||||
# For KW41Z, an OpenOCD version built from source is required. The support for
|
||||
# kw41z was introduced in
|
||||
# https://github.com/ntfreak/openocd/2c8602ed9f084d6680cec7d0ca1d5dc71c865a5f
|
||||
export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/frdm/dist/openocd-$(CPU_FAMILY).cfg
|
||||
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/frdm/dist/openocd-$(CPU_FAMILY).cfg
|
||||
|
||||
# Check the flash configuration field before flashing
|
||||
export PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh
|
||||
|
@ -11,7 +11,7 @@ export OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||
|
||||
DEBUG_ADAPTER ?= iotlab
|
||||
|
||||
export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/iotlab/dist/openocd.cfg
|
||||
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/iotlab/dist/openocd.cfg
|
||||
|
||||
# this board uses openocd
|
||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||
|
@ -11,7 +11,7 @@ endif
|
||||
|
||||
ifeq ($(PROGRAMMER),openocd)
|
||||
# use common openocd configuration for nrf51
|
||||
export OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf51/dist/openocd.cfg
|
||||
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf51/dist/openocd.cfg
|
||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||
else ifeq ($(PROGRAMMER),jlink)
|
||||
# setup JLink for flashing
|
||||
|
@ -58,6 +58,6 @@ else ifeq (openocd,$(PROGRAMMER))
|
||||
$(BINDIR)/softdevice.hex: | $(ELFFILE)
|
||||
endif
|
||||
DEBUG_ADAPTER ?= jlink
|
||||
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nrf52/dist/openocd.cfg
|
||||
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg
|
||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||
endif
|
||||
|
2
boards/hifive1/dist/flasher.sh
vendored
2
boards/hifive1/dist/flasher.sh
vendored
@ -35,8 +35,6 @@
|
||||
# @author Hauke Peteresen <hauke.petersen@fu-berlin.de>
|
||||
# @author Joakim Nohlgård <joakim.nohlgard@eistec.se>
|
||||
|
||||
# Default path to OpenOCD configuration file
|
||||
: ${OPENOCD_CONFIG:=${RIOTBOARD}/${BOARD}/dist/openocd.cfg}
|
||||
# Default OpenOCD command
|
||||
: ${OPENOCD:=openocd}
|
||||
# This is an optional offset to the base address that can be used to flash an
|
||||
|
1
dist/tools/buildsystem_sanity_check/check.sh
vendored
1
dist/tools/buildsystem_sanity_check/check.sh
vendored
@ -81,6 +81,7 @@ UNEXPORTED_VARIABLES+=('PORT_LINUX' 'PORT_DARWIN')
|
||||
UNEXPORTED_VARIABLES+=('PORT[ ?=:]' 'PORT$')
|
||||
UNEXPORTED_VARIABLES+=('LINKFLAGS' 'LINKER_SCRIPT')
|
||||
UNEXPORTED_VARIABLES+=('USEMODULE_INCLUDES')
|
||||
UNEXPORTED_VARIABLES+=('OPENOCD_CONFIG')
|
||||
|
||||
EXPORTED_VARIABLES_ONLY_IN_VARS=()
|
||||
EXPORTED_VARIABLES_ONLY_IN_VARS+=('CPU_ARCH')
|
||||
|
2
dist/tools/openocd/openocd.sh
vendored
2
dist/tools/openocd/openocd.sh
vendored
@ -71,8 +71,6 @@
|
||||
: ${TELNET_PORT:=4444}
|
||||
# Default TCL port, set to 0 to disable
|
||||
: ${TCL_PORT:=6333}
|
||||
# Default path to OpenOCD configuration file
|
||||
: ${OPENOCD_CONFIG:=${BOARDSDIR}/${BOARD}/dist/openocd.cfg}
|
||||
# Default OpenOCD command
|
||||
: ${OPENOCD:=openocd}
|
||||
# Extra board initialization commands to pass to OpenOCD
|
||||
|
@ -19,6 +19,6 @@ ifeq (,$(OPENOCD_CONFIG))
|
||||
# if no openocd default configuration is provided by the board,
|
||||
# use the STM32 common one
|
||||
ifeq (0,$(words $(wildcard $(BOARDSDIR)/$(BOARD)/dist/openocd.cfg)))
|
||||
export OPENOCD_CONFIG := $(RIOTBASE)/boards/common/stm32/dist/$(CPU).cfg
|
||||
OPENOCD_CONFIG = $(RIOTBASE)/boards/common/stm32/dist/$(CPU).cfg
|
||||
endif
|
||||
endif
|
||||
|
@ -12,3 +12,9 @@ RESET_FLAGS ?= reset
|
||||
ifneq (,$(DEBUG_ADAPTER))
|
||||
include $(RIOTMAKE)/tools/openocd-adapters/$(DEBUG_ADAPTER).inc.mk
|
||||
endif
|
||||
|
||||
OPENOCD_CONFIG ?= $(BOARDSDIR)/$(BOARD)/dist/openocd.cfg
|
||||
|
||||
# Export OPENOCD_CONFIG to required targets
|
||||
OPENOCD_TARGETS = debug% flash% reset
|
||||
$(call target-export-variables,$(OPENOCD_TARGETS),OPENOCD_CONFIG)
|
||||
|
Loading…
Reference in New Issue
Block a user