mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
e2d49b43e9
OpenOCD 0.9.0 added a definition of a single flash bank as "$_CHIPNAME.flash" (the chip has two flash banks), the new flash bank definitions are enclosed in catch statements to avoid startup errors. The original configuration when combined with openocd 0.9.0 caused an error during flash probing (which happens during GDB connect), because of three defined flash banks, which made openocd drop the GDB connection.
65 lines
2.0 KiB
Plaintext
65 lines
2.0 KiB
Plaintext
#
|
|
# Mulle programming board.
|
|
#
|
|
# The Mulle programming board uses a FTDI FT2232H chip for USB UART and JTAG
|
|
# combined functionality.
|
|
#
|
|
|
|
# Reduce this if you are having problems with losing connection to the Mulle
|
|
adapter_khz 1000
|
|
|
|
# JTAG interface configuration
|
|
|
|
interface ftdi
|
|
ftdi_device_desc "Mulle Programmer v0.70"
|
|
ftdi_vid_pid 0x0403 0x6010
|
|
|
|
ftdi_channel 1
|
|
ftdi_layout_init 0x0008 0x005b
|
|
|
|
# These are the pins that are used for SRST and TRST. Active LOW on programmer
|
|
# boards v0.70 and up (used to be active HIGH)
|
|
ftdi_layout_signal nTRST -data 0x0010
|
|
ftdi_layout_signal nSRST -data 0x0040
|
|
|
|
# In the eyes of OpenOCD, the reset signal is push-pull, because of the hardware
|
|
# design however, it is actually open drain.
|
|
# The trst pin can only be used if the MCU has been configured by setting the
|
|
# correct pin multiplexing function on the TRST pin (PTA5).
|
|
# If you have configured the TRST pin correctly you can change srst_only to
|
|
# trst_and_srst
|
|
reset_config srst_only srst_push_pull srst_gates_jtag
|
|
|
|
# MCU
|
|
gdb_memory_map enable
|
|
gdb_flash_program enable
|
|
|
|
source [find target/k60.cfg]
|
|
|
|
#
|
|
# Bank definition for the 'program flash' (instructions and/or data)
|
|
# OpenOCD 0.9.0 has a definition of the first flash bank in target/kx.cfg, but
|
|
# not OpenOCD 0.8.0 and earlier.
|
|
#
|
|
catch {flash bank $_CHIPNAME.flash kinetis 0 0 0 0 $_TARGETNAME}
|
|
catch {flash bank $_CHIPNAME.flash2 kinetis 0 0 0 0 $_TARGETNAME}
|
|
|
|
# Work-area is a space in RAM used for flash programming
|
|
# By default use 4 kB
|
|
if { [info exists WORKAREASIZE] } {
|
|
set _WORKAREASIZE $WORKAREASIZE
|
|
} else {
|
|
set _WORKAREASIZE 0x1000
|
|
}
|
|
|
|
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
|
|
|
|
# The following section makes new gdb connections cause the MCU to do a system
|
|
# reset, in order to be in a known state.
|
|
# Comment this out in order to be able to debug an already started program.
|
|
$_TARGETNAME configure -event gdb-attach {
|
|
echo "Resetting because of gdb-attach event..."
|
|
# To make flash probe and gdb load to flash work we need a reset init.
|
|
reset init
|
|
}
|