diff --git a/boards/airfy-beacon/Makefile.include b/boards/airfy-beacon/Makefile.include index 48b693979c..d2b5f458cf 100644 --- a/boards/airfy-beacon/Makefile.include +++ b/boards/airfy-beacon/Makefile.include @@ -3,7 +3,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # this board uses an ST-Link v2 debug adapter -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink STLINK_VERSION ?= 2 PROGRAMMER = openocd diff --git a/boards/b-l072z-lrwan1/Makefile.include b/boards/b-l072z-lrwan1/Makefile.include index e338e4ccbb..dfa4ccfdf1 100644 --- a/boards/b-l072z-lrwan1/Makefile.include +++ b/boards/b-l072z-lrwan1/Makefile.include @@ -3,7 +3,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include # this board has an on-board ST-link adapter PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink # this board can become un-flashable after a hardfault, # use connect_assert_srst to always be able to flash or reset the board. diff --git a/boards/b-l475e-iot01a/Makefile.include b/boards/b-l475e-iot01a/Makefile.include index 898aadf4d7..cda79dc6a0 100644 --- a/boards/b-l475e-iot01a/Makefile.include +++ b/boards/b-l475e-iot01a/Makefile.include @@ -3,7 +3,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include # this board has an on-board ST-link adapter PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink # The board can become un-flashable after some execution, # use connect_assert_srst to always be able to flash or reset the board. diff --git a/boards/calliope-mini/Makefile.include b/boards/calliope-mini/Makefile.include index 0056b2f764..5a78964016 100644 --- a/boards/calliope-mini/Makefile.include +++ b/boards/calliope-mini/Makefile.include @@ -2,7 +2,7 @@ PROGRAMMER ?= openocd ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER = dap + OPENOCD_DEBUG_ADAPTER = dap else ifeq (pyocd,$(PROGRAMMER)) # PyOCD doesn't recognize automatically the board ID, so target type has to # be passed explicitly diff --git a/boards/common/e104-bt50xxa-tb/Makefile.include b/boards/common/e104-bt50xxa-tb/Makefile.include index 4c917458dd..d95121416c 100644 --- a/boards/common/e104-bt50xxa-tb/Makefile.include +++ b/boards/common/e104-bt50xxa-tb/Makefile.include @@ -1,5 +1,5 @@ # external programmer required -DEBUG_ADAPTER ?= jlink +OPENOCD_DEBUG_ADAPTER ?= jlink INCLUDES += -I$(RIOTBOARD)/common/e104-bt50xxa-tb/include diff --git a/boards/common/frdm/Makefile.include b/boards/common/frdm/Makefile.include index 3aac5f529d..dceb0a55b5 100644 --- a/boards/common/frdm/Makefile.include +++ b/boards/common/frdm/Makefile.include @@ -3,8 +3,8 @@ PROGRAMMER ?= openocd # Use the shared OpenOCD configuration # Using dap or jlink depends on which firmware the OpenSDA debugger is running -DEBUG_ADAPTER ?= dap -#DEBUG_ADAPTER ?= jlink +OPENOCD_DEBUG_ADAPTER ?= dap +#OPENOCD_DEBUG_ADAPTER ?= jlink # Configuration for OpenOCD v0.10.0 and newer # For KW41Z, an OpenOCD version built from source is required. The support for diff --git a/boards/common/iotlab/Makefile.include b/boards/common/iotlab/Makefile.include index 8b926b5e73..6000a1b1ac 100644 --- a/boards/common/iotlab/Makefile.include +++ b/boards/common/iotlab/Makefile.include @@ -11,7 +11,7 @@ PROGRAMMER ?= openocd # Using connect_assert_srst removes errors on flash from invalid state OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1 -DEBUG_ADAPTER ?= iotlab +OPENOCD_DEBUG_ADAPTER ?= iotlab OPENOCD_CONFIG ?= $(RIOTBOARD)/common/iotlab/dist/openocd.cfg diff --git a/boards/common/kw41z/Makefile.include b/boards/common/kw41z/Makefile.include index 399bb60f0b..58f3e77f16 100644 --- a/boards/common/kw41z/Makefile.include +++ b/boards/common/kw41z/Makefile.include @@ -2,7 +2,7 @@ INCLUDES += -I$(RIOTBOARD)/common/kw41z/include # This board comes with OpenSDA configured for JLink compatibility -DEBUG_ADAPTER ?= jlink +OPENOCD_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 18a81b7fd1..d416a40ce6 100644 --- a/boards/common/nrf52/Makefile.include +++ b/boards/common/nrf52/Makefile.include @@ -20,6 +20,6 @@ else ifeq (openocd,$(PROGRAMMER)) # 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 # 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 endif diff --git a/boards/common/nrf52/doc.txt b/boards/common/nrf52/doc.txt index f6625c2fb1..cd3e7c6d61 100644 --- a/boards/common/nrf52/doc.txt +++ b/boards/common/nrf52/doc.txt @@ -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 debugger/programmer with OpenOCD to flash a nrf52 board: ``` - PROGRAMMER=openocd DEBUG_ADAPTER=stlink make BOARD= -C examples/hello-world flash + PROGRAMMER=openocd OPENOCD_DEBUG_ADAPTER=stlink make BOARD= -C examples/hello-world flash ``` */ diff --git a/boards/common/particle-mesh/Makefile.include b/boards/common/particle-mesh/Makefile.include index 1d77c5c181..24799c202f 100644 --- a/boards/common/particle-mesh/Makefile.include +++ b/boards/common/particle-mesh/Makefile.include @@ -28,7 +28,7 @@ else # option is passed explicitly FLASH_TARGET_TYPE ?= -t nrf52840 else ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER ?= dap + OPENOCD_DEBUG_ADAPTER ?= dap endif endif diff --git a/boards/common/qn908x/Makefile.include b/boards/common/qn908x/Makefile.include index 2cb3ff4fa3..30ccde4388 100644 --- a/boards/common/qn908x/Makefile.include +++ b/boards/common/qn908x/Makefile.include @@ -4,8 +4,8 @@ PROGRAMMER ?= openocd # Using dap or jlink depends on which firmware the OpenSDA debugger is running -#DEBUG_ADAPTER ?= dap -DEBUG_ADAPTER ?= jlink +#OPENOCD_DEBUG_ADAPTER ?= dap +OPENOCD_DEBUG_ADAPTER ?= jlink # Use the shared OpenOCD configuration OPENOCD_CONFIG ?= $(RIOTBOARD)/common/qn908x/dist/openocd.cfg diff --git a/boards/frdm-kl43z/Makefile.include b/boards/frdm-kl43z/Makefile.include index 94417d4f7c..5d3b6db0f8 100644 --- a/boards/frdm-kl43z/Makefile.include +++ b/boards/frdm-kl43z/Makefile.include @@ -2,7 +2,7 @@ # which we do not have any support for. Update your OpenSDA firmware with # 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 -DEBUG_ADAPTER ?= dap +OPENOCD_DEBUG_ADAPTER ?= dap # Include default FRDM board config include $(RIOTBOARD)/common/frdm/Makefile.include diff --git a/boards/hifive1b/Makefile.include b/boards/hifive1b/Makefile.include index 2774c36018..815fef936c 100644 --- a/boards/hifive1b/Makefile.include +++ b/boards/hifive1b/Makefile.include @@ -2,7 +2,7 @@ PROGRAMMER ?= jlink ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER = jlink + OPENOCD_DEBUG_ADAPTER = jlink OPENOCD_TRANSPORT = jtag OPENOCD_PRE_FLASH_CMDS += "-c flash protect 0 1 last off" else ifeq (jlink,$(PROGRAMMER)) diff --git a/boards/i-nucleo-lrwan1/Makefile.include b/boards/i-nucleo-lrwan1/Makefile.include index ca7d260ae0..db8d239278 100644 --- a/boards/i-nucleo-lrwan1/Makefile.include +++ b/boards/i-nucleo-lrwan1/Makefile.include @@ -2,7 +2,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include # 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, # use connect_assert_srst to always be able to flash or reset the boards. diff --git a/boards/im880b/Makefile.include b/boards/im880b/Makefile.include index 0f505073ce..d6da09df5b 100644 --- a/boards/im880b/Makefile.include +++ b/boards/im880b/Makefile.include @@ -10,4 +10,4 @@ CFLAGS+=-DSX127X_RX_SWITCH # this board uses openocd PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink diff --git a/boards/limifrog-v1/Makefile.include b/boards/limifrog-v1/Makefile.include index eaa41ac9b2..27e2d23834 100644 --- a/boards/limifrog-v1/Makefile.include +++ b/boards/limifrog-v1/Makefile.include @@ -7,5 +7,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # this board uses openocd with st-link PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink STLINK_VERSION ?= 2 diff --git a/boards/lsn50/Makefile.include b/boards/lsn50/Makefile.include index e4c8f9820c..0dc3200ec3 100644 --- a/boards/lsn50/Makefile.include +++ b/boards/lsn50/Makefile.include @@ -7,4 +7,4 @@ PROGRAMMER ?= openocd # use connect_assert_srst to always be able to flash or reset the boards. OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1 # By default, flash this board using an ST-link adapter -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink diff --git a/boards/maple-mini/Makefile.include b/boards/maple-mini/Makefile.include index e8a5f09c5b..0d40a6f290 100644 --- a/boards/maple-mini/Makefile.include +++ b/boards/maple-mini/Makefile.include @@ -3,4 +3,4 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include # this board uses openocd with st-link PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink diff --git a/boards/mcb2388/Makefile.include b/boards/mcb2388/Makefile.include index b562bade29..623207f227 100644 --- a/boards/mcb2388/Makefile.include +++ b/boards/mcb2388/Makefile.include @@ -1,5 +1,5 @@ # FLASHER will be lpc2k_pgm still -DEBUG_ADAPTER ?= dap +OPENOCD_DEBUG_ADAPTER ?= dap JLINK_DEVICE := LPC2388 OPENOCD_TRANSPORT := jtag diff --git a/boards/microbit-v2/Makefile.include b/boards/microbit-v2/Makefile.include index 40180db7b3..817c16b926 100644 --- a/boards/microbit-v2/Makefile.include +++ b/boards/microbit-v2/Makefile.include @@ -5,7 +5,7 @@ ifeq (pyocd,$(PROGRAMMER)) # option is passed explicitly FLASH_TARGET_TYPE ?= -t $(CPU) else ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER = dap + OPENOCD_DEBUG_ADAPTER = dap endif ifneq (,$(filter microbit,$(USEMODULE))) diff --git a/boards/microbit/Makefile.include b/boards/microbit/Makefile.include index 316cbdd1d5..ce2a88d8c6 100644 --- a/boards/microbit/Makefile.include +++ b/boards/microbit/Makefile.include @@ -5,7 +5,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) PROGRAMMER ?= openocd ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER = dap + OPENOCD_DEBUG_ADAPTER = dap endif # QEMU 4.0 added microbit system emulation. diff --git a/boards/msbiot/Makefile.include b/boards/msbiot/Makefile.include index 584a28683a..1d2834fd41 100644 --- a/boards/msbiot/Makefile.include +++ b/boards/msbiot/Makefile.include @@ -3,7 +3,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink ifeq (openocd,$(PROGRAMMER)) STLINK_VERSION ?= 2 PORT_LINUX ?= /dev/ttyUSB0 diff --git a/boards/mulle/Makefile.include b/boards/mulle/Makefile.include index 0859af56b1..4f70f51f43 100644 --- a/boards/mulle/Makefile.include +++ b/boards/mulle/Makefile.include @@ -7,7 +7,7 @@ endif PROGRAMMER ?= openocd # 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 # verification by using the MCU to compute the image checksum after flashing. diff --git a/boards/nrf51dk/Makefile.include b/boards/nrf51dk/Makefile.include index 3d37efd9e9..8d1d548b62 100644 --- a/boards/nrf51dk/Makefile.include +++ b/boards/nrf51dk/Makefile.include @@ -6,7 +6,7 @@ PROGRAMMER ?= openocd # dap debug adapter is required for openocd ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER = dap + OPENOCD_DEBUG_ADAPTER = dap endif # include nrf51 boards common configuration diff --git a/boards/nrf51dongle/Makefile.include b/boards/nrf51dongle/Makefile.include index 9fb8033207..9fcdfb1ff8 100644 --- a/boards/nrf51dongle/Makefile.include +++ b/boards/nrf51dongle/Makefile.include @@ -6,7 +6,7 @@ PROGRAMMER ?= jlink # set required jlink debug adapter for openocd if it's used ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER = jlink + OPENOCD_DEBUG_ADAPTER = jlink endif # include nrf51 boards common configuration diff --git a/boards/nrf52832-mdk/Makefile.include b/boards/nrf52832-mdk/Makefile.include index 0d88a31228..6bead94ad4 100644 --- a/boards/nrf52832-mdk/Makefile.include +++ b/boards/nrf52832-mdk/Makefile.include @@ -8,7 +8,7 @@ ifeq (pyocd,$(PROGRAMMER)) # option is passed explicitly FLASH_TARGET_TYPE ?= -t $(CPU) else ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER = dap + OPENOCD_DEBUG_ADAPTER = dap endif include $(RIOTBOARD)/common/nrf52/Makefile.include diff --git a/boards/nrf52840-mdk/Makefile.include b/boards/nrf52840-mdk/Makefile.include index c8c05b64b2..f5d2d4c030 100644 --- a/boards/nrf52840-mdk/Makefile.include +++ b/boards/nrf52840-mdk/Makefile.include @@ -8,7 +8,7 @@ ifeq (pyocd,$(PROGRAMMER)) # option is passed explicitly FLASH_TARGET_TYPE ?= -t nrf52840 else ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER = dap + OPENOCD_DEBUG_ADAPTER = dap endif include $(RIOTBOARD)/common/nrf52/Makefile.include diff --git a/boards/nrf6310/Makefile.include b/boards/nrf6310/Makefile.include index 26fa8f3365..8682b0bcc7 100644 --- a/boards/nrf6310/Makefile.include +++ b/boards/nrf6310/Makefile.include @@ -7,7 +7,7 @@ PROGRAMMER ?= jlink # set required debug adapter for openocd if it's used ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER = jlink + OPENOCD_DEBUG_ADAPTER = jlink endif # include nrf51 boards common configuration diff --git a/boards/openlabs-kw41z-mini/Makefile.include b/boards/openlabs-kw41z-mini/Makefile.include index 5710ca6927..35d6a31a62 100644 --- a/boards/openlabs-kw41z-mini/Makefile.include +++ b/boards/openlabs-kw41z-mini/Makefile.include @@ -7,8 +7,8 @@ SLOT1_LEN ?= $(SLOT0_LEN) # support SWD and UART via Pi GPIO header PORT_LINUX ?= /dev/serial0 # TODO change to bcm2835gpio after it's merged as it's faster -# DEBUG_ADAPTER ?= bcm2835gpio -DEBUG_ADAPTER ?= sysfs_gpio +# OPENOCD_DEBUG_ADAPTER ?= bcm2835gpio +OPENOCD_DEBUG_ADAPTER ?= sysfs_gpio SRST_PIN ?= 16 SWCLK_PIN ?= 20 SWDIO_PIN ?= 21 diff --git a/boards/p-l496g-cell02/Makefile.include b/boards/p-l496g-cell02/Makefile.include index 988ecea6ea..bcb8ababf4 100644 --- a/boards/p-l496g-cell02/Makefile.include +++ b/boards/p-l496g-cell02/Makefile.include @@ -3,4 +3,4 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include # this board uses openocd with st-link PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink diff --git a/boards/pba-d-01-kw2x/Makefile.include b/boards/pba-d-01-kw2x/Makefile.include index c196dafb78..1acd66e890 100644 --- a/boards/pba-d-01-kw2x/Makefile.include +++ b/boards/pba-d-01-kw2x/Makefile.include @@ -23,7 +23,7 @@ OPENOCD_PRE_VERIFY_CMDS += \ -c 'resume 0x20000000' 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 # to always be able to flash or reset the board. diff --git a/boards/phynode-kw41z/Makefile.include b/boards/phynode-kw41z/Makefile.include index 664a87391d..859e7d9f6c 100644 --- a/boards/phynode-kw41z/Makefile.include +++ b/boards/phynode-kw41z/Makefile.include @@ -3,7 +3,7 @@ PROGRAMMER ?= openocd # dap debug adapter is required for openocd ifeq (openocd,$(PROGRAMMER)) - DEBUG_ADAPTER = dap + OPENOCD_DEBUG_ADAPTER = dap endif # Enable direct write to FCF (required for setting FOPT byte). diff --git a/boards/reel/Makefile.include b/boards/reel/Makefile.include index 95037eae39..44957c666a 100644 --- a/boards/reel/Makefile.include +++ b/boards/reel/Makefile.include @@ -1,5 +1,5 @@ # set programming environment -DEBUG_ADAPTER ?= dap +OPENOCD_DEBUG_ADAPTER ?= dap PROGRAMMER ?= openocd # use the common nrf52 config for the rest diff --git a/boards/seeeduino_arch-pro/Makefile.include b/boards/seeeduino_arch-pro/Makefile.include index 71b001bd77..3489cd34f3 100644 --- a/boards/seeeduino_arch-pro/Makefile.include +++ b/boards/seeeduino_arch-pro/Makefile.include @@ -5,7 +5,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # this board uses openocd with an HEXFILE PROGRAMMER ?= openocd FLASHFILE ?= $(HEXFILE) -DEBUG_ADAPTER ?= dap +OPENOCD_DEBUG_ADAPTER ?= dap # generate image checksum from hex file PRE_FLASH_CHECK_SCRIPT = lpc_checksum --format hex diff --git a/boards/stm32f0discovery/Makefile.include b/boards/stm32f0discovery/Makefile.include index 60c999497d..f65270401a 100644 --- a/boards/stm32f0discovery/Makefile.include +++ b/boards/stm32f0discovery/Makefile.include @@ -7,5 +7,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # this board uses openocd PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink STLINK_VERSION ?= 2 diff --git a/boards/stm32f3discovery/Makefile.include b/boards/stm32f3discovery/Makefile.include index 967db6d771..f0a61abbb4 100644 --- a/boards/stm32f3discovery/Makefile.include +++ b/boards/stm32f3discovery/Makefile.include @@ -7,7 +7,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # this board uses openocd PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink STLINK_VERSION ?= 2 # The board can become un-flashable after some execution, diff --git a/boards/stm32f429i-disc1/Makefile.include b/boards/stm32f429i-disc1/Makefile.include index 05207ccca1..78f07632fc 100644 --- a/boards/stm32f429i-disc1/Makefile.include +++ b/boards/stm32f429i-disc1/Makefile.include @@ -4,4 +4,4 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include # this board uses openocd PROGRAMMER ?= openocd # this board has an on-board ST-link adapter -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink diff --git a/boards/stm32f4discovery/Makefile.include b/boards/stm32f4discovery/Makefile.include index 68fc435d3a..34a774d39c 100644 --- a/boards/stm32f4discovery/Makefile.include +++ b/boards/stm32f4discovery/Makefile.include @@ -7,7 +7,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # this board uses openocd with st-link PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink STLINK_VERSION ?= 2 # Tell renode on which UART stdio is available diff --git a/boards/stm32f723e-disco/Makefile.include b/boards/stm32f723e-disco/Makefile.include index a40c78798c..a117a96e26 100644 --- a/boards/stm32f723e-disco/Makefile.include +++ b/boards/stm32f723e-disco/Makefile.include @@ -5,4 +5,4 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include PROGRAMMER ?= openocd # this board has an on-board ST-link adapter -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink diff --git a/boards/stm32f769i-disco/Makefile.include b/boards/stm32f769i-disco/Makefile.include index d52570eccd..0564a223c3 100644 --- a/boards/stm32f769i-disco/Makefile.include +++ b/boards/stm32f769i-disco/Makefile.include @@ -5,4 +5,4 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include PROGRAMMER ?= openocd # this board has an on-board ST-link adapter -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink diff --git a/boards/stm32l0538-disco/Makefile.include b/boards/stm32l0538-disco/Makefile.include index e283275bec..16d7ebec80 100644 --- a/boards/stm32l0538-disco/Makefile.include +++ b/boards/stm32l0538-disco/Makefile.include @@ -8,4 +8,4 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # this board uses openocd with st-link PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink diff --git a/boards/stm32l476g-disco/Makefile.include b/boards/stm32l476g-disco/Makefile.include index 937ff089b8..c6d70cf420 100644 --- a/boards/stm32l476g-disco/Makefile.include +++ b/boards/stm32l476g-disco/Makefile.include @@ -3,7 +3,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include # this board uses openocd with st-link PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink # This board can become un-flashable after a hardfault, # use connect_assert_srst to always be able to flash or reset the board. diff --git a/boards/stm32mp157c-dk2/Makefile.include b/boards/stm32mp157c-dk2/Makefile.include index afceece793..8aff30cb20 100644 --- a/boards/stm32mp157c-dk2/Makefile.include +++ b/boards/stm32mp157c-dk2/Makefile.include @@ -2,7 +2,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include # this board has an on-board ST-link adapter -DEBUG_ADAPTER = stlink-dap +OPENOCD_DEBUG_ADAPTER = stlink-dap OPENOCD_CORE = stm32mp15x.cm4 GDB_PORT_CORE_OFFSET = 1 diff --git a/boards/ublox-c030-u201/Makefile.include b/boards/ublox-c030-u201/Makefile.include index 62f5f72809..d4255951f2 100644 --- a/boards/ublox-c030-u201/Makefile.include +++ b/boards/ublox-c030-u201/Makefile.include @@ -4,5 +4,5 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include # this board uses openocd with st-link PROGRAMMER ?= openocd -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink STLINK_VERSION ?= 2-1 diff --git a/boards/yunjia-nrf51822/Makefile.include b/boards/yunjia-nrf51822/Makefile.include index 914df92485..69d2292178 100644 --- a/boards/yunjia-nrf51822/Makefile.include +++ b/boards/yunjia-nrf51822/Makefile.include @@ -3,7 +3,7 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) # This board uses an ST-Link v2 debug adapter -DEBUG_ADAPTER ?= stlink +OPENOCD_DEBUG_ADAPTER ?= stlink STLINK_VERSION ?= 2 # import nrf51 boards common configuration diff --git a/dist/tools/buildsystem_sanity_check/check.sh b/dist/tools/buildsystem_sanity_check/check.sh index 4c872f886e..36b91f7d62 100755 --- a/dist/tools/buildsystem_sanity_check/check.sh +++ b/dist/tools/buildsystem_sanity_check/check.sh @@ -108,7 +108,7 @@ 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+=('OPENOCD_DEBUG_ADAPTER' 'DEBUG_ADAPTER_ID') UNEXPORTED_VARIABLES+=('PROGRAMMER_SERIAL') UNEXPORTED_VARIABLES+=('STLINK_VERSION') UNEXPORTED_VARIABLES+=('PORT_LINUX' 'PORT_DARWIN') diff --git a/makefiles/boards/sam0.inc.mk b/makefiles/boards/sam0.inc.mk index e529e3ac64..2d2415a34c 100644 --- a/makefiles/boards/sam0.inc.mk +++ b/makefiles/boards/sam0.inc.mk @@ -16,15 +16,15 @@ ifneq (,$(filter debug% flash% %term test,$(MAKECMDGOALS))) endif # 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 ifeq ($(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 PROGRAMMER ?= edbg - else ifeq ($(DEBUG_ADAPTER),jlink) + else ifeq ($(OPENOCD_DEBUG_ADAPTER),jlink) # only use JLinkExe if it's installed ifneq (,$(shell which JLinkExe)) PROGRAMMER ?= jlink diff --git a/makefiles/boards/stm32.inc.mk b/makefiles/boards/stm32.inc.mk index 04781cf95e..71152d7b64 100644 --- a/makefiles/boards/stm32.inc.mk +++ b/makefiles/boards/stm32.inc.mk @@ -20,7 +20,7 @@ ifeq (openocd,$(PROGRAMMER)) # For STM32 boards the ST-link adapter is the default adapter, e.g. all # Nucleo boards have an on-board ST-link adapter - DEBUG_ADAPTER ?= stlink + OPENOCD_DEBUG_ADAPTER ?= stlink endif ifeq (jlink,$(PROGRAMMER)) diff --git a/makefiles/tools/openocd.inc.mk b/makefiles/tools/openocd.inc.mk index a67db84f1b..b13285a62b 100644 --- a/makefiles/tools/openocd.inc.mk +++ b/makefiles/tools/openocd.inc.mk @@ -9,8 +9,8 @@ DEBUGGER_FLAGS ?= debug $(ELFFILE) DEBUGSERVER_FLAGS ?= debug-server RESET_FLAGS ?= reset -ifneq (,$(DEBUG_ADAPTER)) - include $(RIOTMAKE)/tools/openocd-adapters/$(DEBUG_ADAPTER).inc.mk +ifneq (,$(OPENOCD_DEBUG_ADAPTER)) + include $(RIOTMAKE)/tools/openocd-adapters/$(OPENOCD_DEBUG_ADAPTER).inc.mk OPENOCD_ADAPTER_INIT += -c 'transport select $(OPENOCD_TRANSPORT)' endif