mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
c4ff80b6b9
Place common OpenOCD configs for the different cc13xx and cc26xx families in boards/common/cc26xx_cc13xx/dist and automatically select the correct one based on the (prefix of the) value of `$(CPU_MODEL)`, if `OPENOCD_CONFIG` was not specified and no custom `openocd.cfg` is located in the board's `dist` folder. The `cc2650-launchpad` and `cc2650stk` have been adapted to use the common config instead.
43 lines
1.5 KiB
Makefile
43 lines
1.5 KiB
Makefile
# configure the flash tool
|
|
ifneq (,$(UNIFLASH_PATH))
|
|
PROGRAMMER ?= uniflash
|
|
else
|
|
PROGRAMMER ?= openocd
|
|
endif
|
|
|
|
# uniflash and openocd programmers are supported
|
|
PROGRAMMERS_SUPPORTED += openocd uniflash
|
|
|
|
# If port selection via ttys.py is enabled by `MOST_RECENT_PORT=1`, filter
|
|
# USB serials to only select the UART bridge of XDS110 debuggers, which is the
|
|
# embedded debugger of these launchpad boards.
|
|
TTY_BOARD_FILTER := --model XDS110 --iface-num 0
|
|
|
|
UNIFLASH_CONFIG ?= $(RIOTBOARD)/common/cc26xx_cc13xx/dist
|
|
|
|
OPENOCD_DEBUG_ADAPTER ?= xds110
|
|
|
|
ifneq (,$(filter cc13x0%,$(CPU_MODEL)))
|
|
DEFAULT_OPENOCD_CONFIG := $(RIOTBASE)/boards/common/cc26xx_cc13xx/dist/openocd_cc13x0.cfg
|
|
endif
|
|
ifneq (,$(filter cc13x2%,$(CPU_MODEL)))
|
|
DEFAULT_OPENOCD_CONFIG := $(RIOTBASE)/boards/common/cc26xx_cc13xx/dist/openocd_cc13x2.cfg
|
|
endif
|
|
ifneq (,$(filter cc26x0%,$(CPU_MODEL)))
|
|
DEFAULT_OPENOCD_CONFIG := $(RIOTBASE)/boards/common/cc26xx_cc13xx/dist/openocd_cc26x0.cfg
|
|
endif
|
|
ifneq (,$(filter cc26x2%,$(CPU_MODEL)))
|
|
DEFAULT_OPENOCD_CONFIG := $(RIOTBASE)/boards/common/cc26xx_cc13xx/dist/openocd_cc26x2.cfg
|
|
endif
|
|
|
|
# if no openocd specific configuration file, check for default locations:
|
|
# 1. Using the default dist/openocd.cfg (automatically set by openocd.sh)
|
|
# 2. Using the common cpu specific config file
|
|
ifeq (,$(OPENOCD_CONFIG))
|
|
# if no openocd default configuration is provided by the board,
|
|
# use the default cc26xx / cc13xx config
|
|
ifeq (0,$(words $(wildcard $(BOARDDIR)/dist/openocd.cfg)))
|
|
OPENOCD_CONFIG := $(DEFAULT_OPENOCD_CONFIG)
|
|
endif
|
|
endif
|