aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2014-06-20 14:48:05 +0400
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-06-28 09:37:05 +0000
commite2a7990aacefa20507c89831019659d3a6e222eb (patch)
tree57b527dbe119b793e5105e98b3efd6c936aa4a56
parentbf96df255ea86f2bcb1cabb78c80ce080ead0456 (diff)
downloadriscv-openocd-e2a7990aacefa20507c89831019659d3a6e222eb.zip
riscv-openocd-e2a7990aacefa20507c89831019659d3a6e222eb.tar.gz
riscv-openocd-e2a7990aacefa20507c89831019659d3a6e222eb.tar.bz2
tcl/interface/ftdi: add SWD configs for kt-link, olimex, rowley and resistor hack
Resistor hack is runtime-tested, other configs are based on schematics. Change-Id: I8daffa0434cd41d142fbec7c230a302284f7aa31 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2184 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
-rw-r--r--tcl/interface/ftdi/kt-link.cfg2
-rw-r--r--tcl/interface/ftdi/olimex-arm-jtag-swd.cfg7
-rw-r--r--tcl/interface/ftdi/rowley-cc-arm-swd.cfg8
-rw-r--r--tcl/interface/ftdi/swd-resistor-hack.cfg7
4 files changed, 24 insertions, 0 deletions
diff --git a/tcl/interface/ftdi/kt-link.cfg b/tcl/interface/ftdi/kt-link.cfg
index 4091cfa..1f28d3a 100644
--- a/tcl/interface/ftdi/kt-link.cfg
+++ b/tcl/interface/ftdi/kt-link.cfg
@@ -12,3 +12,5 @@ ftdi_layout_init 0x8c28 0xff3b
ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
ftdi_layout_signal LED -data 0x8000
+ftdi_layout_signal SWD_EN -ndata 0x0020 -oe 0x2000
+ftdi_layout_signal SWDIO_OE -ndata 0x1000
diff --git a/tcl/interface/ftdi/olimex-arm-jtag-swd.cfg b/tcl/interface/ftdi/olimex-arm-jtag-swd.cfg
new file mode 100644
index 0000000..ee7cdae
--- /dev/null
+++ b/tcl/interface/ftdi/olimex-arm-jtag-swd.cfg
@@ -0,0 +1,7 @@
+#
+# Olimex ARM JTAG SWD adapter
+# https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-SWD/
+#
+
+ftdi_layout_signal SWD_EN -nalias nTRST
+ftdi_layout_signal SWDIO_OE -alias TMS
diff --git a/tcl/interface/ftdi/rowley-cc-arm-swd.cfg b/tcl/interface/ftdi/rowley-cc-arm-swd.cfg
new file mode 100644
index 0000000..579561e
--- /dev/null
+++ b/tcl/interface/ftdi/rowley-cc-arm-swd.cfg
@@ -0,0 +1,8 @@
+#
+# Rowley ARM SWD Adapter
+# http://sites.fastspring.com/rowley/product/armswdadapter
+# https://drive.google.com/file/d/0Bzv7UpKpOQhnTUNNdzI5OUR4WGs/edit?usp=sharing
+#
+
+ftdi_layout_signal SWD_EN -nalias nTRST
+ftdi_layout_signal SWDIO_OE -alias TMS
diff --git a/tcl/interface/ftdi/swd-resistor-hack.cfg b/tcl/interface/ftdi/swd-resistor-hack.cfg
new file mode 100644
index 0000000..a6f3a26
--- /dev/null
+++ b/tcl/interface/ftdi/swd-resistor-hack.cfg
@@ -0,0 +1,7 @@
+#
+# Connect TDI to SWDIO via a suitable series resistor (220-470 Ohm or
+# so depending on the drive capability of the target and adapter);
+# connect TDO directly to SWDIO.
+#
+
+ftdi_layout_signal SWD_EN -data 0