1 # SPDX-License-Identifier: GPL-2.0-or-later
4 # Texas Instruments CC32xx - ARM Cortex-M4
6 # http://www.ti.com/product/CC3200
7 # http://www.ti.com/product/CC3220
10 source [find target/swj-dp.tcl]
11 source [find target/icepick.cfg]
13 if { [info exists CHIPNAME] } {
14 set _CHIPNAME $CHIPNAME
22 if { [info exists DAP_TAPID] } {
23 set _DAP_TAPID $DAP_TAPID
26 set _DAP_TAPID 0x4BA00477
28 set _DAP_TAPID 0x2BA01477
33 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID -disable
34 jtag configure $_CHIPNAME.cpu -event tap-enable "icepick_c_tapenable $_CHIPNAME.jrc 0"
36 swj_newdap $_CHIPNAME cpu -expected-id $_DAP_TAPID
40 # ICEpick-C (JTAG route controller)
42 if { [info exists JRC_TAPID] } {
43 set _JRC_TAPID $JRC_TAPID
45 set _JRC_TAPID 0x0B97C02F
49 jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f -expected-id $_JRC_TAPID -ignore-version
50 jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.cpu"
53 set _TARGETNAME $_CHIPNAME.cpu
54 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
55 target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
57 if { [info exists WORKAREASIZE] } {
58 set _WORKAREASIZE $WORKAREASIZE
60 set _WORKAREASIZE 0x2000
63 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0