summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Tymoshenko <gonzo@bluezbox.com>2010-08-15 21:55:17 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-08-15 21:56:41 +0200
commitc54c323cf3b6b26c9d27d8bc4237daca4ba18e66 (patch)
tree2d8f6ba8b747705661f2a60c6234556a5bd4fd07
parentd23428a47f28e6028bc8608540cfbc7da2723a18 (diff)
downloadopenocd_libswd-c54c323cf3b6b26c9d27d8bc4237daca4ba18e66.tar.gz
openocd_libswd-c54c323cf3b6b26c9d27d8bc4237daca4ba18e66.tar.bz2
openocd_libswd-c54c323cf3b6b26c9d27d8bc4237daca4ba18e66.tar.xz
openocd_libswd-c54c323cf3b6b26c9d27d8bc4237daca4ba18e66.zip
avr32: basic target script
-rw-r--r--tcl/target/avr32.cfg18
1 files changed, 18 insertions, 0 deletions
diff --git a/tcl/target/avr32.cfg b/tcl/target/avr32.cfg
new file mode 100644
index 00000000..7fe98b2c
--- /dev/null
+++ b/tcl/target/avr32.cfg
@@ -0,0 +1,18 @@
+set _CHIPNAME avr32
+set _ENDIAN big
+
+# force an error till we get a good number
+set _CPUTAPID 0x21e8203f
+
+jtag_nsrst_delay 100
+jtag_ntrst_delay 100
+
+reset_config trst_and_srst separate
+
+# jtag scan chain
+# format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag newtap $_CHIPNAME cpu -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id $_CPUTAPID
+
+set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
+target create $_TARGETNAME avr32_ap7k -endian $_ENDIAN -chain-position $_TARGETNAME
+