bd904b5dd660689f649ca87c30aa234eed1ce59c
[fw/openocd] / tcl / target / pxa270.cfg
1 #Marvell/Intel PXA270 Script
2
3 if { [info exists CHIPNAME] } {
4    set _CHIPNAME $CHIPNAME
5 } else {
6    set _CHIPNAME pxa270
7 }
8
9 if { [info exists ENDIAN] } {
10    set _ENDIAN $ENDIAN
11 } else {
12    set _ENDIAN little
13 }
14
15 #IDs for pxa270. Are there more?
16 if { [info exists CPUTAPID] } {
17    set _CPUTAPID $CPUTAPID
18 } else {
19   # set useful default
20    set _CPUTAPID 0x49265013
21 }
22
23 if { [info exists CPUTAPID2] } {
24    set _CPUTAPID2 $CPUTAPID2
25 } else {
26   # set useful default
27    set _CPUTAPID2 0x79265013
28 }
29
30 if { [info exists CPUTAPID3] } {
31    set _CPUTAPID2 $CPUTAPID3
32 } else {
33   # set useful default
34    set _CPUTAPID3 0x89265013
35 }
36
37 # set adapter srst delay to the delay introduced by your reset circuit
38 # the rest of the needed delays are built into the openocd program
39 adapter srst delay 260
40 # set the jtag_ntrst_delay to the delay introduced by a reset circuit
41 # the rest of the needed delays are built into the openocd program
42 jtag_ntrst_delay 250
43
44 set _TARGETNAME $_CHIPNAME.cpu
45 jtag newtap $_CHIPNAME cpu -irlen 7 -ircapture 0x1 -irmask 0x7f -expected-id $_CPUTAPID -expected-id $_CPUTAPID2 -expected-id $_CPUTAPID3
46
47 target create $_TARGETNAME xscale -endian $_ENDIAN -chain-position $_TARGETNAME
48 # maps to PXA internal RAM. If you are using a PXA255
49 # you must initialize SDRAM or leave this option off
50 $_TARGETNAME configure -work-area-phys 0x5c000000 -work-area-size 0x10000 -work-area-backup 0