David Brownell <david-b@pacbell.net> "set _TARGETNAME ..." cleanup
[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. Choose one. Are there others?#
16 #set CPUTAPID 0x79265013
17 #set CPUTAPID 0x49265013
18 if { [info exists CPUTAPID ] } {
19    set _CPUTAPID $CPUTAPID
20 } else {
21   # force an error till we get a good number
22    set _CPUTAPID 0xffffffff
23 }
24
25
26 # set jtag_nsrst_delay to the delay introduced by your reset circuit
27 # the rest of the needed delays are built into the openocd program
28 jtag_nsrst_delay 260
29 # set the jtag_ntrst_delay to the delay introduced by a reset circuit
30 # the rest of the needed delays are built into the openocd program
31 jtag_ntrst_delay 0
32
33 set _TARGETNAME $_CHIPNAME.cpu
34 jtag newtap $_CHIPNAME cpu -irlen 7 -ircapture 0x1 -irmask 0x7f -expected-id $_CPUTAPID
35
36 target create $_TARGETNAME xscale -endian $_ENDIAN -chain-position $_TARGETNAME -variant pxa27x
37 # maps to PXA internal RAM. If you are using a PXA255
38 # you must initialize SDRAM or leave this option off
39 $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x5c000000 -work-area-size 0x10000 -work-area-backup 0