Merge pull request #11614 from aabadie/pr/make/export_debug_adapter_remove

make: boards: remove use of export with debug adapter related variables
This commit is contained in:
Gaëtan Harter 2019-06-03 10:46:34 +02:00 committed by GitHub
commit 0d090ad7cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 41 additions and 38 deletions

View File

@ -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'

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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() {

View File

@ -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)

View File

@ -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=<board> make flash
ifneq (,$(DEBUG_ADAPTER_ID))
EDBG_ARGS += --serial $(DEBUG_ADAPTER_ID)

View File

@ -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