JTAG is a protocol originally created to test
electronic devices (boundary scan). Nowadays it is widely used to configure devices
and to debug embedded systems.
The FT2232H is commonly used to implement JTAG cables. For this reason a lot of
implementations and software are available. Various open hardware JTAG cables are
based on the Amontec JTAGKey, i.e. Opendous.
Initially we though about implementing a plug-in similar to the Opendous channel B.
But we found that all the applications we tried didn't really need it. This is why
we implemented a plug-in that is just a connector, some wires and a few resistors.
JTAG base:
This plug-in can be used with the following software:
We think it can be used with other software and/or operating systems, but the above
mentioned combinations were verified. You'll find information about how to configure
each software following the above links.
As the FT2232H internally supports JTAG, and the above mentioned software can be
configured (or at least fooled ...) this plug-in doesn't need additional electronics.
The configuration depicted in the following schematic was
successfully used in all cases.
There is no standard JTAG connector, so we decided to implement this plug-in using
flying leads:
OpenOCD:
OpenOCD is a free software project. Its name stands for Open On-Chip Debugger and its slogan is "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing". Its strongest point is the in-circuit debug, specially for ARM CPUs. All the test were conducted using Debian GNU/Linux. OpenOCD can be compiled for Mac OSX and Windows, but we didn't verify it. The OpenOCD version used was v0.7.0 (2013-04-09-11:07). The test were conducted using a Beagleboard xM and an Atmel SAM3U-EK. Here we explain how to configure OpenOCD and MILK to work together. All the files mentioned are available in the following ZIP file.
-
To achieve a better integration with OpenOCD we configured MILK's flash memory using
an specific content. In this way OpenOCD can verify if the cable is MILK, and no
other FT2232H based cable.
The content for the memory is in the following file:
eeprom.MilkJTAG_u.
To change the MILK's memory using Debian GNU/Linux you can use the ftdi_eeprom
(ftdi-eeprom package) and the following configuration file
MilkJTAG_u.conf:
$ ftdi_eeprom --flash-eeprom MilkJTAG_u.conf |
-
Then we must configure OpenOCD to recognize our cable. The
milk-basic.cfg file describes the JTAG base
plug-in connected to MILK's channel A and
milk-basic-B.cfg is the same for channel B.
These files must be copied to the OpenOCD's configuration directory (i.e.:
~/.openocd/interface/ftdi/).
-
Once configured you can run OpenOCD selecting our cable, using the -f command line
option. As an example, to use a Beagleboard xM connected to channel B (this is a 1.8 V
JTAG) we use:
$ openocd -f interface/ftdi/milk-basic-B.cfg -f board/ti_beagleboard_xm.cfg |
UrJTAG:
UrJTAG is a free software project. Its name stands for Universal JTAG and its slogan is "Universal JTAG library, server and tools". Its strongest point is the support fot a variety of devices, including FPGAs.. All the test were conducted using Debian GNU/Linux. UrJTAG can be compiled for other UNIXes and Windows, but we didn't verify it. The UrJTAG version used was v0.10+r2007 (Debian). The test were conducted using Xilinx FPGAs, mostly Virtex 4. Using the JTAG base MILK can be used as a JTAGKey cable. To used the channel A you can select the cable like this:
cable jtagkey vid=0x0403 pid=0x6010 |
And for channel B:
cable jtagkey vid=0x0403 pid=0x6010 interface=1 |
Xilinx iMPACT:
Xilinx ISE suite uses the iMPACT tool to configure FPGAs and/or the associated memories. This tool is available for Linux and Windows, but all the tests were conducted using Linux. Modern versions of iMPACT have FT2232H cable support. You can use iMPACT helper. With it we can make iMPACT to detect a parallel cable on LPT2, instead of actually detecting MILK. To achieve it we must configure the driver creating a file named ~/.libusb-driverrc containing:
LPT2 = FTDI:0403:6010
This is for MILK's channel A. If we want to use channel B:
LPT2 = FTDI:0403:6010:2
Using this mechanism we configured Spartan 3E, Spartan 6 and Virtex 4 FPGAs.
This solution doen't need any change on MILK, but the transfer speed isn't the best.
If we want to take the maximum advantage of iMPACT+MILK you can use the Digilent driver
shipped with iMPACT. For this you must clone a Digilent cable or just fool the driver
to think it's using a real Digilent cable. We succeed imitating a Digilent HS1 cable.
For more information about this method please contact us.
|