mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
90abf7c9a1
This allows to reliably select the TTY of a connected HiFive board even when multiple boards are connected, provided `MOST_RECENT_PORT=1` is set.
30 lines
976 B
Makefile
30 lines
976 B
Makefile
PROGRAMMERS_SUPPORTED += jlink openocd
|
|
|
|
# OpenOCD parameters
|
|
OPENOCD_DEBUG_ADAPTER := jlink
|
|
OPENOCD_TRANSPORT := jtag
|
|
OPENOCD_PRE_FLASH_CMDS += "-c flash protect 0 1 last off"
|
|
|
|
# setup JLink for flashing
|
|
JLINK_DEVICE := FE310
|
|
JLINK_IF := JTAG
|
|
FLASH_ADDR := 0x20010000
|
|
|
|
# keep name of `JLINK` in sync with script jlink.sh in $(RIOTTOOLS)/jlink
|
|
# Default to J-Link as programmer when installed, otherwise go for OpenOCD
|
|
JLINK ?= JLinkExe
|
|
ifneq (,$(shell command -v $(JLINK)))
|
|
PROGRAMMER ?= jlink
|
|
else
|
|
PROGRAMMER ?= openocd
|
|
endif
|
|
|
|
# If port selection via ttys.py is enabled by `MOST_RECENT_PORT=1`, filter
|
|
# USB serials to only select the first UART bridge of integrated J-Link
|
|
# debugger (that identifies as "HiFive" as model). Use --iface-num 2 to select
|
|
# the UART bridge to the ESP32-SOLO-1 MCU instead of the FE310 MCU on the board.
|
|
TTY_BOARD_FILTER := --model HiFive --iface-num 0
|
|
|
|
TESTRUNNER_RESET_DELAY = 1
|
|
$(call target-export-variables,test,TESTRUNNER_RESET_DELAY)
|