1 # Change the default telnet port...
4 # Port for TCL connection.
12 ft2232_device_desc "Amontec JTAGkey"
14 ft2232_vid_pid 0x0403 0xcff8
17 #use combined on interfaces or targets that can't set TRST/SRST separately
18 reset_config srst_only srst_pulls_trst
20 if { [info exists CHIPNAME] } {
21 set _CHIPNAME $CHIPNAME
26 if { [info exists ENDIAN] } {
32 if { [info exists CPUTAPID ] } {
33 set _CPUTAPID $CPUTAPID
35 set _CPUTAPID 0x3f0f0f0f
38 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
40 set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
41 target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi
43 $_TARGETNAME configure -event reset-start {
45 mww 0xfffffd44 0x00008000
47 mww 0xfffffd08 0xa5000001
48 # CKGR_MOR : enable the main oscillator
49 mww 0xfffffc20 0x00000601
51 # CKGR_PLLR: 96.1097 MHz
52 mww 0xfffffc2c 0x00481c0e
54 # PMC_MCKR : MCK = PLL / 2 ~= 48 MHz
55 mww 0xfffffc30 0x00000007
57 # MC_FMR: flash mode (FWS=1,FMCN=60)
58 mww 0xffffff60 0x003c0100
64 $_TARGETNAME configure -event gdb-detach {
68 $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0
70 #flash bank <driver> <base> <size> <chip_width> <bus_width>
71 flash bank at91sam7 0 0 0 0 0