1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

make: namespace openocd DEBUG_ADAPTER variable

This commit is contained in:
Alexandre Abadie 2021-02-18 17:15:55 +01:00
parent 70d746dfc1
commit 603186f913
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
50 changed files with 56 additions and 56 deletions

View File

@ -3,7 +3,7 @@ PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# this board uses an ST-Link v2 debug adapter # this board uses an ST-Link v2 debug adapter
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
STLINK_VERSION ?= 2 STLINK_VERSION ?= 2
PROGRAMMER = openocd PROGRAMMER = openocd

View File

@ -3,7 +3,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# this board has an on-board ST-link adapter # this board has an on-board ST-link adapter
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
# this board can become un-flashable after a hardfault, # this board can become un-flashable after a hardfault,
# use connect_assert_srst to always be able to flash or reset the board. # use connect_assert_srst to always be able to flash or reset the board.

View File

@ -3,7 +3,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# this board has an on-board ST-link adapter # this board has an on-board ST-link adapter
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
# The board can become un-flashable after some execution, # The board can become un-flashable after some execution,
# use connect_assert_srst to always be able to flash or reset the board. # use connect_assert_srst to always be able to flash or reset the board.

View File

@ -2,7 +2,7 @@
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
ifeq (openocd,$(PROGRAMMER)) ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = dap OPENOCD_DEBUG_ADAPTER = dap
else ifeq (pyocd,$(PROGRAMMER)) else ifeq (pyocd,$(PROGRAMMER))
# PyOCD doesn't recognize automatically the board ID, so target type has to # PyOCD doesn't recognize automatically the board ID, so target type has to
# be passed explicitly # be passed explicitly

View File

@ -1,5 +1,5 @@
# external programmer required # external programmer required
DEBUG_ADAPTER ?= jlink OPENOCD_DEBUG_ADAPTER ?= jlink
INCLUDES += -I$(RIOTBOARD)/common/e104-bt50xxa-tb/include INCLUDES += -I$(RIOTBOARD)/common/e104-bt50xxa-tb/include

View File

@ -3,8 +3,8 @@ PROGRAMMER ?= openocd
# Use the shared OpenOCD configuration # Use the shared OpenOCD configuration
# Using dap or jlink depends on which firmware the OpenSDA debugger is running # Using dap or jlink depends on which firmware the OpenSDA debugger is running
DEBUG_ADAPTER ?= dap OPENOCD_DEBUG_ADAPTER ?= dap
#DEBUG_ADAPTER ?= jlink #OPENOCD_DEBUG_ADAPTER ?= jlink
# Configuration for OpenOCD v0.10.0 and newer # Configuration for OpenOCD v0.10.0 and newer
# For KW41Z, an OpenOCD version built from source is required. The support for # For KW41Z, an OpenOCD version built from source is required. The support for

View File

@ -11,7 +11,7 @@ PROGRAMMER ?= openocd
# Using connect_assert_srst removes errors on flash from invalid state # Using connect_assert_srst removes errors on flash from invalid state
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1 OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
DEBUG_ADAPTER ?= iotlab OPENOCD_DEBUG_ADAPTER ?= iotlab
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/iotlab/dist/openocd.cfg OPENOCD_CONFIG ?= $(RIOTBOARD)/common/iotlab/dist/openocd.cfg

View File

@ -2,7 +2,7 @@
INCLUDES += -I$(RIOTBOARD)/common/kw41z/include INCLUDES += -I$(RIOTBOARD)/common/kw41z/include
# This board comes with OpenSDA configured for JLink compatibility # This board comes with OpenSDA configured for JLink compatibility
DEBUG_ADAPTER ?= jlink OPENOCD_DEBUG_ADAPTER ?= jlink
# Include default FRDM board config # Include default FRDM board config
include $(RIOTBOARD)/common/frdm/Makefile.include include $(RIOTBOARD)/common/frdm/Makefile.include

View File

@ -20,6 +20,6 @@ else ifeq (openocd,$(PROGRAMMER))
# setup OpenOCD for flashing. Version 0.10 of OpenOCD doesn't contain support # setup OpenOCD for flashing. Version 0.10 of OpenOCD doesn't contain support
# for nrf52dk and nrf52840dk boards. To use OpenOCD with these a version # for nrf52dk and nrf52840dk boards. To use OpenOCD with these a version
# build from source (master > 2018, August the 13rd) is required. # build from source (master > 2018, August the 13rd) is required.
DEBUG_ADAPTER ?= jlink OPENOCD_DEBUG_ADAPTER ?= jlink
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg
endif endif

View File

@ -28,7 +28,7 @@ To flash the board with OpenOCD, use the `PROGRAMMER` variable:
It is also possible to use the SWD interface of a ST-LINK/V2 in-circuit It is also possible to use the SWD interface of a ST-LINK/V2 in-circuit
debugger/programmer with OpenOCD to flash a nrf52 board: debugger/programmer with OpenOCD to flash a nrf52 board:
``` ```
PROGRAMMER=openocd DEBUG_ADAPTER=stlink make BOARD=<nrf52 board> -C examples/hello-world flash PROGRAMMER=openocd OPENOCD_DEBUG_ADAPTER=stlink make BOARD=<nrf52 board> -C examples/hello-world flash
``` ```
*/ */

View File

@ -28,7 +28,7 @@ else
# option is passed explicitly # option is passed explicitly
FLASH_TARGET_TYPE ?= -t nrf52840 FLASH_TARGET_TYPE ?= -t nrf52840
else ifeq (openocd,$(PROGRAMMER)) else ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER ?= dap OPENOCD_DEBUG_ADAPTER ?= dap
endif endif
endif endif

View File

@ -4,8 +4,8 @@
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
# Using dap or jlink depends on which firmware the OpenSDA debugger is running # Using dap or jlink depends on which firmware the OpenSDA debugger is running
#DEBUG_ADAPTER ?= dap #OPENOCD_DEBUG_ADAPTER ?= dap
DEBUG_ADAPTER ?= jlink OPENOCD_DEBUG_ADAPTER ?= jlink
# Use the shared OpenOCD configuration # Use the shared OpenOCD configuration
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/qn908x/dist/openocd.cfg OPENOCD_CONFIG ?= $(RIOTBOARD)/common/qn908x/dist/openocd.cfg

View File

@ -2,7 +2,7 @@
# which we do not have any support for. Update your OpenSDA firmware with # which we do not have any support for. Update your OpenSDA firmware with
# the latest CMSIS-DAP firmware for your board from # the latest CMSIS-DAP firmware for your board from
# https://www.nxp.com/support/developer-resources/run-time-software/kinetis-developer-resources/ides-for-kinetis-mcus/opensda-serial-and-debug-adapter:OPENSDA # https://www.nxp.com/support/developer-resources/run-time-software/kinetis-developer-resources/ides-for-kinetis-mcus/opensda-serial-and-debug-adapter:OPENSDA
DEBUG_ADAPTER ?= dap OPENOCD_DEBUG_ADAPTER ?= dap
# Include default FRDM board config # Include default FRDM board config
include $(RIOTBOARD)/common/frdm/Makefile.include include $(RIOTBOARD)/common/frdm/Makefile.include

View File

@ -2,7 +2,7 @@
PROGRAMMER ?= jlink PROGRAMMER ?= jlink
ifeq (openocd,$(PROGRAMMER)) ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = jlink OPENOCD_DEBUG_ADAPTER = jlink
OPENOCD_TRANSPORT = jtag OPENOCD_TRANSPORT = jtag
OPENOCD_PRE_FLASH_CMDS += "-c flash protect 0 1 last off" OPENOCD_PRE_FLASH_CMDS += "-c flash protect 0 1 last off"
else ifeq (jlink,$(PROGRAMMER)) else ifeq (jlink,$(PROGRAMMER))

View File

@ -2,7 +2,7 @@
INCLUDES += -I$(RIOTBOARD)/common/stm32/include INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# to flash this board, use an ST-link adapter # to flash this board, use an ST-link adapter
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
# this board can become un-flashable after a hardfault, # this board can become un-flashable after a hardfault,
# use connect_assert_srst to always be able to flash or reset the boards. # use connect_assert_srst to always be able to flash or reset the boards.

View File

@ -10,4 +10,4 @@ CFLAGS+=-DSX127X_RX_SWITCH
# this board uses openocd # this board uses openocd
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink

View File

@ -7,5 +7,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# this board uses openocd with st-link # this board uses openocd with st-link
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
STLINK_VERSION ?= 2 STLINK_VERSION ?= 2

View File

@ -7,4 +7,4 @@ PROGRAMMER ?= openocd
# use connect_assert_srst to always be able to flash or reset the boards. # use connect_assert_srst to always be able to flash or reset the boards.
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1 OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
# By default, flash this board using an ST-link adapter # By default, flash this board using an ST-link adapter
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink

View File

@ -3,4 +3,4 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# this board uses openocd with st-link # this board uses openocd with st-link
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink

View File

@ -1,5 +1,5 @@
# FLASHER will be lpc2k_pgm still # FLASHER will be lpc2k_pgm still
DEBUG_ADAPTER ?= dap OPENOCD_DEBUG_ADAPTER ?= dap
JLINK_DEVICE := LPC2388 JLINK_DEVICE := LPC2388
OPENOCD_TRANSPORT := jtag OPENOCD_TRANSPORT := jtag

View File

@ -5,7 +5,7 @@ ifeq (pyocd,$(PROGRAMMER))
# option is passed explicitly # option is passed explicitly
FLASH_TARGET_TYPE ?= -t $(CPU) FLASH_TARGET_TYPE ?= -t $(CPU)
else ifeq (openocd,$(PROGRAMMER)) else ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = dap OPENOCD_DEBUG_ADAPTER = dap
endif endif
ifneq (,$(filter microbit,$(USEMODULE))) ifneq (,$(filter microbit,$(USEMODULE)))

View File

@ -5,7 +5,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
ifeq (openocd,$(PROGRAMMER)) ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = dap OPENOCD_DEBUG_ADAPTER = dap
endif endif
# QEMU 4.0 added microbit system emulation. # QEMU 4.0 added microbit system emulation.

View File

@ -3,7 +3,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
ifeq (openocd,$(PROGRAMMER)) ifeq (openocd,$(PROGRAMMER))
STLINK_VERSION ?= 2 STLINK_VERSION ?= 2
PORT_LINUX ?= /dev/ttyUSB0 PORT_LINUX ?= /dev/ttyUSB0

View File

@ -7,7 +7,7 @@ endif
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
# Default debug adapter choice is to use the Mulle programmer board # Default debug adapter choice is to use the Mulle programmer board
DEBUG_ADAPTER ?= mulle OPENOCD_DEBUG_ADAPTER ?= mulle
# We need special handling of the watchdog if we want to speed up the flash # We need special handling of the watchdog if we want to speed up the flash
# verification by using the MCU to compute the image checksum after flashing. # verification by using the MCU to compute the image checksum after flashing.

View File

@ -6,7 +6,7 @@ PROGRAMMER ?= openocd
# dap debug adapter is required for openocd # dap debug adapter is required for openocd
ifeq (openocd,$(PROGRAMMER)) ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = dap OPENOCD_DEBUG_ADAPTER = dap
endif endif
# include nrf51 boards common configuration # include nrf51 boards common configuration

View File

@ -6,7 +6,7 @@ PROGRAMMER ?= jlink
# set required jlink debug adapter for openocd if it's used # set required jlink debug adapter for openocd if it's used
ifeq (openocd,$(PROGRAMMER)) ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = jlink OPENOCD_DEBUG_ADAPTER = jlink
endif endif
# include nrf51 boards common configuration # include nrf51 boards common configuration

View File

@ -8,7 +8,7 @@ ifeq (pyocd,$(PROGRAMMER))
# option is passed explicitly # option is passed explicitly
FLASH_TARGET_TYPE ?= -t $(CPU) FLASH_TARGET_TYPE ?= -t $(CPU)
else ifeq (openocd,$(PROGRAMMER)) else ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = dap OPENOCD_DEBUG_ADAPTER = dap
endif endif
include $(RIOTBOARD)/common/nrf52/Makefile.include include $(RIOTBOARD)/common/nrf52/Makefile.include

View File

@ -8,7 +8,7 @@ ifeq (pyocd,$(PROGRAMMER))
# option is passed explicitly # option is passed explicitly
FLASH_TARGET_TYPE ?= -t nrf52840 FLASH_TARGET_TYPE ?= -t nrf52840
else ifeq (openocd,$(PROGRAMMER)) else ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = dap OPENOCD_DEBUG_ADAPTER = dap
endif endif
include $(RIOTBOARD)/common/nrf52/Makefile.include include $(RIOTBOARD)/common/nrf52/Makefile.include

View File

@ -7,7 +7,7 @@ PROGRAMMER ?= jlink
# set required debug adapter for openocd if it's used # set required debug adapter for openocd if it's used
ifeq (openocd,$(PROGRAMMER)) ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = jlink OPENOCD_DEBUG_ADAPTER = jlink
endif endif
# include nrf51 boards common configuration # include nrf51 boards common configuration

View File

@ -7,8 +7,8 @@ SLOT1_LEN ?= $(SLOT0_LEN)
# support SWD and UART via Pi GPIO header # support SWD and UART via Pi GPIO header
PORT_LINUX ?= /dev/serial0 PORT_LINUX ?= /dev/serial0
# TODO change to bcm2835gpio after it's merged as it's faster # TODO change to bcm2835gpio after it's merged as it's faster
# DEBUG_ADAPTER ?= bcm2835gpio # OPENOCD_DEBUG_ADAPTER ?= bcm2835gpio
DEBUG_ADAPTER ?= sysfs_gpio OPENOCD_DEBUG_ADAPTER ?= sysfs_gpio
SRST_PIN ?= 16 SRST_PIN ?= 16
SWCLK_PIN ?= 20 SWCLK_PIN ?= 20
SWDIO_PIN ?= 21 SWDIO_PIN ?= 21

View File

@ -3,4 +3,4 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# this board uses openocd with st-link # this board uses openocd with st-link
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink

View File

@ -23,7 +23,7 @@ OPENOCD_PRE_VERIFY_CMDS += \
-c 'resume 0x20000000' -c 'resume 0x20000000'
PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh
DEBUG_ADAPTER ?= dap OPENOCD_DEBUG_ADAPTER ?= dap
# The board can become un-flashable after some firmware, use connect_assert_srst # The board can become un-flashable after some firmware, use connect_assert_srst
# to always be able to flash or reset the board. # to always be able to flash or reset the board.

View File

@ -3,7 +3,7 @@ PROGRAMMER ?= openocd
# dap debug adapter is required for openocd # dap debug adapter is required for openocd
ifeq (openocd,$(PROGRAMMER)) ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = dap OPENOCD_DEBUG_ADAPTER = dap
endif endif
# Enable direct write to FCF (required for setting FOPT byte). # Enable direct write to FCF (required for setting FOPT byte).

View File

@ -1,5 +1,5 @@
# set programming environment # set programming environment
DEBUG_ADAPTER ?= dap OPENOCD_DEBUG_ADAPTER ?= dap
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
# use the common nrf52 config for the rest # use the common nrf52 config for the rest

View File

@ -5,7 +5,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# this board uses openocd with an HEXFILE # this board uses openocd with an HEXFILE
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
FLASHFILE ?= $(HEXFILE) FLASHFILE ?= $(HEXFILE)
DEBUG_ADAPTER ?= dap OPENOCD_DEBUG_ADAPTER ?= dap
# generate image checksum from hex file # generate image checksum from hex file
PRE_FLASH_CHECK_SCRIPT = lpc_checksum --format hex PRE_FLASH_CHECK_SCRIPT = lpc_checksum --format hex

View File

@ -7,5 +7,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# this board uses openocd # this board uses openocd
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
STLINK_VERSION ?= 2 STLINK_VERSION ?= 2

View File

@ -7,7 +7,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# this board uses openocd # this board uses openocd
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
STLINK_VERSION ?= 2 STLINK_VERSION ?= 2
# The board can become un-flashable after some execution, # The board can become un-flashable after some execution,

View File

@ -4,4 +4,4 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# this board uses openocd # this board uses openocd
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
# this board has an on-board ST-link adapter # this board has an on-board ST-link adapter
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink

View File

@ -7,7 +7,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# this board uses openocd with st-link # this board uses openocd with st-link
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
STLINK_VERSION ?= 2 STLINK_VERSION ?= 2
# Tell renode on which UART stdio is available # Tell renode on which UART stdio is available

View File

@ -5,4 +5,4 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
# this board has an on-board ST-link adapter # this board has an on-board ST-link adapter
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink

View File

@ -5,4 +5,4 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
# this board has an on-board ST-link adapter # this board has an on-board ST-link adapter
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink

View File

@ -8,4 +8,4 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# this board uses openocd with st-link # this board uses openocd with st-link
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink

View File

@ -3,7 +3,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# this board uses openocd with st-link # this board uses openocd with st-link
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
# This board can become un-flashable after a hardfault, # This board can become un-flashable after a hardfault,
# use connect_assert_srst to always be able to flash or reset the board. # use connect_assert_srst to always be able to flash or reset the board.

View File

@ -2,7 +2,7 @@
INCLUDES += -I$(RIOTBOARD)/common/stm32/include INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# this board has an on-board ST-link adapter # this board has an on-board ST-link adapter
DEBUG_ADAPTER = stlink-dap OPENOCD_DEBUG_ADAPTER = stlink-dap
OPENOCD_CORE = stm32mp15x.cm4 OPENOCD_CORE = stm32mp15x.cm4
GDB_PORT_CORE_OFFSET = 1 GDB_PORT_CORE_OFFSET = 1

View File

@ -4,5 +4,5 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# this board uses openocd with st-link # this board uses openocd with st-link
PROGRAMMER ?= openocd PROGRAMMER ?= openocd
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
STLINK_VERSION ?= 2-1 STLINK_VERSION ?= 2-1

View File

@ -3,7 +3,7 @@ PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# This board uses an ST-Link v2 debug adapter # This board uses an ST-Link v2 debug adapter
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
STLINK_VERSION ?= 2 STLINK_VERSION ?= 2
# import nrf51 boards common configuration # import nrf51 boards common configuration

View File

@ -108,7 +108,7 @@ UNEXPORTED_VARIABLES+=('RESET' 'RESETFLAGS')
UNEXPORTED_VARIABLES+=('DEBUGGER' 'DEBUGGER_FLAGS') UNEXPORTED_VARIABLES+=('DEBUGGER' 'DEBUGGER_FLAGS')
UNEXPORTED_VARIABLES+=('DEBUGSERVER' 'DEBUGSERVER_FLAGS') UNEXPORTED_VARIABLES+=('DEBUGSERVER' 'DEBUGSERVER_FLAGS')
UNEXPORTED_VARIABLES+=('PREFLASHER' 'PREFFLAGS' 'FLASHDEPS') UNEXPORTED_VARIABLES+=('PREFLASHER' 'PREFFLAGS' 'FLASHDEPS')
UNEXPORTED_VARIABLES+=('DEBUG_ADAPTER' 'DEBUG_ADAPTER_ID') UNEXPORTED_VARIABLES+=('OPENOCD_DEBUG_ADAPTER' 'DEBUG_ADAPTER_ID')
UNEXPORTED_VARIABLES+=('PROGRAMMER_SERIAL') UNEXPORTED_VARIABLES+=('PROGRAMMER_SERIAL')
UNEXPORTED_VARIABLES+=('STLINK_VERSION') UNEXPORTED_VARIABLES+=('STLINK_VERSION')
UNEXPORTED_VARIABLES+=('PORT_LINUX' 'PORT_DARWIN') UNEXPORTED_VARIABLES+=('PORT_LINUX' 'PORT_DARWIN')

View File

@ -16,15 +16,15 @@ ifneq (,$(filter debug% flash% %term test,$(MAKECMDGOALS)))
endif endif
# Default for these boards is to use a CMSIS-DAP programmer # Default for these boards is to use a CMSIS-DAP programmer
DEBUG_ADAPTER ?= dap OPENOCD_DEBUG_ADAPTER ?= dap
# If no programmer is set, select a default programmer # If no programmer is set, select a default programmer
ifeq ($(PROGRAMMER),) ifeq ($(PROGRAMMER),)
# EDBG can only be used with a compatible Atmel programmer # EDBG can only be used with a compatible Atmel programmer
ifeq ($(DEBUG_ADAPTER),dap) ifeq ($(OPENOCD_DEBUG_ADAPTER),dap)
# set this to either openocd, jlink or edbg # set this to either openocd, jlink or edbg
PROGRAMMER ?= edbg PROGRAMMER ?= edbg
else ifeq ($(DEBUG_ADAPTER),jlink) else ifeq ($(OPENOCD_DEBUG_ADAPTER),jlink)
# only use JLinkExe if it's installed # only use JLinkExe if it's installed
ifneq (,$(shell which JLinkExe)) ifneq (,$(shell which JLinkExe))
PROGRAMMER ?= jlink PROGRAMMER ?= jlink

View File

@ -20,7 +20,7 @@ ifeq (openocd,$(PROGRAMMER))
# For STM32 boards the ST-link adapter is the default adapter, e.g. all # For STM32 boards the ST-link adapter is the default adapter, e.g. all
# Nucleo boards have an on-board ST-link adapter # Nucleo boards have an on-board ST-link adapter
DEBUG_ADAPTER ?= stlink OPENOCD_DEBUG_ADAPTER ?= stlink
endif endif
ifeq (jlink,$(PROGRAMMER)) ifeq (jlink,$(PROGRAMMER))

View File

@ -9,8 +9,8 @@ DEBUGGER_FLAGS ?= debug $(ELFFILE)
DEBUGSERVER_FLAGS ?= debug-server DEBUGSERVER_FLAGS ?= debug-server
RESET_FLAGS ?= reset RESET_FLAGS ?= reset
ifneq (,$(DEBUG_ADAPTER)) ifneq (,$(OPENOCD_DEBUG_ADAPTER))
include $(RIOTMAKE)/tools/openocd-adapters/$(DEBUG_ADAPTER).inc.mk include $(RIOTMAKE)/tools/openocd-adapters/$(OPENOCD_DEBUG_ADAPTER).inc.mk
OPENOCD_ADAPTER_INIT += -c 'transport select $(OPENOCD_TRANSPORT)' OPENOCD_ADAPTER_INIT += -c 'transport select $(OPENOCD_TRANSPORT)'
endif endif