mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-15 01:23:49 +01:00
boards: remove openocd/pyocd config conditionals
This commit is contained in:
parent
6f47505997
commit
74274d9e19
@ -1,13 +1,10 @@
|
||||
# for this board we support flashing via openocd or pyocd
|
||||
PROGRAMMER ?= openocd
|
||||
|
||||
ifeq (openocd,$(PROGRAMMER))
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
else ifeq (pyocd,$(PROGRAMMER))
|
||||
# PyOCD doesn't recognize automatically the board ID, so target type has to
|
||||
# be passed explicitly
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t nrf51
|
||||
endif
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
# PyOCD doesn't recognize automatically the board ID, so target type has to
|
||||
# be passed explicitly
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t nrf51
|
||||
|
||||
# include nrf51 boards common configuration
|
||||
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||
|
||||
@ -9,17 +9,17 @@ ifeq (bmp,$(PROGRAMMER))
|
||||
endif
|
||||
|
||||
PROGRAMMER ?= jlink
|
||||
ifeq (jlink,$(PROGRAMMER))
|
||||
# setup JLink for flashing
|
||||
JLINK_DEVICE = nrf52
|
||||
else ifeq (openocd,$(PROGRAMMER))
|
||||
ifneq (,$(filter $(BOARD),ruuvitag thingy52))
|
||||
# openocd doesn't fully work with ruuvitag and thingy52
|
||||
# setup JLink for flashing
|
||||
JLINK_DEVICE = nrf52
|
||||
# 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.
|
||||
OPENOCD_DEBUG_ADAPTER ?= jlink
|
||||
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg
|
||||
|
||||
ifneq (,$(filter $(BOARD),ruuvitag thingy52))
|
||||
# openocd doesn't fully work with ruuvitag and thingy52
|
||||
ifeq (openocd,$(PROGRAMMER))
|
||||
$(error Cannot use OpenOCD with $(BOARD) board)
|
||||
endif
|
||||
# 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.
|
||||
OPENOCD_DEBUG_ADAPTER ?= jlink
|
||||
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg
|
||||
endif
|
||||
|
||||
@ -23,13 +23,10 @@ else
|
||||
# For openocd, a version built against the development branch and containing
|
||||
# the support for nrf52 cpu is required.
|
||||
PROGRAMMER ?= pyocd
|
||||
ifeq (pyocd,$(PROGRAMMER))
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t nrf52840
|
||||
else ifeq (openocd,$(PROGRAMMER))
|
||||
OPENOCD_DEBUG_ADAPTER ?= dap
|
||||
endif
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t nrf52840
|
||||
OPENOCD_DEBUG_ADAPTER ?= dap
|
||||
endif
|
||||
|
||||
MONOFIRMWARETOOL = ${RIOTBOARD}/common/particle-mesh/monofirmware-tool.py
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
# for this board, flash with OpenOCD by default. PyOCD is also supported.
|
||||
PROGRAMMER ?= openocd
|
||||
ifeq (pyocd,$(PROGRAMMER))
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||
else ifeq (openocd,$(PROGRAMMER))
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
endif
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
|
||||
ifneq (,$(filter microbit,$(USEMODULE)))
|
||||
INCLUDES += -I$(RIOTBOARD)/common/microbit/include
|
||||
|
||||
@ -4,9 +4,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
# for this board we support flashing via openocd or pyocd
|
||||
PROGRAMMER ?= openocd
|
||||
|
||||
ifeq (openocd,$(PROGRAMMER))
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
endif
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
|
||||
# QEMU 4.0 added microbit system emulation.
|
||||
RIOT_EMULATOR ?= qemu
|
||||
|
||||
@ -5,9 +5,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
PROGRAMMER ?= openocd
|
||||
|
||||
# dap debug adapter is required for openocd
|
||||
ifeq (openocd,$(PROGRAMMER))
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
endif
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
|
||||
# include nrf51 boards common configuration
|
||||
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||
|
||||
@ -5,9 +5,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
PROGRAMMER ?= jlink
|
||||
|
||||
# set required jlink debug adapter for openocd if it's used
|
||||
ifeq (openocd,$(PROGRAMMER))
|
||||
OPENOCD_DEBUG_ADAPTER = jlink
|
||||
endif
|
||||
OPENOCD_DEBUG_ADAPTER = jlink
|
||||
|
||||
# include nrf51 boards common configuration
|
||||
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||
|
||||
@ -3,12 +3,9 @@
|
||||
# For openocd, a version built against the development branch and containing
|
||||
# the support for nrf52 cpu is required.
|
||||
PROGRAMMER ?= pyocd
|
||||
ifeq (pyocd,$(PROGRAMMER))
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||
else ifeq (openocd,$(PROGRAMMER))
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
endif
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||
|
||||
@ -3,12 +3,9 @@
|
||||
# For openocd, a version built against the development branch and containing
|
||||
# the support for nrf52 cpu is required.
|
||||
PROGRAMMER ?= pyocd
|
||||
ifeq (pyocd,$(PROGRAMMER))
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t nrf52840
|
||||
else ifeq (openocd,$(PROGRAMMER))
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
endif
|
||||
# The board is not recognized automatically by pyocd, so the CPU target
|
||||
# option is passed explicitly
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t nrf52840
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||
|
||||
@ -6,9 +6,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
PROGRAMMER ?= jlink
|
||||
|
||||
# set required debug adapter for openocd if it's used
|
||||
ifeq (openocd,$(PROGRAMMER))
|
||||
OPENOCD_DEBUG_ADAPTER = jlink
|
||||
endif
|
||||
OPENOCD_DEBUG_ADAPTER = jlink
|
||||
|
||||
# include nrf51 boards common configuration
|
||||
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
PROGRAMMER ?= openocd
|
||||
|
||||
# dap debug adapter is required for openocd
|
||||
ifeq (openocd,$(PROGRAMMER))
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
endif
|
||||
OPENOCD_DEBUG_ADAPTER = dap
|
||||
|
||||
# Enable direct write to FCF (required for setting FOPT byte).
|
||||
OPENOCD_PRE_FLASH_CMDS += "-c kinetis fcf_source write"
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
RIOT_TERMINAL ?= jlink
|
||||
|
||||
# define pyocd as programmer to program with stlink
|
||||
ifeq (pyocd,$(PROGRAMMER))
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||
endif
|
||||
PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||
|
||||
# use shared Makefile.include
|
||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||
|
||||
@ -13,19 +13,15 @@ ifeq (bmp,$(PROGRAMMER))
|
||||
PORT_DARWIN ?= $(wordlist 2, 2, $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
endif
|
||||
|
||||
ifeq (openocd,$(PROGRAMMER))
|
||||
# STM32 boards can become un-flashable after a hardfault,
|
||||
# use connect_assert_srst to always be able to flash or reset the boards.
|
||||
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||
# STM32 boards can become un-flashable after a hardfault,
|
||||
# use connect_assert_srst to always be able to flash or reset the boards.
|
||||
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||
|
||||
# For STM32 boards the ST-link adapter is the default adapter, e.g. all
|
||||
# Nucleo boards have an on-board ST-link adapter
|
||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||
endif
|
||||
# For STM32 boards the ST-link adapter is the default adapter, e.g. all
|
||||
# Nucleo boards have an on-board ST-link adapter
|
||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||
|
||||
ifeq (jlink,$(PROGRAMMER))
|
||||
JLINK_DEVICE ?= $(CPU_MODEL)
|
||||
endif
|
||||
JLINK_DEVICE ?= $(CPU_MODEL)
|
||||
|
||||
ifeq (dfu-util,$(PROGRAMMER))
|
||||
# optionally, use dfu-util to flash via usb
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user