Open Turbostation:JTAG

212,700pages on
this wiki
Add New Page
Add New Page Discuss this page0

The provision of a JTAG interface on the early versions of the Turbostation 101 circuit boards means that it should be possible to re-flash the boot-loader even if the system has been 'bricked' by an incorrect build / upload. It also allows remote debugging of development versions of the boot loader.

Once a new version of the boot loader has been proven to work on a JTAG enabled board we can be pretty confident that it is safe use on later versions of the Turbostation, where the JTAG connection isn't provided.

This page is a place holder for providing information about adding a JTAG connector, programming cables and software, and applications.

Installing the JTAG Connector


Some TS boards (V1.02) have the opportunity of adding a JTAG connector (2x8 pin, 2.54mm pitch) at JP1. Additionally, resistor arrays RN5, D162, R163 and R155 may need to be populated to gain correct functionality.


Connection point for JTAG Header

Before Adding Connector

It is better to solder the extra resistor components BEFORE attempting to solder any connector!

Removing the Solder

To add a connector it is first necessary to remove the solder which manufacturer placed in the PCB holes. There are a couple of techniques for this, all require a steady hand and a relatively fine tipped soldering iron. Multibraid copper fibre and or a solder sucker are also very useful!

  • WARNING: You need a hot tip, which can easily damage the circuit board; let alone the user!
  • WARNING: The pin via's (connecting metal) are very fine, as well as the tracks. If you 'rip' the pins you will damage the board, and probably break the tracks. TAKE YOUR TIME and BE PATIENT!
  1. Apply soldering iron tip to the soldered pins and heat. Remove tip; apply the multibraid fibre and continue to heat. Ideally the solder will start to flow onto the copper braid; and out of the hole. This is a slow process!
  2. Use a large tip soldering iron and do the same as 1, but note this could easily damage your tracks.
  3. Carefully heat the solder using a fine tip; remove and quickly apply a solder sucker. This will remove solder quicker than 1 or 2, but the recoil from the sucker may damage the board or other components
  4. Carefully heat the solder using a fine tip; and apply the solder sucker to the reverse side. The board should be firmly held in a vice to stop recoil from the sucker causing damage!
  5. Carefully heat the solder using a fine tip; and blow the solder from the reverse side. Be very careful NOT to burn your MOUTH!
  • NOTE: the ground pin took a long time to clear of solder; as the connections to the large ground pad generated a heat sink. It may only be possible to clear using a large tip iron.

Adding the connector


2x 1x8 Header blocks soldered in parallel, 2.54mm pitch


2x 1x8 Header blocks soldered in parallel, 2.54mm pitch

Assuming the solder has been carefully removed you can add a 2x8 2.54mm pitch connector (header). Standard headers (e.g. 2x8) use thick square pins (0.63mm) which may not fit unless the holes are clean. It may therefore be necessary to use two rows of 1x8 headers; with smaller pins (0.5mm).

Carefully place the connector on the board (component side) and solder the reverse side using a fine tip. The end result should look something like the pictures shown.

Pin Out Configuration

If the connector follows the recommended layout (pg50), the pin assignments (pin 1 = closest to battery) should be:

Function Pin Pin Function
TDO 1 2 NC
TMS 9 10 NC
SRST_N 11 12 NC
HRST_N 13 14 NC
NC 15 16 GND

The actual pin outs measured on the board are as follows...

Connection Pin Pin Connection
To uP (BGA) 1 2 N/C?
To uP (BGA) 3 4 D8 & R155 (N/C) -->VDD
RN5/4 (N/C?) 5 6 R163 (N/C?) -->VDD
To uP (BGA) 7 8 R162 (N/C?) -->VDD
To uP (BGA) 9 10 N/C?
RN5/3 (N/C?) 11 12 N/C?
RN5/2 (N/C?) 13 14 N/C?
RN5/1 (N/C?) 15 16 GND

Since most JTAG references would indicate that the important signals are TDI, TDO, TMS, TCK, possibly TRST_N and SRST_N, then it is likely the outputs match. Note if RN5, R155, R162 and R163 were populated they would connect to VDD (e.g. of SDRAM). JTAG specifications would indicate that there should be a 100 Ohm resistor between VDD and VREF as a current limiter.

VREF can either be produced by supplying a 10k Ohm resistor to R163 (according to Freescale specifications) or through a flying wire attached to the +VDD supply of the serial port (JP2). Note: This should ideally include a 10k Ohm resistor in order to stop +3.3V being pulled to ground by any JTAG programmer (e.g. Kuzito).

JTAG Programmers

In order to make use of the JTAG connector it is necessary to use a 'Programmer' - a piece of hardware which can be used to generate the necessary logic signals. Simple converters can be produced using the parallel port and a Tri-state buffer. Various home made devices are available, the list below is purely a summary...

DIY Circuits

A simple parallel port based circuit can be found here.

And a USB schematic based on the FTDI2232 can be found here

Unfortunately there isn't a great selection of free/cheap software compatible with the MPC8241. However the Kurobox community (similar hardware) seem to have come up with a reasonably affordable although not very performant solution based on the parallel port cable and Openwince JTAG tools.

Purchase solutions

Kuzito JTAG Programmer

A quick search of E-bay produced a nice little parallel circuit from Kuzito - a developer based in Bulgaria. The device is very similar to that mentioned by the Kurobox team, except the pin outs are labelled slightly different.

  • It is important to note the pin out changes when using the Kurobox information!
Pin 2 Bit 0 TMS Parallel port to JTAG
Pin 3 Bit 1 TCK Parallel port to JTAG
Pin 4 Bit 2 TDI Parallel port to JTAG
Pin 5 Bit 3 TRST Parallel port to JTAG
Pin 13 Bit 11 TDO JTAG to parallel port

The pins VRef and nRST are unconnected, and power has to be supplied from the JTAG port via either +B or VDD; ideally at 3.3V with a 100 Ohm resistor.

Amontec JTAGKey-Tiny

This is a small Hobby based USB JTAG programmer from Amontec. Currently the device is only supported with programming software from the ARM community; however new drivers are in development and should be available late November 2006. It promises to be a much faster solution than the Parallel port devices.

JTAG Tools (OpenWinCE)

The Openwince project provides a free set of tools for JTAG access to devices. However it seems to be a little disorganised... recently a new unofficial version has been found at which might be better (see specific instructions later).


If you are running debian it is possible to apt-get the openwince-jtag package directly. Other flavours may also have the openwince-jtag package.

Cygwin (Windows) Installation

You need to have Cygwin installed and working on your machine in order to compile the JTAG tools. If necessary, follow the simple set of Windows install instructions. You will additionally need the packages below

  • ioperm

Download the Packages

Either in linux, or under cygwin, create and enter a suitable directory e.g.

mkdir openwince
cd openwince

You should then download the 'include' and 'jtag' .tar.bz2 files into this directory. The 'include' directory is for general Openwince tools. It is not the same as the one inside 'jtag'.

  • Note: Internet Explorer strips the .tar.bz2 extension and corrupts the tarballs. Use Mozilla Firefox, Opera or similar!

Expand the tarballs using

tar -xvjf include-0.4.2.tar.bz2
tar -xvjf jtag-0.5.1.tar.bz2

It is useful to rename these directories e.g.


Apply the Include patch [Option]

If you do not want the very latest versions of JTAG tools you will need to apply a patch to make it work. One is provided on the One Laptop Per Child website. Click on the attachment at the bottom of the page, and then 'Download in other formats' -> 'Original Format'. Save the file in the 'openwince/include-0.4.2' directory. The final file (fixup_detectflash_proto.diff) should be about 1k (if larger, it is in html format and wont work). Enter the 'openwince/include' directory and issue the patch command

cd openwince/include
patch -p0 < fixup_detectflash_proto.diff

Update to latest JTAG / Include [Option]

The latest offical versions of the JTAG and Include directories can be downloaded from the CVS repository on sourceforge. To do this you will need to have the existing tarballs expanded to




Enter the following commands from the /openwince/ directory (no password, press enter when prompted)

cvs login
cvs -z3 co -P include
cvs -z3 co -P jtag

The last two commands should refresh the existing directories with new source files.

Update to the Unoffical JTAG-0.6 Build [Option]

Download the new tarball to /openwince/ and unpack using

tar -xvjf jtag-0.6-cvs-20051228.tar.bz2.
  • Note: you will need the latest CVS version of the include directory from above.

The configuration and build process is the same as below; except work in the openwince/jtag-0.6-cvs-20051228 directory instead of openwince/jtag.

Configure and Build Openwince Includes

This casues the openwince headers to be compiled and installed into the /usr/local/include/openwince directory. This is necessary if you are using the latest (CVS) versions!

cd /openwince/include
make install

Configure and Build the Openwince JTAG tool

Enter the JTAG directory, and configure the installation

cd /openwince/jtag

Now make, and install the system tools

make install

Run JTAG Tools

You should now be able to start the JTAG environment using the 'jtag' command

JTAG Tools 0.6 CVS
Copyright (C) 2002, 2003 ETC s.r.o.
JTAG Tools is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
There is absolutely no warranty for JTAG Tools.
Warning: JTAG Tools may damage your hardware! Type "quit" to exit!
Type "help" for help.


It seems that in all the updates; the manufacturer code for Motorola dropped out. JTAG byte codes can be found from

Minor update 2008: The openwince jtag tools are now being enhanced and maintained as UrJTAG.

Also on Fandom

Random wikia