--- /dev/null
+target remote localhost:3333
+monitor reset
+monitor sleep 500
+monitor poll
+monitor soft_reset_halt
+
+# WDT_MR, disable watchdog
+monitor mww 0xFFFFFD44 0x00008000
+
+# RSTC_MR, enable user reset
+monitor mww 0xfffffd08 0xa5000001
+
+# CKGR_MOR
+monitor mww 0xFFFFFC20 0x00000601
+monitor sleep 10
+
+# CKGR_PLLR
+monitor mww 0xFFFFFC2C 0x00481c0e
+monitor sleep 10
+
+# PMC_MCKR
+monitor mww 0xFFFFFC30 0x00000007
+monitor sleep 10
+
+# PMC_IER
+monitor mww 0xFFFFFF60 0x00480100
+monitor sleep 100
+
+#Remap RAM to address 0
+monitor mww 0xFFFFFF00 0x00000001
+monitor sleep 100
+
+break main
+load
+continue
--- /dev/null
+\r
+# Change the default telnet port...\r
+telnet_port 4444\r
+\r
+# Port for TCL connection.\r
+tcl_port 6666\r
+\r
+# GDB connects here\r
+gdb_port 3333\r
+# GDB can also flash my flash!\r
+gdb_memory_map enable\r
+gdb_flash_program disable\r
+gdb_breakpoint_override soft\r
+\r
+interface ft2232\r
+#ft2232_device_desc "Amontec JTAGkey"\r
+ft2232_layout jtagkey\r
+ft2232_vid_pid 0x0403 0xcff8\r
+\r
+#use combined on interfaces or targets that can't set TRST/SRST separately\r
+reset_config srst_only srst_pulls_trst\r
+\r
+if { [info exists CHIPNAME] } { \r
+ set _CHIPNAME $CHIPNAME \r
+} else { \r
+ set _CHIPNAME sam7\r
+}\r
+\r
+if { [info exists ENDIAN] } { \r
+ set _ENDIAN $ENDIAN \r
+} else { \r
+ set _ENDIAN little\r
+}\r
+\r
+if { [info exists CPUTAPID ] } {\r
+ set _CPUTAPID $CPUTAPID\r
+} else {\r
+ set _CPUTAPID 0x3f0f0f0f\r
+}\r
+\r
+jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID\r
+\r
+set _TARGETNAME [format "%s.cpu" $_CHIPNAME]\r
+target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi\r
+\r
+$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0\r
+\r
+#flash bank <driver> <base> <size> <chip_width> <bus_width>\r
+flash bank at91sam7 0 0 0 0 0\r
--- /dev/null
+\r
+# Change the default telnet port...\r
+telnet_port 4444\r
+\r
+# Port for TCL connection.\r
+tcl_port 6666\r
+\r
+# GDB connects here\r
+gdb_port 3333\r
+# GDB can also flash my flash!\r
+gdb_memory_map enable\r
+gdb_flash_program enable\r
+gdb_breakpoint_override hard\r
+\r
+interface ft2232\r
+#ft2232_device_desc "Amontec JTAGkey"\r
+ft2232_layout jtagkey\r
+ft2232_vid_pid 0x0403 0xcff8\r
+\r
+\r
+#use combined on interfaces or targets that can't set TRST/SRST separately\r
+reset_config srst_only srst_pulls_trst\r
+\r
+if { [info exists CHIPNAME] } { \r
+ set _CHIPNAME $CHIPNAME \r
+} else { \r
+ set _CHIPNAME sam7\r
+}\r
+\r
+if { [info exists ENDIAN] } { \r
+ set _ENDIAN $ENDIAN \r
+} else { \r
+ set _ENDIAN little\r
+}\r
+\r
+if { [info exists CPUTAPID ] } {\r
+ set _CPUTAPID $CPUTAPID\r
+} else {\r
+ set _CPUTAPID 0x3f0f0f0f\r
+}\r
+\r
+jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID\r
+\r
+set _TARGETNAME [format "%s.cpu" $_CHIPNAME]\r
+target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi\r
+\r
+$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0\r
+\r
+#flash bank <driver> <base> <size> <chip_width> <bus_width>\r
+flash bank at91sam7 0 0 0 0 0\r