2 # http://atmel.com/products/at91/
4 reset_config trst_and_srst
6 if { [info exists CHIPNAME] } {
7 set _CHIPNAME $CHIPNAME
9 set _CHIPNAME at91rm9200
12 if { [info exists ENDIAN] } {
18 if { [info exists CPUTAPID ] } {
19 set _CPUTAPID $CPUTAPID
21 set _CPUTAPID 0x05b0203f
24 # Never allow the following!
25 if { $_CPUTAPID == 0x15b0203f } {
26 echo "-------------------------------------------------------"
28 echo "- ERROR: TapID 0x15b0203f is wrong for at91rm9200 -"
29 echo "- ERROR: The chip/board has a JTAG select pin/jumper -"
31 echo "- ERROR: In one position (0x05b0203f) it selects the -"
32 echo "- ERROR: ARM CPU, in the other position (0x1b0203f) -"
33 echo "- ERROR: it selects boundry-scan not the ARM -"
35 echo "-------------------------------------------------------"
38 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
40 # Create the GDB Target.
41 set _TARGETNAME $_CHIPNAME.cpu
42 target create $_TARGETNAME arm920t -endian $_ENDIAN -chain-position $_TARGETNAME
44 # AT91RM9200 has a 16K block of sram @ 0x0020.0000
45 $_TARGETNAME configure -work-area-phys 0x00200000 \
46 -work-area-size 0x4000 -work-area-backup 1
48 # This chip has a DCC ... use it
49 arm7_9 dcc_downloads enable