add TI TMS570 support scripts
[openocd.git] / tcl / target / ti_tms570.cfg
blob589e9d6cfd0c6c313727ad3367f964f8fff7aa70
1 adapter_khz 1500
3 if { [info exists CHIPNAME] } {
4         set _CHIPNAME $CHIPNAME
5 } else {
6         set _CHIPNAME tms570
9 if { [info exists ENDIAN] } {
10         set _ENDIAN $ENDIAN
11 } else {
12         set _ENDIAN big
15 # TMS570 has an ICEpick-C on which we need the router commands.
16 source [find target/icepick.cfg]
18 # Main DAP
19 if { [info exists DAP_TAPID] } {
20         set _DAP_TAPID $DAP_TAPID
21 } else {
22         set _DAP_TAPID 0x0B8A002F
24 jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID -disable
25 jtag configure $_CHIPNAME.dap -event tap-enable "icepick_c_tapenable $_CHIPNAME.jrc 0"
27 # ICEpick-C (JTAG route controller)
28 if { [info exists JRC_TAPID] } {
29         set _JRC_TAPID $JRC_TAPID
30 } else {
31         set _JRC_TAPID 0x0B8A002F
33 jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f \
34         -expected-id $_JRC_TAPID -ignore-version
35 jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.dap"
36 jtag configure $_CHIPNAME.jrc -event post-reset "runtest 100"
38 # Cortex R4 target
39 set _TARGETNAME $_CHIPNAME.cpu
40 target create $_TARGETNAME cortex_r4 -endian $_ENDIAN \
41         -chain-position $_CHIPNAME.dap -coreid 0 -dbgbase 0x00001003
43 $_TARGETNAME configure -event gdb-attach {
44         cortex_r4 dbginit
45         halt
48 $_TARGETNAME configure -event "reset-assert" {
49         global _CHIPNAME
51         # assert warm system reset through ICEPick
52         icepick_c_wreset $_CHIPNAME.jrc