tcl/target: add SPDX tag
[fw/openocd] / tcl / target / c100.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 # c100 config.
4 # This is ARM1136 dual core
5 # this script only configures one core (that is used to run Linux)
6
7 # assume no PLL lock, start slowly
8 adapter speed 100
9
10 if { [info exists CHIPNAME] } {
11    set _CHIPNAME $CHIPNAME
12 } else {
13    set _CHIPNAME c100
14 }
15
16 if { [info exists ENDIAN] } {
17    set _ENDIAN $ENDIAN
18 } else {
19    set _ENDIAN little
20 }
21
22 if { [info exists CPUTAPID] } {
23    set _CPUTAPID $CPUTAPID
24 } else {
25    set _CPUTAPID 0x27b3645b
26 }
27
28 if { [info exists DSPTAPID] } {
29    set _DSPTAPID $DSPTAPID
30 } else {
31    set _DSPTAPID 0x27b3645b
32 }
33
34 jtag newtap $_CHIPNAME dsp -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_DSPTAPID
35
36
37 # Per ARM: DDI0211J_arm1136_r1p5_trm.pdf - the ARM 1136 as a 5 bit IR register
38 jtag newtap $_CHIPNAME cpu -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUTAPID
39
40 set _TARGETNAME $_CHIPNAME.cpu
41 target create $_TARGETNAME arm11 -endian $_ENDIAN -chain-position $_TARGETNAME
42
43 # C100's ARAM 64k SRAM
44 $_TARGETNAME configure -work-area-phys 0x0a000000 -work-area-size 0x10000 -work-area-backup 0