Support for AMONTEC-compatible JTAG cables in Advanced Debug System


Advanced Debug System is a project that enables debugging capabilities in the OpenRISC architecture.
It is used mainly in the MinSoC project.

Advanced Debug System supports a variety of cables, including those based the on FT2232 chip.
However, the program didn’t seem to work with an AMONTEC ARM JTAG cable.
AMONTEC established a standard followed by other manufacturers and there are many inexpensive AMONTEC-compatible cables used for ARM microcontrollers.

After some research we identified the problem: the AMONTEC cable has an additional line, called JTAG_OE_N, which needs to be driven low.
Here is a small patch that enables the JTAG_OE_N signal.

--- A/cable_ft2232.c    2011-08-24 11:19:46.042680534 +0200
+++ B/cable_ft2232.c    2011-08-24 11:19:58.003648945 +0200
@@ -824,7 +824,7 @@

     buf[0]= SET_BITS_LOW;
     buf[1]= 0x00;
-    buf[2]= 0x0b;
+    buf[2]= 0x1b;
     buf[3]= TCK_DIVISOR;
     buf[4]= 0x01;
     buf[5]= 0x00;

Please note that you may also need to adjust the product id to match your cable.
The product id is hardcoded in the cable_ft2232.c file:

usbconn_cable_t usbconn_ft2232_mpsse_CableID2 = {
  "CableID2",         /* cable name */
  "CableID2",         /* string pattern, not used */
  "ftdi-mpsse",       /* default usbconn driver */
  0x0403,             /* VID */
  0x6010              /* PID */

The product id can be read by issuing the lsusb command. In our case, we had to change 0x6010 to 0xCFF8 as we are using an And-Tech ARM JTAG cable.

Hope it helps!