From 9363f077d6adab43bcb929a1362d9a9befe15e44 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 22 Feb 2020 11:33:19 +0100 Subject: [PATCH] boards: don't export globally OPENOCD_CONFIG The variable is already exported to required target in openocd.inc.mk --- boards/blackpill-128kib/Makefile.include | 2 +- boards/blackpill/Makefile.include | 2 +- boards/bluepill-128kib/Makefile.include | 2 +- boards/bluepill/Makefile.include | 2 +- boards/common/frdm/Makefile.include | 2 +- boards/common/iotlab/Makefile.include | 2 +- boards/common/nrf51/Makefile.include | 2 +- boards/common/nrf52/Makefile.include | 2 +- makefiles/tools/openocd-adapters/stlink.inc.mk | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/boards/blackpill-128kib/Makefile.include b/boards/blackpill-128kib/Makefile.include index 55be113c8b..58815734f3 100644 --- a/boards/blackpill-128kib/Makefile.include +++ b/boards/blackpill-128kib/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 diff --git a/boards/blackpill/Makefile.include b/boards/blackpill/Makefile.include index e502f5c2a1..83cf6c73e1 100644 --- a/boards/blackpill/Makefile.include +++ b/boards/blackpill/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 diff --git a/boards/bluepill-128kib/Makefile.include b/boards/bluepill-128kib/Makefile.include index 55be113c8b..58815734f3 100644 --- a/boards/bluepill-128kib/Makefile.include +++ b/boards/bluepill-128kib/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 diff --git a/boards/bluepill/Makefile.include b/boards/bluepill/Makefile.include index e502f5c2a1..83cf6c73e1 100644 --- a/boards/bluepill/Makefile.include +++ b/boards/bluepill/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 diff --git a/boards/common/frdm/Makefile.include b/boards/common/frdm/Makefile.include index 7769a8e6ed..d220f82f98 100644 --- a/boards/common/frdm/Makefile.include +++ b/boards/common/frdm/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 diff --git a/boards/common/iotlab/Makefile.include b/boards/common/iotlab/Makefile.include index fba8ff326e..137b5946c0 100644 --- a/boards/common/iotlab/Makefile.include +++ b/boards/common/iotlab/Makefile.include @@ -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 diff --git a/boards/common/nrf51/Makefile.include b/boards/common/nrf51/Makefile.include index 397db2b567..6fd03b1055 100644 --- a/boards/common/nrf51/Makefile.include +++ b/boards/common/nrf51/Makefile.include @@ -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 diff --git a/boards/common/nrf52/Makefile.include b/boards/common/nrf52/Makefile.include index e0dc6c6067..351c70ae6f 100644 --- a/boards/common/nrf52/Makefile.include +++ b/boards/common/nrf52/Makefile.include @@ -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 diff --git a/makefiles/tools/openocd-adapters/stlink.inc.mk b/makefiles/tools/openocd-adapters/stlink.inc.mk index c86a691248..4dc8a870b9 100644 --- a/makefiles/tools/openocd-adapters/stlink.inc.mk +++ b/makefiles/tools/openocd-adapters/stlink.inc.mk @@ -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