openocd/tcl/target/ti_cc3220sf.cfg
Antonio Borneo e6505b0489 tcl/target: add SPDX tag
For historical reasons, no license information was added to the
tcl files. This makes trivial adding the SPDX tag through script:
	fgrep -rL SPDX tcl/ target| while read a;do \
	sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n
	}' $a;done

With no specific license information from the author, let's extend
the OpenOCD project license GPL-2.0-or-later to the files.

Change-Id: I7b2610300b24cccd07bfa6fb5f1266970d5d3a1b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7027
Tested-by: jenkins
2022-06-24 21:53:35 +00:00

43 lines
1.1 KiB
INI

# SPDX-License-Identifier: GPL-2.0-or-later
#
# Texas Instruments CC3220SF - ARM Cortex-M4
#
# http://www.ti.com/CC3220SF
#
source [find target/swj-dp.tcl]
source [find target/icepick.cfg]
source [find target/ti_cc32xx.cfg]
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME cc3220sf 0 0 0 0 $_TARGETNAME
#
# On CC32xx family of devices, sysreqreset is disabled, and vectreset is
# blocked by the boot loader (stops in a while(1) statement). srst reset can
# leave the target in a state that prevents debug. The following uses the
# soft_reset_halt command to reset and halt the target. Then the PC and stack
# are initialized from internal flash. This allows for a more reliable reset,
# but with two caveats: it only works for the SF variant that has internal
# flash, and it only resets the CPU and not any peripherals.
#
proc ocd_process_reset_inner { MODE } {
soft_reset_halt
# Initialize MSP, PSP, and PC from vector table at flash 0x01000800
set boot [read_memory 0x01000800 32 2]
reg msp [lindex $boot 0]
reg psp [lindex $boot 0]
reg pc [lindex $boot 1]
if { 0 == [string compare $MODE run ] } {
resume
}
cc32xx.cpu invoke-event reset-end
}