diff --git a/boards/b-l072z-lrwan1/Makefile.include b/boards/b-l072z-lrwan1/Makefile.include index 2993d2f1de..8c5857aafc 100644 --- a/boards/b-l072z-lrwan1/Makefile.include +++ b/boards/b-l072z-lrwan1/Makefile.include @@ -13,7 +13,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) include $(RIOTMAKE)/tools/serial.inc.mk # this board has an on-board ST-link adapter -export DEBUG_ADAPTER ?= stlink +DEBUG_ADAPTER ?= stlink # call a 'reset halt' command before starting the debugger export OPENOCD_DBG_START_CMD = -c 'reset halt' diff --git a/boards/b-l475e-iot01a/Makefile.include b/boards/b-l475e-iot01a/Makefile.include index 9949d41e7f..7ab1ad1004 100644 --- a/boards/b-l475e-iot01a/Makefile.include +++ b/boards/b-l475e-iot01a/Makefile.include @@ -13,7 +13,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) include $(RIOTMAKE)/tools/serial.inc.mk # this board has an on-board ST-link adapter -export DEBUG_ADAPTER ?= stlink +DEBUG_ADAPTER ?= stlink # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/cc2538dk/Makefile.include b/boards/cc2538dk/Makefile.include index 91b36cbcc5..363c58024c 100644 --- a/boards/cc2538dk/Makefile.include +++ b/boards/cc2538dk/Makefile.include @@ -3,7 +3,7 @@ export CPU = cc2538 export CPU_MODEL ?= cc2538nf53 # the SmartRF06 Evaluation Board serial numbers all begin with "06EB": -export PROGRAMMER_SERIAL ?= 06EB +PROGRAMMER_SERIAL ?= 06EB # setup serial terminal # the debug UART is always the second tty with the matching serial number: diff --git a/boards/common/frdm/Makefile.include b/boards/common/frdm/Makefile.include index 81a98274f1..1c496ef7bd 100644 --- a/boards/common/frdm/Makefile.include +++ b/boards/common/frdm/Makefile.include @@ -4,8 +4,8 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # Use the shared OpenOCD configuration # Using dap or jlink depends on which firmware the OpenSDA debugger is running -export DEBUG_ADAPTER ?= dap -#export DEBUG_ADAPTER ?= jlink +DEBUG_ADAPTER ?= dap +#DEBUG_ADAPTER ?= jlink # OpenOCD v0.10.0 and newer have built-in support for disabling the Kinetis # watchdog automatically. Some older releases of Ubuntu and Debian have only diff --git a/boards/common/kw41z/Makefile.include b/boards/common/kw41z/Makefile.include index 3957633b96..cc41cc464d 100644 --- a/boards/common/kw41z/Makefile.include +++ b/boards/common/kw41z/Makefile.include @@ -7,7 +7,7 @@ INCLUDES += -I$(RIOTBOARD)/common/kw41z/include USEMODULE += boards_common_kw41z # This board comes with OpenSDA configured for JLink compatibility -export DEBUG_ADAPTER ?= jlink +DEBUG_ADAPTER ?= jlink # Include default FRDM board config include $(RIOTBOARD)/common/frdm/Makefile.include diff --git a/boards/common/nrf52/Makefile.include b/boards/common/nrf52/Makefile.include index 2df50ef0a3..fab00bf457 100644 --- a/boards/common/nrf52/Makefile.include +++ b/boards/common/nrf52/Makefile.include @@ -38,7 +38,7 @@ else ifeq (openocd,$(PROGRAMMER)) # openocd doesn't work (yet) with softdevice $(error Cannot use OpenOCD with nordic_softdevice module) endif - export DEBUG_ADAPTER ?= jlink + DEBUG_ADAPTER ?= jlink export OPENOCD_CONFIG := $(RIOTBOARD)/common/nrf52/dist/openocd.cfg include $(RIOTMAKE)/tools/openocd.inc.mk endif diff --git a/boards/common/nucleo/Makefile.include b/boards/common/nucleo/Makefile.include index 63464521dc..34cc7539a8 100644 --- a/boards/common/nucleo/Makefile.include +++ b/boards/common/nucleo/Makefile.include @@ -13,7 +13,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) include $(RIOTMAKE)/tools/serial.inc.mk # all Nucleo boards have an on-board ST-link adapter -export DEBUG_ADAPTER ?= stlink +DEBUG_ADAPTER ?= stlink # nucleo boards use openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/common/stm32f103c8/Makefile.include b/boards/common/stm32f103c8/Makefile.include index 120700b236..087851a95c 100644 --- a/boards/common/stm32f103c8/Makefile.include +++ b/boards/common/stm32f103c8/Makefile.include @@ -34,8 +34,8 @@ ifeq ($(PROGRAMMER),dfu-util) else # this board uses openocd by default - export DEBUG_ADAPTER ?= stlink - export STLINK_VERSION ?= 2 + DEBUG_ADAPTER ?= stlink + STLINK_VERSION ?= 2 # call a 'reset halt' command before starting the debugger # it is required as `connect_assert_srst` is set diff --git a/boards/i-nucleo-lrwan1/Makefile.include b/boards/i-nucleo-lrwan1/Makefile.include index d43c9c4fa5..6039875503 100644 --- a/boards/i-nucleo-lrwan1/Makefile.include +++ b/boards/i-nucleo-lrwan1/Makefile.include @@ -13,7 +13,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) include $(RIOTMAKE)/tools/serial.inc.mk # to flash this board, use an ST-link adapter -export DEBUG_ADAPTER ?= stlink +DEBUG_ADAPTER ?= stlink # call a 'reset halt' command before starting the debugger export OPENOCD_DBG_START_CMD = -c 'reset halt' diff --git a/boards/limifrog-v1/Makefile.include b/boards/limifrog-v1/Makefile.include index 623dad11cc..c68a2e9fa6 100644 --- a/boards/limifrog-v1/Makefile.include +++ b/boards/limifrog-v1/Makefile.include @@ -9,8 +9,8 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk -export DEBUG_ADAPTER ?= stlink -export STLINK_VERSION ?= 2 +DEBUG_ADAPTER ?= stlink +STLINK_VERSION ?= 2 # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/lsn50/Makefile.include b/boards/lsn50/Makefile.include index 2b0a64dcea..84e196cb5c 100644 --- a/boards/lsn50/Makefile.include +++ b/boards/lsn50/Makefile.include @@ -13,7 +13,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) include $(RIOTMAKE)/tools/serial.inc.mk # By default, flash this board using an ST-link adapter -export DEBUG_ADAPTER ?= stlink +DEBUG_ADAPTER ?= stlink # call a 'reset halt' command before starting the debugger export OPENOCD_DBG_START_CMD = -c 'reset halt' diff --git a/boards/maple-mini/Makefile.include b/boards/maple-mini/Makefile.include index 0214ae6568..9994096cf0 100644 --- a/boards/maple-mini/Makefile.include +++ b/boards/maple-mini/Makefile.include @@ -9,7 +9,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk -export DEBUG_ADAPTER ?= stlink +DEBUG_ADAPTER ?= stlink # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/msbiot/Makefile.include b/boards/msbiot/Makefile.include index 04b0abcec5..f84deed7c6 100644 --- a/boards/msbiot/Makefile.include +++ b/boards/msbiot/Makefile.include @@ -12,8 +12,8 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk -export DEBUG_ADAPTER ?= stlink -export STLINK_VERSION ?= 2 +DEBUG_ADAPTER ?= stlink +STLINK_VERSION ?= 2 # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/mulle/Makefile.include b/boards/mulle/Makefile.include index d580e79236..6f0a3c2ee9 100644 --- a/boards/mulle/Makefile.include +++ b/boards/mulle/Makefile.include @@ -20,12 +20,12 @@ endif export CPU_MODEL # Default debug adapter choice is to use the Mulle programmer board -export DEBUG_ADAPTER ?= mulle +DEBUG_ADAPTER ?= mulle # Host OS name OS := $(shell uname) # Fall back to PROGRAMMER_SERIAL for backwards compatibility -export DEBUG_ADAPTER_ID ?= $(PROGRAMMER_SERIAL) +DEBUG_ADAPTER_ID ?= $(PROGRAMMER_SERIAL) ifeq ($(PORT),) # try to find tty name by serial number, only works on Linux currently. diff --git a/boards/pba-d-01-kw2x/Makefile.include b/boards/pba-d-01-kw2x/Makefile.include index d3bc0c6695..0630575241 100644 --- a/boards/pba-d-01-kw2x/Makefile.include +++ b/boards/pba-d-01-kw2x/Makefile.include @@ -20,7 +20,7 @@ export OPENOCD_PRE_VERIFY_CMDS += \ export OPENOCD_EXTRA_INIT export PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh -export DEBUG_ADAPTER ?= dap +DEBUG_ADAPTER ?= dap # Add board selector (USB serial) to OpenOCD options if specified. # Use /dist/tools/usb-serial/list-ttys.sh to find out serial number. diff --git a/boards/stm32f0discovery/Makefile.include b/boards/stm32f0discovery/Makefile.include index d959daf281..d8b7fe9467 100644 --- a/boards/stm32f0discovery/Makefile.include +++ b/boards/stm32f0discovery/Makefile.include @@ -9,8 +9,8 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk -export DEBUG_ADAPTER ?= stlink -export STLINK_VERSION ?= 2 +DEBUG_ADAPTER ?= stlink +STLINK_VERSION ?= 2 # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/stm32f3discovery/Makefile.include b/boards/stm32f3discovery/Makefile.include index 03adf30a93..36a73aa4f9 100644 --- a/boards/stm32f3discovery/Makefile.include +++ b/boards/stm32f3discovery/Makefile.include @@ -9,8 +9,8 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk -export DEBUG_ADAPTER ?= stlink -export STLINK_VERSION ?= 2 +DEBUG_ADAPTER ?= stlink +STLINK_VERSION ?= 2 # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/stm32f429i-disc1/Makefile.include b/boards/stm32f429i-disc1/Makefile.include index 7115a58821..8fdb8b1b32 100644 --- a/boards/stm32f429i-disc1/Makefile.include +++ b/boards/stm32f429i-disc1/Makefile.include @@ -13,7 +13,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) include $(RIOTMAKE)/tools/serial.inc.mk # this board has an on-board ST-link adapter -export DEBUG_ADAPTER ?= stlink +DEBUG_ADAPTER ?= stlink # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/stm32f4discovery/Makefile.include b/boards/stm32f4discovery/Makefile.include index c2f07fe6d3..cafdf1d55f 100644 --- a/boards/stm32f4discovery/Makefile.include +++ b/boards/stm32f4discovery/Makefile.include @@ -12,8 +12,8 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk -export DEBUG_ADAPTER ?= stlink -export STLINK_VERSION ?= 2 +DEBUG_ADAPTER ?= stlink +STLINK_VERSION ?= 2 # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/stm32f769i-disco/Makefile.include b/boards/stm32f769i-disco/Makefile.include index a33251d632..174a171eff 100644 --- a/boards/stm32f769i-disco/Makefile.include +++ b/boards/stm32f769i-disco/Makefile.include @@ -13,7 +13,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) include $(RIOTMAKE)/tools/serial.inc.mk # this board has an on-board ST-link adapter -export DEBUG_ADAPTER ?= stlink +DEBUG_ADAPTER ?= stlink # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/stm32l476g-disco/Makefile.include b/boards/stm32l476g-disco/Makefile.include index 5f98bef0cd..773cbd8d08 100644 --- a/boards/stm32l476g-disco/Makefile.include +++ b/boards/stm32l476g-disco/Makefile.include @@ -12,7 +12,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk -export DEBUG_ADAPTER ?= stlink +DEBUG_ADAPTER ?= stlink # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/ublox-c030-u201/Makefile.include b/boards/ublox-c030-u201/Makefile.include index 97675e9e82..964e8d0212 100644 --- a/boards/ublox-c030-u201/Makefile.include +++ b/boards/ublox-c030-u201/Makefile.include @@ -9,8 +9,8 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk -export DEBUG_ADAPTER ?= stlink -export STLINK_VERSION ?= 2-1 +DEBUG_ADAPTER ?= stlink +STLINK_VERSION ?= 2-1 # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/yunjia-nrf51822/Makefile.include b/boards/yunjia-nrf51822/Makefile.include index 637067fab0..591fe6bf57 100644 --- a/boards/yunjia-nrf51822/Makefile.include +++ b/boards/yunjia-nrf51822/Makefile.include @@ -9,8 +9,8 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # This board uses an ST-Link v2 debug adapter -export DEBUG_ADAPTER ?= stlink -export STLINK_VERSION ?= 2 +DEBUG_ADAPTER ?= stlink +STLINK_VERSION ?= 2 # use openocd to program this board PROGRAMMER = openocd diff --git a/dist/tools/buildsystem_sanity_check/check.sh b/dist/tools/buildsystem_sanity_check/check.sh index 7704287551..f108fe3214 100755 --- a/dist/tools/buildsystem_sanity_check/check.sh +++ b/dist/tools/buildsystem_sanity_check/check.sh @@ -55,6 +55,9 @@ UNEXPORTED_VARIABLES+=('RESET' 'RESETFLAGS') UNEXPORTED_VARIABLES+=('DEBUGGER' 'DEBUGGER_FLAGS') UNEXPORTED_VARIABLES+=('DEBUGSERVER' 'DEBUGSERVER_FLAGS') UNEXPORTED_VARIABLES+=('PREFLASHER' 'PREFFLAGS' 'FLASHDEPS') +UNEXPORTED_VARIABLES+=('DEBUG_ADAPTER' 'DEBUG_ADAPTER_ID') +UNEXPORTED_VARIABLES+=('PROGRAMMER_SERIAL') +UNEXPORTED_VARIABLES+=('STLINK_VERSION') EXPORTED_VARIABLES_ONLY_IN_VARS=() check_not_exporting_variables() { diff --git a/makefiles/boards/sam0.inc.mk b/makefiles/boards/sam0.inc.mk index 72e76f3a52..5d4186593c 100644 --- a/makefiles/boards/sam0.inc.mk +++ b/makefiles/boards/sam0.inc.mk @@ -2,7 +2,7 @@ PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # Use DEBUG_ADAPTER_ID to specify the programmer serial number to use: -# export DEBUG_ADAPTER_ID="ATML..." +# DEBUG_ADAPTER_ID="ATML..." # The SERIAL setting is only available for backwards compatibility with older # settings. @@ -13,14 +13,14 @@ ifneq (,$(SERIAL)) $(error Did not find a device with serial $(SERIAL)) endif PORT_LINUX := $(SERIAL_TTY) - export DEBUG_ADAPTER_ID ?= $(SERIAL) + DEBUG_ADAPTER_ID ?= $(SERIAL) endif # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk # Default for these boards is to use a CMSIS-DAP programmer -export DEBUG_ADAPTER ?= dap +DEBUG_ADAPTER ?= dap # EDBG can only be used with a compatible Atmel programmer ifeq ($(DEBUG_ADAPTER),dap) diff --git a/makefiles/tools/edbg.inc.mk b/makefiles/tools/edbg.inc.mk index 76f6acca54..31a0964865 100644 --- a/makefiles/tools/edbg.inc.mk +++ b/makefiles/tools/edbg.inc.mk @@ -5,7 +5,7 @@ FLASHFILE ?= $(BINFILE) # Use USB serial number to select device when more than one is connected # Use /dist/tools/usb-serial/list-ttys.sh to find out serial number. # Usage: -# export DEBUG_ADAPTER_ID="ATML..." +# DEBUG_ADAPTER_ID="ATML..." # BOARD= make flash ifneq (,$(DEBUG_ADAPTER_ID)) EDBG_ARGS += --serial $(DEBUG_ADAPTER_ID) diff --git a/makefiles/tools/openocd-adapters/mulle.inc.mk b/makefiles/tools/openocd-adapters/mulle.inc.mk index 3004e09b34..4e1da73428 100644 --- a/makefiles/tools/openocd-adapters/mulle.inc.mk +++ b/makefiles/tools/openocd-adapters/mulle.inc.mk @@ -3,7 +3,7 @@ # programmer board serial number. # Fall back to PROGRAMMER_SERIAL for backwards compatibility -export DEBUG_ADAPTER_ID ?= $(PROGRAMMER_SERIAL) +DEBUG_ADAPTER_ID ?= $(PROGRAMMER_SERIAL) ifneq (,$(DEBUG_ADAPTER_ID)) # Makefile-way of comparing numbers, using lexicographical sorting since we