2020-11-19 18:38:41 +01:00
|
|
|
# Use OpenOCD by default
|
|
|
|
PROGRAMMER ?= openocd
|
|
|
|
|
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
|
2021-02-18 17:15:55 +01:00
|
|
|
OPENOCD_DEBUG_ADAPTER ?= dap
|
|
|
|
#OPENOCD_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-07-01 14:07:42 +02:00
|
|
|
ifeq ($(CPU_CORE), cortex-m0plus)
|
|
|
|
OPENOCD_KINETIS_FAMILY = klx
|
|
|
|
else
|
|
|
|
OPENOCD_KINETIS_FAMILY = kx
|
|
|
|
endif
|
|
|
|
|
|
|
|
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/frdm/dist/openocd-$(OPENOCD_KINETIS_FAMILY).cfg
|
2017-05-01 11:18:00 +02:00
|
|
|
|
|
|
|
# Check the flash configuration field before flashing
|
2021-02-18 18:18:54 +01:00
|
|
|
OPENOCD_PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh
|
2017-05-01 11:18:00 +02:00
|
|
|
|
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
|
2021-02-11 14:45:17 +01:00
|
|
|
|
|
|
|
# openocd programmer is supported with FRDM boards
|
|
|
|
PROGRAMMERS_SUPPORTED += openocd
|