ARM7 JTAG programmer
(Last modified 13 Sep 2010)

I needed a JTAG programmer for an ARM7 project, so I checked the web on possibilities.  There are a lot of USB-based programmers to choose from, but I opted to build my own parallel-port programmer instead.  Thanks to a well-stocked junk box, this project cost me nothing but my time.

I started with a design that I found on the web here (Eagle schematic): www.frozeneskimo.com/electronics/wp-content/uploads/Schematics/jtagwiggler.sch


I modified this schematic to use a 74AHC125 quad-buffer.  This chip has a single buffer-enable pin that lets me tristate all outputs on demand, effectively removing the JTAG programmer from the circuit without having to disconnect it physically.  Here is my modified schematic as a PDF.  Note that the connections to the PC printer port assumes a 26-pin ribbon connector.  If you are wiring directly to a DB-25 connector, use the pin numbers shown in parentheses instead.

The JTAG programmer connects to the target board using a standard 20-pin ribbon connector.  This connector is standard on boards such as the Olimex SAM7-H256, which I use.  If you need to use a 10-pin JTAG connector, check the web for details on the wiring for that connector; you will need to route the signals on my connector to the corresponding pins on the 10-pin connector.

I wired the circuit onto a small Radio Shack prototyping board, then mounted the board into an empty Altoids box; see the photo below.

JTAG parallel programmer

Based on info I found on the web, you should probably keep the ribbon cable between the adapter and the target board to less than ten inches.  I haven't had any problems during downloads, but others report download problems if the cable is too long.

Next up, I needed software that could push my ARM7 object code into the target using my JTAG adapter.  I chose to use the H-JTAG suite of tools, available here: http://www.hjtag.com/download.html.

Installing the tools will generate several icons on your desktop.  After downloading and installing the tools, connect power to your adapter and connect the adapter to your PC.  Double-click the H-JTAG icon (large H), which starts the H-JTAG server; this server must be active before any of the other H-JTAG tools you use will work.  The H-JTAG server will automatically try to connect to your target.  If the connection succeeds, you will see a window identifying the target MCU detected.  In my case, the target shows up as ARM7DTMI.

In the server window, click Settings and select LPT Jtag Setting.  This opens a window allowing you to customize the H-JTAG software for your specific programmer.  Refer to the image below for the settings I used.

My H-JTAG settings

Click OK to save these settings.

Now double-click the H-JTAG flasher icon (large F) to start the flasher utility.  Click the Flash Selection item in the Programming Wizard column and make sure the correct device is selected; in my case, it's AT91SAM7S256 under the AT91SAM device group.  Click the Programming item in the Programming Wizard column to access the programming tools.  If you click the Reset button, the tool will try to reset the target by toggling the nTRST line.  This is a quick check to make sure your adapter is properly wired to the target.

Finally, you can modify the settings in the Programming item to control what kind of object file you send to the target and where the tool should look to find that object file.

Note that I have not used this adapter for debugging, only for code loads.  Theoretically, this adapter should work with any customizeable GDB JTAG debugger, but I cannot confirm this.  If you use this or a similar parallel programmer for GDB debugging, please drop me an email with details.



Home