3 if { [info exists CHIPNAME] } {
4 set _CHIPNAME $CHIPNAME
9 if { [info exists ENDIAN] } {
15 # TMS570 has an ICEpick-C on which we need the router commands.
16 source [find target/icepick.cfg]
19 # DAP_TAPID should be set before source-ing this file
20 if { [info exists DAP_TAPID] } {
21 set _DAP_TAPID $DAP_TAPID
23 jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID -disable
24 jtag configure $_CHIPNAME.dap -event tap-enable "icepick_c_tapenable $_CHIPNAME.jrc 0"
26 # ICEpick-C (JTAG route controller)
27 # JRC_TAPID should be set before source-ing this file
28 if { [info exists JRC_TAPID] } {
29 set _JRC_TAPID $JRC_TAPID
31 jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f \
32 -expected-id $_JRC_TAPID -ignore-version
33 jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.dap"
34 jtag configure $_CHIPNAME.jrc -event post-reset "runtest 100"
37 set _TARGETNAME $_CHIPNAME.cpu
38 target create $_TARGETNAME cortex_r4 -endian $_ENDIAN \
39 -chain-position $_CHIPNAME.dap -coreid 0 -dbgbase 0x00001003
41 # TMS570 uses quirky BE-32 mode
42 $_TARGETNAME dap ti_be_32_quirks 1
44 $_TARGETNAME configure -event gdb-attach {
49 $_TARGETNAME configure -event "reset-assert" {
52 # assert warm system reset through ICEPick
53 icepick_c_wreset $_CHIPNAME.jrc