Floss-JTAG
From OpenPilot Project
Contents |
[edit] Introduction
The Floss-JTAG concept was developed by Piotr Esden-Tempski as a compact, JTAG interface to enable code upload and hardware debugging for ARM Micro-Controllers in conjunction with the OpenOCD project.
Originally the OpenPilot project used a variation of Esden's design for a short while however, due to feedback, cost and assembly issues this was replaced by a brand new design from Rowan Taubitz. The new design is simpler, more cost effective and adds additional features such as an EEPROM to allow the use of multiple JTAGs on the same PC.
Despite its size and low cost, the Floss-JTAG is extremely capable and unlike most other JTAG interfaces it has also been designed so that it has 5V from the USB port broken out on to a separate connector. Using a cable from this connector is is possible to provide 5V power to the board being debugged. Hence the need for a second USB just for power or a battery is eliminated when this cable is used, additionally the Floss-JTAG and your USB port are protected by a 500ma resettable fuse.
The second serial port provided by the FT2232D is also broken out to a JST-SH connector on the Floss-JTAG; this means that as well a providing a dedicated JTAG port and 5V power, a dedicated serial port is also provided whilst still just using a single USB port. These features are why we built our own JTAG interface over all the others for the OpenPilot project and why we decided to make them available to the community in the OpenPilot Store as cheap as possible.
The Floss-JTAG supports all ARM Micro-Controllers targets supported by OpenOCD and is the JTAG we recommend for OpenPilot development.
[edit] Features
- 5th Generation Future Technologies architecture.
- High Speed USB 2.0 device with low latency.
- J-TAG port with new standard 10 pin Micro JTAG connector.
- Dedicated RS232 serial port.
- Provides 5V (Up to 500ma) power, protected by resettable fuse.
- Professionally designed Compact 2 layer PCB.
- Extensive platform support: Linux, Macintosh and Windows both 32bit and 64 bit.
- OpenOCD support with both Open Source and proprietary access libraries.
- Ready to go floss-jtag.cfg included with OpenOCD.
- Open hardware design with schematics, Altium files and BOM available.
[edit] OpenOCD Set Up
OpenOCD is the On-Chip Debugger, it is an GPL licensed software interface to JTAG hardware debugging devices. It can be used for code uploading and step by step debugging on many ARM based devices including the OpenPilot board.
As of version 4.0 of OpenOCD, native support for the Floss-JTAG is included by use of the floss-jtag.cfg file.
[edit] Connection Direction
It is important to plug the Floss-JTAG in the correct direction. There are two revisions (revA and revB).
- Rev A: TODO: Could someone update how to plug in revA - ideally with photo - so I don't risk making a mistake
- Rev B:
- To programm the OP Mainboard, plug this board in with body of the programmer board oriented away from the main board
- To program AHRS... TODO
[edit] License Issues with Windows
A lot of JTAG interfaces aimed at the hobbyist market contain a variant of the FT2232 chip-set from FTDI, the Windows drivers for this chip-set are proprietary and closed source, as such they are incompatible with the GPL license that OpenOCD is released under. What this means is that compiled binaries that link against these drivers can not legally be distributed, fortunately there are Free software alternatives to these drivers but unfortunately, at the time of writing, they are much slower that their closed source counterparts.
Depending on how much work you intend to do with your JTAG interface, this may or may not be an issue. This speed issue is only a problem on Windows platforms, if you are developing on either the Linux or Mac platform, the Open Source drivers have no speed issue. Below are listed the options to obtain OpenOCD for each platform.
[edit] Windows x86 (32 Bit)
As stated above there are two options, FTDI proprietary drivers & the Open Source drivers. Currently the Open Source drivers are slower but much easier to install as pre-compiled binaries are available from http://www.freddiechopin.info/.
For steps on compiling OpenOCD with the FTDI proprietary drivers, see the OpenOCD Compile on x86 page.
[edit] Windows x64 (64 Bit)
At the time of writing, there are no stable pre-compiled Open Source binaries available for Windows x64, however, this situation is likely to change so it is advisable to check http://www.freddiechopin.info/ for a 64bit Windows OpenOCD pre-compiled version if the slower Open Source drivers meet your requirements. If no stable 64bit pre-compiled version yet exists or these do not suit your needs, we have written a page that describes detailed steps to compile OpenOCD on X64 Windows with the faster propriety drivers.
For full steps please see the OpenOCD Compile on x64 page.
[edit] Mac
Using MacPorts it is easy to install OpenOCD on a Mac:
sudo port install openocd
See Software Development on Mac for more details about disabling the built in driver that will take over the Floss-JTAG. You can also manually compile and build OpenOCD and select between the open and proprietary driver as well.
[edit] Linux
The Linux kernel contains device drivers for the FTDI chipset used in the Floss-JTAG, unlike Windows the Linux kernel version is just as fast the the proprietary drivers. OpenOCD should also be available in the package management platform of your distribution, for example on Debian based distros including Ubuntu, it is installed as follows:
apt-get install openocd
It is possible the OpenOCD version packaged with some distros are a bit outdated and you need at least OpenOCD 4.0. If your distro unludes and older version, to install OpenOCD 4.0 on Ubuntu or Debian, just do the following:
# Install all build dependencies for openocd (including libftdi development package) sudo apt-get build-dep openocd # Download latest OpenOCD (http://sourceforge.net/projects/openocd/files/) and untar it in your home folder wget http://sourceforge.net/projects/openocd/files/openocd/0.4.0/openocd-0.4.0.tar.bz2/download tar -xvjf openocd-0.4.0.tar.bz2 cd openocd-0.4.0/ # Configure will detect your config and check that you have everything installed ./configure --enable-ft2232_libftdi # Build and install make && sudo make install
[edit] Open Hardware
Floss-JTAG is an open design covered by the Creative Commons CC-BY-SA 3.0 license, below you can download the files used for the construction of the OpenPilot version of the Floss-JTAG interface.
Below here is outdated, do not use. This section will be updated shortly with the ALtium files and new BOM.
The parts required to build the interface are listed in the Bill of Materials section below.
The BOM has been designed so that all parts can be purchased from the large component suppliers such as Digi-key.
[edit] Bill of Materials
This is the bill of materials as used for the OpenPilot version of the Floss-JTAG.
| Quantity | Device | Footprint | Value | Comments |
|---|---|---|---|---|
| 1 | FT2232HL | LQFP64 | — | IC1 |
| 1 | LM1117 V-Reg | SOT223 | 3.3V | IC2 |
| 1 | M50-3000545 | 53261-08 | — | JTAG1 |
| 1 | Serial/Power Connector | SM04B-SRSS-TB | — | CN1 |
| 1 | Micro USB Connector | UX60A-MB-5ST | — | X3 |
| 1 | Quarz | NX3225SA | 12MHz | X3 |
| 1 | Orange LED | 0603 | Orange | LED1 |
| 1 | Blue LED | 0603 | Blue | LED2 |
| 11 | Ceramic Capacitor | 0603 | 100nF | C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 |
| 2 | Ceramic Capacitor | 0603 | 27pF | C15, C16 |
| 1 | Tantalum Capacitor | 3216/A | 3.3uF | C2 |
| 2 | Tantalum Capacitor | 3216/A | 4.7uF | C13, C14 |
| 1 | Resistor | 0603 | 1k | R1 |
| 1 | Resistor | 0603 | 12k | R2 |
| 2 | Resistor | 0603 | 220 | R3, R4 |
| 1 | PTC Resettable Fuse | 1206 | 500mA | F1 |
| 2 | Ferrite Bead | 0603 | 600Ohm 500mA | L1, L2 |

