1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/frdm: remove OpenOCD < 0.10 specific code

OpenOCD 0.10 is out from early 2017, all stable Linux distros provide this version now.
This commit is contained in:
Alexandre Abadie 2019-10-16 14:49:01 +02:00
parent eebf3709db
commit f81baf2bf6
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 0 additions and 63 deletions

View File

@ -7,23 +7,6 @@ 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
export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/frdm/dist/openocd-$(CPU_FAMILY).cfg

View File

@ -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