diff --git a/boards/common/frdm/Makefile.include b/boards/common/frdm/Makefile.include index 8a90d4149c..7769a8e6ed 100644 --- a/boards/common/frdm/Makefile.include +++ b/boards/common/frdm/Makefile.include @@ -7,24 +7,10 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) DEBUG_ADAPTER ?= dap #DEBUG_ADAPTER ?= jlink -# OpenOCD v0.10.0 and newer have built-in support for disabling the Kinetis -# watchdog automatically. Some older releases of Ubuntu and Debian have only -# version 0.9.0 or earlier OpenOCD packages (Ubuntu 17.04, Debian Jessie) -# Set this to 1 if you are using one of these older releases. -USE_OLD_OPENOCD ?= 0 - -ifeq (1,$(USE_OLD_OPENOCD)) -# We need special handling of the watchdog if we want to speed up the flash -# verification by using the MCU to compute the image checksum after flashing. -# wdog-disable.bin is a precompiled binary which will disable the watchdog and -# return control to the debugger (OpenOCD) -export OPENOCD_PRE_VERIFY_CMDS += \ - -c 'load_image $(RIOTCPU)/$(CPU)/dist/wdog-disable.bin 0x20000000 bin' \ - -c 'resume 0x20000000' -export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/frdm/dist/old-openocd-$(CPU_FAMILY).cfg -endif - # Configuration for OpenOCD v0.10.0 and newer +# For KW41Z, an OpenOCD version built from source is required. The support for +# kw41z was introduced in +# https://github.com/ntfreak/openocd/2c8602ed9f084d6680cec7d0ca1d5dc71c865a5f export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/frdm/dist/openocd-$(CPU_FAMILY).cfg # Check the flash configuration field before flashing diff --git a/boards/common/frdm/dist/old-openocd-kx.cfg b/boards/common/frdm/dist/old-openocd-kx.cfg deleted file mode 100644 index 72ef312804..0000000000 --- a/boards/common/frdm/dist/old-openocd-kx.cfg +++ /dev/null @@ -1,46 +0,0 @@ -# -# Freescale Kinetis Kxx devices when using old OpenOCD versions (<0.10.0) -# -source [find target/swj-dp.tcl] - -if { [info exists CHIPNAME] } { - set _CHIPNAME $CHIPNAME -} else { - set _CHIPNAME kx -} - -if { [info exists CPUTAPID] } { - set _CPUTAPID $CPUTAPID -} else { - set _CPUTAPID 0x2ba01477 -} - -set _TARGETNAME $_CHIPNAME.cpu - -swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID - -target create $_TARGETNAME cortex_m -chain-position $_CHIPNAME.cpu - -$_CHIPNAME.cpu configure -event examine-start { puts "START..." ; } - -# It is important that "kinetis mdm check_security" is called for -# 'examine-end' event and not 'eximine-start'. Calling it in 'examine-start' -# causes "kinetis mdm check_security" to fail the first time openocd -# calls it when it tries to connect after the CPU has been power-cycled. -$_CHIPNAME.cpu configure -event examine-end { - kinetis mdm check_security -} - -$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x1000 -work-area-backup 0 - -flash bank $_CHIPNAME.flash kinetis 0 0 0 0 $_TARGETNAME - -cortex_m reset_config sysresetreq -#reset_config srst_only srst_nogate connect_assert_srst - -adapter_khz 1000 - -$_TARGETNAME configure -event gdb-attach { - halt -} -$_TARGETNAME configure -rtos auto