tcl/target: add SPDX tag
[fw/openocd] / tcl / target / at91r40008.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 # AT91R40008 target configuration file
4
5 # TRST is tied to SRST on the AT91X40 family.
6 reset_config srst_only srst_pulls_trst
7
8
9 if {[info exists CHIPNAME]} {
10    set _CHIPNAME $CHIPNAME
11 } else {
12    set _CHIPNAME at91r40008
13 }
14
15 if { [info exists ENDIAN] } {
16    set _ENDIAN $ENDIAN
17 } else {
18    set _ENDIAN little
19 }
20
21 # Setup the JTAG scan chain.
22 if { [info exists CPUTAPID] } {
23    set _CPUTAPID $CPUTAPID
24 } else {
25    set _CPUTAPID 0x1f0f0f0f
26 }
27 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
28
29 set _TARGETNAME $_CHIPNAME.cpu
30 target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME
31 $_TARGETNAME configure -work-area-phys 0x20000 -work-area-size 0x20000 -work-area-backup 0