Skip to content
Snippets Groups Projects
openocd.cfg 972 B
Newer Older
#
# OpenOCD configuration for JTAG debugging on the Kinetis K20.
#
# Use the OpenOCD patch from:
#   https://forum.sparkfun.com/viewtopic.php?f=18&t=36393
#
#   # checkout code from OpenOCD master branch
#   git clone git://git.code.sf.net/p/openocd/code openocd
#
#   # apply patch, this info is given on the gerrit page for the patch.
#   git fetch http://openocd.zylin.com/openocd refs/changes/08/1508/1 && git checkout FETCH_HEAD
#
#   ./bootstrap
#   ./configure --enable-ftdi
#   make
#

source [find interface/ftdi/olimex-arm-usb-ocd-h.cfg]

# Freescale Kinetis K20 device. Should be compatible with K40,
# just set a custom name.
set CHIPNAME k20
source [find target/k40.cfg]

adapter_khz 1000
reset_config srst_only

# Scratch RAM for verify
# XXX: This verify method is broken due to a problem with reset?
# k20.cpu configure -work-area-phys 0x1FFFE000 -work-area-size 16384
# One 128K flash bank
flash bank pflash.0 kinetis 0x00000000 0x20000 0 4 $_TARGETNAME