1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 04:32:52 +01:00
RIOT/boards/common/cc26xx_cc13xx/Makefile.include

50 lines
1.7 KiB
Makefile
Raw Normal View History

# 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
DEFAULT_JLINK_DEVICE := CC13xx
endif
ifneq (,$(filter cc13x2%,$(CPU_MODEL)))
DEFAULT_OPENOCD_CONFIG := $(RIOTBASE)/boards/common/cc26xx_cc13xx/dist/openocd_cc13x2.cfg
DEFAULT_JLINK_DEVICE := CC13xx
endif
ifneq (,$(filter cc26x0%,$(CPU_MODEL)))
DEFAULT_OPENOCD_CONFIG := $(RIOTBASE)/boards/common/cc26xx_cc13xx/dist/openocd_cc26x0.cfg
DEFAULT_JLINK_DEVICE := CC26xx
endif
ifneq (,$(filter cc26x2%,$(CPU_MODEL)))
DEFAULT_OPENOCD_CONFIG := $(RIOTBASE)/boards/common/cc26xx_cc13xx/dist/openocd_cc26x2.cfg
DEFAULT_JLINK_DEVICE := CC26xx
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
JLINK_DEVICE ?= $(DEFAULT_JLINK_DEVICE)
JLINK_IF ?= jtag