tcl/stm32l5x|u5x: refactor common tcl code
[fw/openocd] / tcl / target / at91sam7a2.cfg
1
2 if { [info exists CHIPNAME] } {
3    set _CHIPNAME $CHIPNAME
4 } else {
5    set _CHIPNAME at91sam7a2
6 }
7
8 if { [info exists ENDIAN] } {
9    set _ENDIAN $ENDIAN
10 } else {
11    set _ENDIAN little
12 }
13
14 if { [info exists CPUTAPID] } {
15    set _CPUTAPID $CPUTAPID
16 } else {
17    set _CPUTAPID 0x1f0f0f0f
18 }
19
20 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
21 set _TARGETNAME $_CHIPNAME.cpu
22
23 target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME