2017-05-01 11:18:00 +02:00
|
|
|
# set default port depending on operating system
|
|
|
|
PORT_LINUX ?= /dev/ttyACM0
|
2017-05-01 11:47:06 +02:00
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
2017-05-01 11:18:00 +02:00
|
|
|
|
|
|
|
# Use the shared OpenOCD configuration
|
|
|
|
# Using dap or jlink depends on which firmware the OpenSDA debugger is running
|
2019-05-31 11:43:47 +02:00
|
|
|
DEBUG_ADAPTER ?= dap
|
|
|
|
#DEBUG_ADAPTER ?= jlink
|
2017-05-01 11:18:00 +02:00
|
|
|
|
|
|
|
# Configuration for OpenOCD v0.10.0 and newer
|
2019-10-16 14:53:42 +02:00
|
|
|
# For KW41Z, an OpenOCD version built from source is required. The support for
|
|
|
|
# kw41z was introduced in
|
|
|
|
# https://github.com/ntfreak/openocd/2c8602ed9f084d6680cec7d0ca1d5dc71c865a5f
|
2020-02-22 11:33:19 +01:00
|
|
|
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/frdm/dist/openocd-$(CPU_FAMILY).cfg
|
2017-05-01 11:18:00 +02:00
|
|
|
|
|
|
|
# Check the flash configuration field before flashing
|
2019-05-27 17:38:46 +02:00
|
|
|
export PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh
|
2017-05-01 11:18:00 +02:00
|
|
|
|
|
|
|
# setup serial terminal
|
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
|
2019-03-04 14:31:41 +01:00
|
|
|
# The board can become un-flashable after some execution,
|
|
|
|
# use connect_assert_srst to always be able to flash or reset the board.
|
2020-02-24 10:26:14 +01:00
|
|
|
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
2019-03-04 14:31:41 +01:00
|
|
|
|
2017-05-01 11:18:00 +02:00
|
|
|
# this board uses openocd
|
|
|
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|