|   ABOUT   |   INSTALLATION   |   USAGE   |   HARDWARE   |  

Preface

In order to keep the code as simple as possible, there are no device structures with jump tables and similar stuff. Each JTAG-O-MAT will be build from specific source code modules for a special hardware. All configuration is limited to the Makefile, selecting the required sources which fit to the target hardware. At least this is the initial intention, which may proof wrong later while the program develops.

You're welcome to take part and so are request for CVS write access.

JTAG-O-MAT On Linux

Getting JTAG-O-MAT From CVS

The latest source code is available via CVS. Note, that this is no official release and may contain bugs. If you do not have CVS installed or if you want to build from an officially released source code archive, then skip this chapter.

Open a command line window and enter the following commands. When prompted for a password, simply press the Enter key.

$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jtagomat login
$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jtagomat co -P jtagomat
This will create a subdirectory jtagomat and download the current source code from the CVS server in this subdirectory.

Next change to the new subdirectory.

$ cd jtagomat

The CVS repository will not contain files, which can be created locally. This is also true for some default files used by automake. Thus, after checking out the module for the first time, enter

$ automake --add-missing
A script named reconf.sh had been prepared to run the autotools. Run it.
$ ./reconf.sh
We are now ready to configure, make and install the JTAG-O-MAT utility.

Using The JTAG-O-MAT Source Package

Alternatively to getting the code from CVS you can download. a pre-build source code package from SourceForge.

To unpack the file archive use the following commands, replacing x.y.z by the actual version number of the package.

bzip2 -d jtagomat-x.y.z.tar.bz2
tar xvf jtagomat-x.y.z.tar
This will create a subdirectory jtagomat-x.y.z. Change to it.
cd jtagomat-x.y.z
      

Configure, Make And Install

After JTAG-O-MAT had been downloaded from the CVS repository or as a source code package, we need to configure and install it. Since its release 1.2.1 the binaries for the AVR and the ARM7 targets are build in one go. Thus, the GCC toolchains for AVR and ARM should be available on the installing system. Otherwise warnings will be displayed, saying that either the AVR or the ARM binaries will be excluded from the build.

$ ./configure
$ make
# make install
This will build the binary of the JTAG-O-MAT utility and typically install it in /usr/local/bin, which may require to change to the root user before entering the last command. Furthermore, the prepared script files for the AT91 are copied to /usr/local/etc.

If the GCC toolchain for ARM is available, a flasher tool will be build and copied to /usr/local/etc/flasher.bin.

If the GCC toolchain for AVR is available, the firmware and a boot loader will be build and copied to /usr/local/etc/turtleboot.hex and /usr/local/etc/turtelizer.hex. These two files can be loaded on a simple ATmega8 based programming adapter. The schematic is available at www.ethernut.de.

Note: There are currently no configuration parameters for specific programming adapters available. Thus, the utility will be build for the Turtelizer Hardware. Building for other JTAG adapters requires to edit the jtagomat_SOURCES list in src/Makefile.am and run configure again,

JTAG-O-MAT On Windows

An executable installation is available for the Windows platform. It will install the source code as well as pre-compiled binaries for the Windows Platform.

JTAG-O-MAT is a command line tool. After opening a command line window, add a PATH to the bin directory within the installation directory before using the tool.

$ SET PATH=c:\jtagomat-1.2.4\bin

Re-Building

Originally GNU autotools are used to configure and build the binaries. Because these tools are typically not available on Windows PCs, a simple Makefile has been added to rebuild the JTAG-O-MAT executable on the command line, using MS VC++ (MSVC .NET 2003). However, GNU make is still required, but in opposite of GNU autotools this is a simple utility. Native executables are available for Windows and one may already exist on your harddisk.

Open a command line, change to the src subdirectory and enter

$ "%VS71COMNTOOLS%\vsvars32.bat"
This should correctly setup your VC++ environment. Otherwise check the VC++ documentation.

You also need to add a path to make.exe. Here's an example for systems on which the Ethernut package had been installed.

$ SET PATH=C:\Ethernut\nut\tools\win32;%PATH%
Now you are ready to enter
$ make clean
$ make
which will build a new executable. By default, a version for the Turtelizer is build. To create an executable for the Wiggler, type
$ make jtagomat-wiggler.exe

Testing JTAG-O-MAT And Turtelizer

Note, that the Turtelizer's JTAG connector must be plugged into the target and that the target must be powered up because the Turtelizer draws its supply from the target board. Finally connect the Turtelizer with a serial cable to the PC.

If a Turtelizer Adapter is connected to the first serial port (COM1 on Windows or /devttyS0 on Linux), simple enter

$ jtagomat -v HALT
on the command line. You should see the following response:
Turtelizer 1.2.3

If connected to the second serial port use

$ jtagomat -acom2 -v HALT
on Windows or
$ jtagomat -a/dev/ttyS1 -v HALT
on Linux.

If this fails, make sure that the Turtelizer is working. Use a terminal emulator, HyperTerm on Windows or minicom on Linux, configure the serial port to 115200:8:n:1 and press Ctrl-V. The Turtelizer should respond with its version number.

The Flasher Tool

This tiny utility can be used to program external Flash memory chips on an ARM7TDMI target board. JTAG-O-MAT can be used to upload this utility to the on board RAM, start it and transfer a flash image via JTAG. At the time of this writing, only the AT49BV322A Flash Memory Chips had been tested.

The source code of the Flasher is included in the JTAG-O-MAT distribution and located in the subdirectory target/arm7tdmi/flasher. Building the binary requires, that the GCC toolchain for the ARM7TDMI CPU has been installed on your PC. It's available from many sources.

www.gnuarm.com
offers source code packages as well as binaries for Linux, Win32 and Mac OS X.

If the GCC toolchain for ARM had been available during installation, on Linux, a file flasher.bin will be available in /usr/local/etc and can be downloaded to the target's RAM as explained on the Usage Page . For Windows a pre-build binary is available in the bin directory. Rebuilding on Windows can be done by entering

$ cd c:\jtagomat-1.2.4\target\arm7tdmi\flasher
$ SET PATH=C:\Ethernut\nut\tools\win32;c:\Programme\GNUARM\bin;%PATH%
$ make -f Makefile.arm-gcc clean
$ make -f Makefile.arm-gcc

Adapting Or Enhancing The Code

Adding Other JTAG Adapters

Replace parport.c or turtelizer.c.

Adding Other JTAG Devices

Replace arm7tdmi.c.

Adding Other FLASH Memories

Replace the flasher application, which runs on the target. If your target doesn't support JTAG Communication between the target application and the host (the ARM does), then you may use an UART instead.

Coding Style

Please use

indent -kr -nut -l132




This website is hosted at

SourceForge.net Logo