--- /dev/null
+# for avr\r
+\r
+ set _CHIPNAME avr\r
+ set _ENDIAN little\r
+\r
+# jtag speed\r
+jtag_khz 4500\r
+\r
+reset_config srst_only\r
+jtag_nsrst_delay 100\r
+\r
+#jtag scan chain\r
+if { [info exists CPUTAPID ] } {\r
+ set _CPUTAPID $CPUTAPID\r
+} else {\r
+ set _CPUTAPID 0x8970203F\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 avr -endian $_ENDIAN -chain-position $_TARGETNAME\r
+\r
+#$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0\r
+\r
+flash bank avr 0 0 0 0 0\r
+\r
+#to use it, script will be like:\r
+#init\r
+#jtag_khz 4500\r
+#reset init\r
+#verify_ircapture disable\r
+#\r
+#halt\r
+#wait halt\r
+#poll\r
+#avr mass_erase 0\r
+#flash write_image E:/Versaloon/Software/CAMERAPROTOCOLAGENT.hex\r
+#reset run\r
+#shutdown\r
+#\r
+# For more information about the configuration files, take a look at:\r
+# openocd.texi\r