target/adi_v5_swd: move setting of do_reconnect one level up
[openocd.git] / tcl / target / str730.cfg
blob57681f9fcc94ae1e3e2451322c8ffaa2258fd89c
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 #STR730 CPU
5 adapter speed 3000
7 if { [info exists CHIPNAME] } {
8    set _CHIPNAME $CHIPNAME
9 } else {
10    set _CHIPNAME str730
13 if { [info exists ENDIAN] } {
14    set _ENDIAN $ENDIAN
15 } else {
16    set _ENDIAN little
19 if { [info exists CPUTAPID] } {
20    set _CPUTAPID $CPUTAPID
21 } else {
22    set _CPUTAPID 0x3f0f0f0f
25 #use combined on interfaces or targets that can't set TRST/SRST separately
26 reset_config trst_and_srst srst_pulls_trst
28 #jtag scan chain
29 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID
31 #jtag nTRST and nSRST delay
32 adapter srst delay 500
33 jtag_ntrst_delay 500
35 set _TARGETNAME $_CHIPNAME.cpu
36 target create $_TARGETNAME arm7tdmi -endian little -chain-position 0
38 $_TARGETNAME configure -event reset-start { adapter speed 10 }
39 $_TARGETNAME configure -event reset-init {
40         adapter speed 3000
42 # Because the hardware cannot be interrogated for the protection state
43 # of sectors, initialize all the sectors to be unprotected. The initial
44 # state is reflected by the driver, too.
45         flash protect 0 0 last off
47 $_TARGETNAME configure -event gdb-flash-erase-start {
48         flash protect 0 0 7 off
51 $_TARGETNAME configure -work-area-phys 0xA0000000 -work-area-size 0x4000 -work-area-backup 0
53 #flash bank <driver> <base> <size> <chip_width> <bus_width>
54 set _FLASHNAME $_CHIPNAME.flash
55 flash bank $_FLASHNAME str7x 0x80000000 0x00040000 0 0 $_TARGETNAME STR73x