From e622c5bb14aa9eff1ecda4376ffd67f17a5bfbdc Mon Sep 17 00:00:00 2001 From: Kolja Waschk Date: Wed, 20 Feb 2008 19:50:21 +0000 Subject: [PATCH] Added HTML documentation, rendered from UrJTAG.txt using DocBook DSSSL stylesheets git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1065 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- web/htdocs/book/UrJTAG.dbk | 3218 +++++++++++ web/htdocs/book/UrJTAG.html | 4986 +++++++++++++++++ .../book/_compilation_and_installation.html | 381 ++ web/htdocs/book/_copyright.html | 146 + web/htdocs/book/_data_file_format.html | 183 + web/htdocs/book/_development.html | 213 + web/htdocs/book/_drivers.html | 606 ++ web/htdocs/book/_f_a_q.html | 219 + web/htdocs/book/_general.html | 293 + .../_gnu_free_documentation_license_fdl.html | 546 ++ .../book/_gnu_general_public_license_gpl.html | 477 ++ web/htdocs/book/_internals.html | 350 ++ web/htdocs/book/_jtag_commands.html | 1889 +++++++ web/htdocs/book/_licensing.html | 152 + web/htdocs/book/_system_requirements.html | 536 ++ web/htdocs/book/_urjtag.html | 268 + web/htdocs/book/_usage.html | 322 ++ web/htdocs/book/index.html | 475 ++ 18 files changed, 15260 insertions(+) create mode 100644 web/htdocs/book/UrJTAG.dbk create mode 100644 web/htdocs/book/UrJTAG.html create mode 100644 web/htdocs/book/_compilation_and_installation.html create mode 100644 web/htdocs/book/_copyright.html create mode 100644 web/htdocs/book/_data_file_format.html create mode 100644 web/htdocs/book/_development.html create mode 100644 web/htdocs/book/_drivers.html create mode 100644 web/htdocs/book/_f_a_q.html create mode 100644 web/htdocs/book/_general.html create mode 100644 web/htdocs/book/_gnu_free_documentation_license_fdl.html create mode 100644 web/htdocs/book/_gnu_general_public_license_gpl.html create mode 100644 web/htdocs/book/_internals.html create mode 100644 web/htdocs/book/_jtag_commands.html create mode 100644 web/htdocs/book/_licensing.html create mode 100644 web/htdocs/book/_system_requirements.html create mode 100644 web/htdocs/book/_urjtag.html create mode 100644 web/htdocs/book/_usage.html create mode 100644 web/htdocs/book/index.html diff --git a/web/htdocs/book/UrJTAG.dbk b/web/htdocs/book/UrJTAG.dbk new file mode 100644 index 00000000..6a630c0e --- /dev/null +++ b/web/htdocs/book/UrJTAG.dbk @@ -0,0 +1,3218 @@ + + + + + + Universal JTAG library, server and tools + 2008-02-19 + + Kolja + Waschk + (Ed.) + + KW( + +10612008-02-19KW( + + + +Copyright +Copyright 2007, 2008 Kolja Waschk and the respective authors. + +Permission is granted to copy, distribute and/or modify this document under the +terms of the GNU Free Documentation License, Version 1.2 or any later version +published by the Free Software Foundation. A copy of the license is included in +the section entitled "GNU Free Documentation License". + + + +General +
+JTAG +JTAG basics can be found all over the internet. This section should go into +some more details about working with JTAG. What hardware do you need, what is +the usage of JTAG, where do I get files. What file formats are available… + +
+Introduction +JTAG (IEEE 1149.1) is a serial interface for testing devices with +integrated circuits. The problem that the JTAG interface was designed to solve +is checking if connections between ICs are OK. Therefore you can set and check +in- and outputs of ICs. In order to save pins and logic a very simple serial +design was invented. + + + + +One pin serial input + + + + +One pin serial output + + + + +One pin clock + + + + +One pin control + + + +The control pin (together with clock) allows to switch device states. A state +machine inside each chip can be controlled, e.g. to reset the device. This +control machine also allows to have two internal shift registers in each device +(although we only have on in- and one output-pin). The registers are called +instruction register (IR) and data register (DR). The current UrJTAG tool +allows you to set the IR and set and get the DR. It doesn't allow you to +directly control the statemachine (yet). + +
+
+Interfaces +The simplest interface that you can build is like the Xilinx parallel cable +(also called DLC5). If your device works with a 5V or 3.3V supply voltage then +this device can even be build just with passive parts. (picture missing here) +UrJTAG also supports a number of other interface adapters. + +
+
+Additions +In the meantime the jtag specification was used as a basis for programming +flash files and debugging processors. UrJTAG supports programming a couple of +different flash devices. It also supports programming of non-flash devices via +svf files. UrJTAG does not support debugging yet. Other open source solutions +such as OpenOCD allow you to debug ARM processors with gdb. + +
+
+BSDL and UrJTAG data files +The BSDL file format describes the jtag interface for one IC. It is a VHDL +syntax with the needed information (like pin-names, register lengths and +commands) that is usually done by the supplier. e.g. Xilinx BSDL files are +all included in their free web-pack (using file extension ".bsd"). + +UrJTAG uses a different file format internally. So in order to add a new device +to UrJTAG you need to convert those files and produce a directory structure. +Currently there are at least three tools available to do that; included with +UrJTAG is "bsdl2jtag". Please ask on the mailing list in case of problems with +that. Please also send proven working files back to this project. + +Starting with post-0.7 releases, UrJTAG contains a BSDL subsystem that +retrieves the descriptions for chips in the chain from BSDL files on the +fly. Be aware that this feature is currently experimental and may not work +with every BSDL file yet. + +
+
+SVF files +The SVF file format contains a number of high level commands to drive the jtag +bus. For example you can shift the IR or DR and even check for the results. +The Xilinxs impact and Altera QuartusII tools allow you to write this file to +program devices. + +The player has been developed according to the "Serial Vector Format +Specification", Revision E, 8 March 1999 issued by ASSET InterTech, Inc. The +full specification can be found at +http://www.asset-intertech.com/support/svf.pdf + +UrJTAG features an "SVF player" that can read SVF files and perform the +described actions on the bus. + +SVF parser and lexer are also copyright 2002, CDS at http://www-csd.ijs.si/. +They have been reused from the "Experimental Boundary Scan" project at +http://ebsp.sourceforge.net/. + +
+
+JAM/STAPL files +Another format for describing actions over JTAG interfaces is STAPL, actually +standardized as JEDEC "JESD-71A". Compared to SVF, it looks more like an +actual programming language and features looping, conditional execution, and +more. STAPL is not yet supported by UrJTAG. + +
+
+
+UrJTAG +
+Introduction +UrJTAG Tools is a software package which enables working with JTAG-aware (IEEE +1149.1) hardware devices (parts) and boards through JTAG adapter. + +This package has open and modular architecture with ability to write +miscellaneous extensions (like board testers, flash memory programmers, and so +on). + +JTAG Tools package 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. Please read +COPYING file for more info. + +This software may damage your hardware! +Feedback and contributions are welcome. + +
+
+About this document +This documentation is far from being complete. You're encouraged to amend and +supplement it and submit your changes in the Bugs or Enhancements tracker +at the UrJTAG website. + +
+
+UrJTAG Website +The most current version of this documentation and UrJTAG sourcecode +is always available from the project homepage at http://www.urjtag.org + +
+
+The name "UrJTAG" +I (Kolja) favour short names, so I thought about adding only a few +letters to "JTAG". The prefix "Ur" in German means "ancestral", an "Ur-Vater" +is a forefather. UrJTAG shall become the forefather, the prototype for many +other JTAG tools. By mere chance the "Ur" is also another name for an aurochs, +an animal similar to the GNU… + +
+
+Authors, contributors, … thanks +A list of contributors is maintained in the file THANKS in the source +distribution. Special thanks go to Marcel Telka, who actually "invented" the +JTAG tools and wrote most of this basis of UrJTAG, and Arnim Laeuger for his +continuous support and development of SVF and BSDL subsystem and FT2232 +drivers. + +
+
+UrJTAG and openwince JTAG Tools +The JTAG Tools originally were developed by Marcel Telka as part of +the openwince project. Still a large portion of the source code is his work. +However, the last release of the JTAG tools was version 0.5.1 in 2003. After a +few years the development completely stalled. Every few months or so on the +project's mailing list someone asked about continuing, but a critical mass +wasn't reached before late 2007. A fork of the JTAG tools was created under the +wings of the UrJTAG project at Sourceforge. + +
+
+
+System requirements +
+Supported host operating systems +JTAG Tools should run on all Unix like operating systems including MS Windows +with Cygwin installed. + +
+
+Required software for running UrJTAG +Required only for MS Windows: + + + + +current Cygwin net installation from http://cygwin.com + + + + +ioperm package (a part of the standard Cygwin net installation) + + + +It may be necessary to run the command "ioperm -i" to install the IOPERM.SYS +driver in the system. + +If UrJTAG was compiled to use the readline library, it has to be present on +the system as well. It's probably a standard part of your distribution. + +More software is needed if you want to compile UrJTAG (which you probably want +because currently no pre-compiled binaries are avaible…). See "Installation" +below. + +
+
+Supported JTAG adapters/cables +See help cable command for up-to-date info. + + + + +Arcom JTAG Cable + + + + +Altera ByteBlaster/ByteBlaster II/ByteBlasterMV Parallel Port Download Cable + + + + +Altera USB-Blaster and compatible http://www.ixo.de/info/usb_jtag + + + + +Xilinx DLC5 JTAG Parallel Cable III + + + + +ETC EA253 JTAG Cable + + + + +ETC EI012 JTAG Cable + + + + +Ka-Ro TRITON (PXA255/250) JTAG Cable + + + + +Keith & Koep JTAG Cable + + + + +Lattice Parallel Port JTAG Cable + + + + +Mpcbdm JTAG Cable + + + + +Macraigor Wiggler JTAG Cable + + + + +Amontec JTAGkey (FT2232-based) + + + + +Olimex ARM-USB-JTAG (FT2232-based) + + + + +Olimex ARM-USB-TINY (FT2232-based) + + + + +OOCDLink-s (FT2232-based) (experimental) http://www.joernonline.de/dw/doku.php?id=projects:oocdlink:2_oocdlinks + + + + +Other FT2232-based USB JTAG cables (experimental) + + + + +Xverve Signalyzer Tool (FT2232-based) (experimental) + + + + +Turtelizer 2 (FT2232-based) (experimental) http://www.ethernut.de/en/hardware/turtelizer/ + + + + +USB to JTAG Interface (FT2232-based) (experimental) http://www.hs-augsburg.de/~hhoegl/proj/usbjtag/usbjtag.html + + + + +Xilinx Platform USB Cable (experimental) + + + +
+
+JTAG-aware parts (chips) +The data/ directory of the UrJTAG installation has some more, but at +least the following are supported: + + + + +Altera EP1C20F400 + + + + +Altera EPM7128AETC100 + + + + +Analog Devices Sharc-21065L + + + + +Atmel ATmega128 (partial support) + + + + +Broadcom BCM1250 + + + + +Broadcom BCM3310 (partial support) + + + + +Broadcom BCM5421S + + + + +Broadcom BCM4712 (partial support) + + + + +DEC SA1100 + + + + +Hitachi HD64465 + + + + +Hitachi SH7727 + + + + +Hitachi SH7729 + + + + +IBM PowerPC 440GX + + + + +Intel IXP425 + + + + +Intel SA1110 + + + + +Intel PXA250/PXA255/PXA260/PXA261/PXA262/PXA263 + + + + +Lattice LC4032V + + + + +Lattice M4A3-64/32 + + + + +Lattice M4A3-256/192 + + + + +Motorola MPC8245 + + + + +Samsung S3C4510B + + + + +Sharp LH7A400 + + + + +Toshiba TX4925/TX4926 + + + + +Xilinx XC2C256-TQ144 + + + + +Xilinx XCR3032XL-VQ44 + + + + +Xilinx XCR3128XL-CS144 + + + + +Xilinx XCR3128XL-VQ100 + + + + +Xilinx XCR3256XL-FT256 + + + +
+
+Flash chips +Not all chips are supported in every possible configuration, there may +be untested combinations of chip type, bus width, … + + + +Intel 28FxxxJ3A (28F320J3A, 28F640J3A, 28F128J3A) + + + + +Intel 28FxxxK3 (28F640K3, 28F128K3, 28F256K3) + + + + +Intel 28FxxxK18 (28F640K18, 28F128K18, 28F256K18) + + + + +AMD Am29LV64xD (Am29LV640D, Am29LV641D, Am29LV642D) + + + + +AMD Am29xx040B (Am29F040B, Am29LV040B) + + + +
+
+
+Compilation and installation +
+Required software for compiling UrJTAG +To run autogen.sh, you need autoconf and automake, bison, and a recent flex. + +The distributed source tarball contains source pregenerated with a current flex +version; flex therefore is only needed if you want to compile code checked +out from our Subversion repository. Flex 2.5.4a as it comes with Cygwin will +work but some parts of UrJTAG (namely the SVF player) become more verbose if +Flex 2.5.31 or newer is used. Building the BSDL subsystem files requires Flex +2.5.33 or newer. The configure script will compare the available Flex version +against these preconditions and enables or disables the related features. , + +Furthermore, libtool should be available, and "devel" versions of the following +packages: + + + + +gettext + + + + +readline (not needed, but really eases interactive use) + + + + +ioperm (needed only for Cygwin) + + + +
+
+Required libraries for USB support +For USB adapter support (including support for parallel port adapters attached +to USB-to-parallel converters), one or more additional libraries are required. + +Many USB JTAG adapters and USB-to-parallel converters are based on chips +made by FTDI. To support these, either intra.net's "libftdi" or FTDI's +"FTD2XX" library can be used. + +On many modern Linux distributions, libftdi is available as a precompiled +package and can be installed using the distribution's package management system +(e.g. "apt-get libftdi-dev" for Debian and Ubuntu). If it isn't available or +you don't run Linux, you can get it from + + + + +http://www.intra2net.com/de/produkte/opensource/ftdi/ + + + +Alternatively, you can use the FTD2XX library from the chip manufacturer FTDI. +It is available for Linux and Windows. To use the library for Windows in a +Cygwin environment, first get it from: + + + + +http://www.ftdichip.com/Drivers/D2XX.htm + + + +Unzip the CDM*.zip to some directory and tell UrJTAG about this directory +during the configure step before actual compilation: + +./configure --with-libftd2xx=/cygdrive/c/windows/temp/CDM_Drivers +All other USB JTAG adapters can be supported only if libusb is installed. +There is a libusb-win32 variant that can be used in a Cygwin environment: + + + + +http://libusb.sourceforge.net (libusb) + + + + +http://libusb-win32.sourceforge.net (libusb for Windows) + + + +For specific notes regarding the use of these libraries in a Cygwin +environmen, see below. + +
+
+Installing from source tar.gz +The installation follows the standard configure, make, make install scheme: + +tar xzvf urjtag.tar.gz +cd ../jtag +./configure +make +make install +
+
+Installing from Subversion repository +If you want to try the very newest version of UrJTAG… + +svn co http://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk urjtag +cd urjtag/jtag +./autogen.sh +# ./configure done by autogen.sh; run it here with special options if needed +make +make install +
+
+Linking to FTD2XX.DLL in Cygwin environment +Before running configure, get the D2XX drivers from FTDI. + + + + +http://www.ftdichip.com/Drivers/D2XX.htm (FTDI FTD2XX library) + + + +Unzip the archive into a directory of your choice (probably a choice +without spaces in the name is better) and afterwards run configure with the +"—with-ftd2xx" pointing to that directory, e.g. + +./configure --with-ftd2xx="/cygdrive/c/temp/ftdi-cdm-drivers" +Configure should now report + +FTDI cable support + ... + via libftd2xx : yes +
+
+Using LibUSB-Win32 in Cygwin environment +Before running configure, install the LibUSB-Win32 "filter" driver from SF. + + + + +http://libusb-win32.sourceforge.net + + + +Then point configure to the directory where LibUSB-Win32 was installed (it +might give problems if the path contains spaces, as "Program Files" does!): + +./configure --with-libusb="/cygdrive/c/Programme/LibUSB-Win32/" +
+
+Building the BSDL subsystem +As mentioned above, building the BSDL lexer requires Flex 2.5.33 or newer. If +the detected Flex version is not recent enough, configure will disable the +BSDL subsystem. The detection result is summarized at the end of configure: + +jtag is now configured for + ... + Build BSDL subsystem : yes +Flex is only required when you're working on a check-out of the Subversion +repository. In this case Flex has to be called to transform bsdl_flex.l to +bsdl_flex.c. When you're compiling from released sources, the local Flex +version is not relevant since the output file of Flex is part of the +tarball. I.e. even if the local Flex fails the check, the BSDL subsystem is +enabled and will be compiled from the released C files. + +
+
+
+ +Usage +
+Quick start +
+Run the software +Connect your JTAG adapter between your PC and target device and turn +on your device. + +To run JTAG Tools type "jtag" and press Enter. jtag should start and +display some initial informations. Output should end with line like this: + +This is "jtag command prompt". Type "help" and press Enter for initial help +about available commands. To exit JTAG Tools type "quit" and press Enter. +
+
+Configure the cable +Type "help cable" for list of supported JTAG cables. + +Type "cable" command followed by the cable name and possibly further +arguments for cable configuration. Example: + +jtag> cable EA253 parallel 0x378 +Initializing ETC EA253 JTAG Cable on parallel port at 0x378 +See the section about the "cable" command for details and USB support. + +
+
+Detect parts on the JTAG chain +Type "detect" at the jtag command prompt: + +jtag> detect +Your output should look like this: + +IR length: 5 +Chain length: 1 +Device Id: 01011001001001100100000000010011 + Manufacturer: Intel + Part: PXA250 + Stepping: C0 + Filename: /usr/local/share/urjtag/intel/pxa250/pxa250c0 +If you get empty output or an error message your JTAG adapter is not connected +properly, or your target board doesn't work, or it is turned off. + +The "detect" command is required before all other commands. + +
+
+Print current JTAG chain status +jtag> print chain + No. Manufacturer Part Stepping Instruction Register +--------------------------------------------------------- + 0 Intel PXA250 C0 BYPASS BR +
+
+Sample device pin status +jtag> instruction SAMPLE/PRELOAD +jtag> shift ir +jtag> shift dr +jtag> dr +1000110010000010000110010111111111111111111001101110... +jtag> print chain + No. Manufacturer Part Stepping Instruction Register +------------------------------------------------------------ + 0 Intel PXA250 C0 SAMPLE/PRELOAD BSR +jtag> get signal BOOT_SEL[0] +BOOT_SEL[0] = 0 +jtag> +Note: BSR is "Boundary Scan Register" +
+
+Burn flash connected to the part +jtag> flashmem 0 brux.b +0x00000000 +Note: Supported configuration is 2 x 16 bit only +BOOT_SEL: Asynchronous 32-bit ROM +2 x 16 bit CFI devices detected (QRY ok)! +program: +block 0 unlocked +erasing block 0: 0 +addr: 0x00002854 +verify: +addr: 0x00002854 +Done. +jtag> +or: + +jtag> flashmem msbin xboot.bin +Note: Supported configuration is 2 x 16 bit only +BOOT_SEL: Asynchronous 32-bit ROM +2 x 16 bit CFI devices detected (QRY ok)! +block 0 unlocked +erasing block 0: 0 +program: +record: start = 0x00000000, len = 0x00000004, checksum = 0x000001EB +record: start = 0x00000040, len = 0x00000008, checksum = 0x000001B0 +record: start = 0x00001000, len = 0x00002B30, checksum = 0x00122CAB +record: start = 0x00004000, len = 0x00000160, checksum = 0x0000684B +record: start = 0x00005000, len = 0x00000054, checksum = 0x000008EE +record: start = 0x00005054, len = 0x00000030, checksum = 0x00000DA9 +record: start = 0x00000000, len = 0x00001000, checksum = 0x00000000 +verify: +record: start = 0x00000000, len = 0x00000004, checksum = 0x000001EB +record: start = 0x00000040, len = 0x00000008, checksum = 0x000001B0 +record: start = 0x00001000, len = 0x00002B30, checksum = 0x00122CAB +record: start = 0x00004000, len = 0x00000160, checksum = 0x0000684B +record: start = 0x00005000, len = 0x00000054, checksum = 0x000008EE +record: start = 0x00005054, len = 0x00000030, checksum = 0x00000DA9 +record: start = 0x00000000, len = 0x00001000, checksum = 0x00000000 +Done. +jtag> +
+
+
+JTAG commands +
+Overview +Following is a list of commands currently supported by jtag and some +example usage. + + + + +bit + + + +define new BSR bit + + + + + +bus + + + +change active bus + + + + + +bsdl + + + +manage BSDL files + + + + + +cable + + + +select JTAG cable + + + + + +detect + + + +detect parts on the JTAG chain + + + + + +detectflash + + + +detect parameters of flash chips attached to a part + + + + + +discovery + + + +discovery of unknown parts in the JTAG chain + + + + + +dr + + + +display active data register for a part + + + + + +endian + + + +set/print endianess for reading/writing binary files + + + + + +eraseflash + + + +erase flash memory by number of blocks + + + + + +flashmem + + + +burn flash memory with data from a file + + + + + +frequency + + + +setup JTAG frequency + + + + + +get + + + +get external signal value + + + + + +help + + + +display this help + + + + + +include + + + +include command sequence from external file + + + + + +initbus + + + +initialize bus driver for active part + + + + + +instruction + + + +change active instruction for a part or declare new instruction + + + + + +part + + + +change active part for current JTAG chain + + + + + +peek + + + +read a single word + + + + + +poke + + + +write a single word + + + + + +print + + + +display JTAG chain list/status + + + + + +quit + + + +exit and terminate this session + + + + + +readmem + + + +read content of the memory and write it to file + + + + + +register + + + +define new data register for a part + + + + + +scan + + + +detect changes on input pins of current part + + + + + +set + + + +set external signal value + + + + + +shift + + + +shift data/instruction registers through JTAG chain + + + + + +signal + + + +define new signal for a part + + + + + +svf + + + +execute svf commands from file + + + + + +writemem + + + +write content from file to memory + + + + +Some tools derived from the same openwince JTAG Tools code base as UrJTAG +know additional commands, which are not supported in UrJTAG. See the section +about "Unsupported commands", below, about workarounds. + +
+
+Basic commands +
+quit +This command closes the jtag console. + +
+
+help +Without additional parameter it gives an overview of the available commands. +With a parameter you can get more information about any of the commands. +Example: + +jtag> help cable +Most cable drivers require some more details about the cable to start properly. +To learn about the details, use the "cable" command with the name of the cable +followed by the word "help". Example: + +jtag> cable wiggler help +
+
+include +Run commands from a named script file installed with UrJTAG or applies a BSDL +file to the active part. The directory prefix is added automatically +(e.g. /usr/share/urjtag/, depending on your installation), unless the file +name starts with a dot or slash. + +For example, the following startup sequence configures the cable, chain, and +loads definitions and bus driver for a Samsung S3C4510B CPU to peek its memory +at 0x0: + +jtag> cable wiggler ppdev /dev/parport0 +jtag> detect +jtag> include samsung/s3c4510b/s3c4510b +jtag> peek 0x0000 +If the file contains valid BSDL syntax, it will be converted to native +commands on the fly. + +Optionally, a number X may be specified following the file name, to cause +an X times repetition of the command sequence from the file. + +
+
+
+Chain management +
+cable +Sets and initialized the cable driver. This is usually the first command that +you are executing in a session. Example: + +jtag> cable EA253 parallel 0x378 +Initializing ETC EA253 JTAG Cable on parallel port at 0x378 +For a parallel cable using the ppdev driver you would use this: + +jtag> cable DLC5 ppdev /dev/parport0 +If you get an error, it may be that the parallel port kernel driver +was compiled as a module in your Linux kernel and wasn't loaded automatically. +Then you should try to load the ppdev driver manually (with root rights outside +the jtag shell): + +modprobe ppdev +modprobe parport +modprobe parport_pc +UrJTAG now also supports some USB cables. Unfortunately, there is no standard +for "JTAG over USB", so this support is limited to a few selected cables only. +For cables based on the FT2232 chip from FTDI, the cable command has to be +given cable name, driver name, and USB Vendor and Product ID of the cable: + +jtag> cable ARM-USB-OCD ftdi-mpsse 15ba:3 +For some cables, UrJTAG knows the VID:PID and you can just say ":" + +jtag> cable JTAGkey ftdi-mpsse : +On Windows, if UrJTAG was compiled to use the drivers supplied by +FTDI, the command should instead look like this: + +jtag> cable ARM-USB-OCD ftd2xx-mpsse 15ba:3 +The support for USB-based cables and their configuration is work +in progress; the above syntax may change (i.e. become simpler) soon. + +
+
+detect +Detects devices on the chain. Example: + +jtag> detect +IR length: 5 +Chain length: 1 +Device Id: 01011001001001100100000000010011 + Manufacturer: Intel + Part: PXA250 + Stepping: C0 + Filename: /usr/local/share/jtag/intel/pxa250/pxa250c0 +During "detect", UrJTAG searches through the files in its database (usually in +/usr/share/urjtag) and optionally in the search path for BSDL files (see bsdl +command) to find a match for the manufacturer, revision and part number for the +IDCODE read from the part. However, not all parts identify themselves in a way +that is useful for "detect". For example, many chips with an ARM processor core +inside present an IDCODE that may be specific to the the particular core inside +the chip (e.g. ARM7TDMI), but doesn't tell about the actual manufacturer of +the chip. In such case, the data for the part has to be included manually. See +also the documentation for the "include" command. + +
+
+print +Print a list of parts in the chain and the currently active instruction per part. + +
+
+initbus +Selects and initializes a bus of the currently selected part, e.g. the external +memory bus of a CPU. This is required in order to access chips that aren't +connected in the JTAG chain, but indirectly accessible through other chips +(e.g. CPU or programmable logic). + +Type "help initbus" to get a list of supported bus types. +If you do not find a bus driver for your specific hardware, you might be lucky +enough to have EJTAG in your target (most MIPS-based CPUs do) and should try +the "ejtag" bus driver. In contrast to the method "via BSR", it uploads some +instructions to the CPU and triggers their execution to access the bus, and +should work with almost any EJTAG-capable chip (Note: JTAG isn't EJTAG): + +jtag> initbus ejtag +There's another option to support new chips "via BSR", the "prototype" bus +driver, which can be adapted to support your part with command parameters. +The only prerequisite for using this driver is knowledge of the names of the +signals that represent address bus, data bus, and enable signals, and that +address and data lines are numbered in order. + +For example, assume the signals are named in the BSDL description as follows: + + + + +Data bus: D0, D1, … D31 + + + + +Address bus: ADDR0, ADDR1, … ADDR22 + + + + +Output Enable: nOE + + + + +Write Enable: nWE + + + + +Chip Select: nRCS0 + + + +The enable signals seem to be active low (indicated by the leading "n" in their +names). Further we assume the interesting connected part, some flash chip, is +only 16 bits wide even though the data bus width is 32 bits. With this +information, you could use the following command (all on a single line!) to +access the bus: + +initbus prototype amsb=ADDR22 alsb=ADDR0 dmsb=D15 dlsb=D0 + ncs=nRCS0 nwe=nWE noe=nOE amode=x16 +The "prototype" bus driver yet cannot deal with systems where address and data +bus are multiplexed on the same pins. If signals aren't numbered in the right +order or with gaps, you may get along by defining proper names as aliases for +the actual signals, with commands like "salias ADDR12 BSCGX44". + +Most drivers work "via BSR", i.e. they directly access the pins of the device. +Because it isn't possible to efficiently address only particular pins but only +all at once, and data for all pins has to be transferred through JTAG for every +single change, this method isn't the fastest, but usually easiest to implement +and, well, sometimes it counts whether it works at all.. + +Some chips don't allow direct access to their pins via BSR at all. For these, +writing a new bus driver that utilizes a debug module to upload specific code +to access the bus is inevitable. + +
+
+
+Part definition commands +The following commands are also used in the data files to define a device (IC) +on the JTAG chain. It is not recommended to use these commands in an interactive +session. Instead you should produce a device definition file out of a .bsd file +using one of the supplied tools (or use the new BSDL subsystem, see below). + + + + +bit + + + +define new BSR bit + + + + + +instruction + + + +change active instruction for a part or declare new instruction + + + + + +register + + + +define new data register for a part + + + + + +signal + + + +define new signal for a part + + + + +
+
+TAP control +The following commands can be used to directly manipulate and display the state +of the TAP controller(s) and registers in the chain: + + + + +dr + + + +display active data register for a part + + + + + +instruction + + + +change active instruction for a part or declare new instruction + + + + + +get + + + +get external signal value + + + + + +scan + + + +detect changes on input pins of current part + + + + + +set + + + +set external signal value + + + + + +shift + + + +shift data/instruction registers through JTAG chain + + + + +
+
+RAM/Flash access +These commands can be used if a part in the chain has memory connected to it +(or integrated). Before they can be used, a bus driver has to be selected and +initialized (see initbus command). + + + + +detectflash + + + +detect parameters of flash chips attached to a part + + + + + +endian + + + +set/print endianess for reading/writing binary files + + + + + +eraseflash + + + +erase flash memory by number of blocks + + + + + +flashmem + + + +burn flash memory with data from a file + + + + + +peek + + + +read a single word + + + + + +poke + + + +write a single word + + + + + +readmem + + + +read content of the memory and write it to file + + + + + +writemem + + + +write content from file to memory + + + + +
+
+Highlevel commands +
+svf +The SVF player operates on a single part in the scan chain. Therefore, you +have to bring up the jtag software, specify a cable and detect the scan +chain beforehand. + +The player will establish a new instruction called "SIR" and a new register +called "SDR". They are used internally by the respective SVF commands and are +reassigned with new values as the player advances through the file. It is not +recommended to use them outside of the SVF player as their content is dynamic. + +An example session: + +jtag> cable ppdev /dev/parport0 DLC5 +Initializing Xilinx DLC5 JTAG Parallel Cable III on ppdev port /dev/parport0 +jtag> detect +IR length: 5 +Chain length: 1 +Device Id: 10010000101000100000000010010011 + Manufacturer: Xilinx + Part: XC2S300E-PQ208 + Stepping: 9 + Filename: /usr/local/share/jtag/xilinx/xc2s300e-pq208/xc2s300e-pq208 +jtag> part <desired part of the scan chain> +jtag> svf <SVF file for selected part> +jtag> instruction BYPASS +jtag> shift ir +jtag> part <next part> +jtag> svf <SVF file for selected part> +jtag> instruction BYPASS +jtag> shift ir +It is recommended to set the part's instruction register to BYPASS although +most SVF files do this at the end. By setting the instruction explicitely to +BYPASS the output of the print command will always show meaningful +information. + +The SVF player will issue messages when situations arise that cannot be +handled. These messages are classified as warnings or errors depending on +whether the player can continue operation (warning) or not (error). +In case the TDO parameter of an SDR command leads to a mismatch the player +issues a warning and continues. If the player should abort in this case then +specify stop at the svf command. + + +Limitations and Deficiencies +Several limitations exist for the SVF player. + +It has been tested so far with files generated by these tools: + + + + +Xilinx ISE WebPack 6.3.02i - 9.1.02i + + + + +Altera Quartus II 4.1sp1 - 7.0 + + + +Configuration for these devices has been tested so far: + + + + +Altera EPC1C12Q240 + + + + +Altera MAX3032, EPM3032ALC44 + + + + +Altera MAX3064, EPM3064ALC44 + + + + +Altera MAX7032, EPM7032SLC44 + + + + +Altera MAX7064, EPM7064SLC44, EPM7064STC44 + + + + +Xilinx Spartan-IIE, XC2S300E-PQ208 + + + + +Xilinx Spartan-3, XC3S1000-FG456, XC3S5000-FG900 + + + +The implementation of some SVF commands has deficiencies. + + + + +HIR, HDR commands not supported. + Their functionality should be covered by the part concept of JTAG Tools. + + + + +PIO command not supported. + + + + +PIOMAP command not supported. + + + + +RUNTEST SCK not supported. + The maximum time constraint is not guaranteed. + + + + +SIR + No check is done against the TDO parameter. + + + + +TRST + Parameters Z and ABSENT are not supported. + + + + +TIR, TDR commands not supported. + Their functionality should be covered by the part concept of JTAG Tools. + + + +Operation can be slowed down significantly when the FREQUENCY command has +been specified. This is not a problem of the SVF player itself but seem to +happen when the frequency of UrJTAG is set to a value larger than 0. +Configuration takes very long although the maximum allowed frequency is 10 MHz. +Consider to comment out the FREQUENCY command at the beginning of the SVF file. + + +
+
+bsdl +The bsdl command is used to set up and test the underlying BSDL subsystem of +UrJTAG. + +Whenever detect encounters a new part, a configuration process is +started. This involves matching the retrieved IDCODE against the part +descriptions in /usr/share/urjtag as described above. However, before this +database is searched for a suitable description, the BSDL subsystem is started +and searches for BSDL file that matches this device. If it finds a matching +file, traversal of the /usr/share/urjtag database is skipped. If not, then +this standard process follows. + +To tell the BSDL subsytem where to look for BSDL files, the bsdl path +pathlist command has to be issued prior to detect. The contents of +pathlist must be a semicolon-separated list of directories where BSDL files +are located. This list is stored by bsdl path and is used lateron when +detect calls the BSDL subsystem. + +The BSDL subsystem applies the first BSDL file that parses without +errors and that contains the correct IDCODE. Scanning the specified +directories happens in exactly the given order. Inside a directory however, +the order depends largely on your filesystem's behavior. +Further details of the bsdl command: + + + + +bsdl path <path1>[;<path2>[;<pathN>]] + set paths for locating BSDL files + + + + +bsdl debug on|off + switches debug messages on or off + + + + +bsdl test [file] + reads file (if specified) or all files found via bsdl path and + prints a short status, an active part is not required + + + + +bsdl dump [file] + reads file (if specified) or all files found via bsdl path and + prints all configuration commands, an active part is not required + + + +The bsdl dump file command implements the same functionality as +bsdl2jtag. +
+
+
+Unsupported commands +
+script +Although it's still there, its functionality has been merged into the include +command. Please use "include" instead. + +
+
+setdevice +This command was only there to support the SHARC 21065L processor, +which has no IDCODE and therefore can't be initialized correctly by +just running "detect". However, the proper initialization can be done +after "detect" by loading the proper declarations and bus driver manually: + +jtag> include analog/sharc21065l/sharc21065l +
+
+spiflashmem +The commands "spidetectflash", "spiflashmem", "spireadflash" and +"spieraseflash" only exist in a version of the JTAG tools copyrighted by +Intratrade Ltd., we just know about them from a posting on the net. + +
+
+
+
+ +Internals +This section yet is only a placeholder for the information that will +be added soon… + +
+Files +
+Source code Overview + + + +doc/ + + + +Documentation + + + + + +data/ + + + +Part descriptions (Data files) + + + + + +include/ + + + +C header files + + + + + +src/ + + + +C source code + + + + + +src/bsdl + + + +BSDL subsystem + + + + + +src/bus + + + +Bus driver for various CPUs and other parts + + + + + +src/cmd + + + +Implementation of the commands for the "jtag" shell + + + + + +src/flash + + + +Flash detection and programming algorithms + + + + + +src/jim + + + +JIM, the JTAG target simulator + + + + + +src/lib + + + +Utility functions + + + + + +src/part + + + +Functions for accessing specific parts in a chain + + + + + +src/svf + + + +SVF player + + + + + +src/tap + + + +Functions for accessing the chain in general + + + + +
+
+
+Drivers + + + +Cable-specific drivers + + + + +Parport drivers + + + + +TAP drivers + + + + +Chain drivers + + + + +Bus drivers + + + + +Flash drivers + + + + +Commands + + + +
+Cable-specific drivers (src/tap/cable) +Cable-specific drivers are those which are visible to the user through +the "jtag" command shell. They're listed in response to the "help cable" +command. Each driver has to provide the following functions: + + + + +connect(), init() - Initialization + + + + +done(), cable_free(), disconnect() - Cleaning up + + + + +set_frequency() - set bitrate for shifting data through the chain + + + + +clock(), get_tdo(), transfer() - immediate JTAG activities + + + + +flush() - internally used to actually perform JTAG activities + + + + +help() - a help text to be displayed by the jtag command shell + + + +
+Initialization +After allocating a "cable_t" structure, a pointer to it and further +parameters (as strings) have to be passed first to the selected cable's +connect() function. + +Following that, the init() function is called via cable_init(). If cable_init() +returns a zero value, all is fine and the cable is ready for use. + +
+
+Cleaning up +There are two functions for actual cleanup: + + + + +done() is responsible for driving the hardware to a safe and consistent state. + + + + +cable_free() then can be used to clean up eventually extra allocated memory etc. + + + +Both are usually called from chain_disconnect(). + +An additional mechanism allows to clean up if a disconnection was detected by +the low level driver (e.g. USB or parallel port driver). A cable has to provide +a disconnect() function for this purpose: + + + + +Low level (e.g. parport) driver calls cable driver->disconnect() + + + + +cable driver->disconnect() calls chain_disconnect() + + + + +chain_disconnect() calls cable driver->done() + + + + +chain_disconnect() then calls cable driver->cable_free() + + + +After return from chain_disconnect() to cable driver->disconnect(), the cable_t +structure has been freed and must not be accessed anymore. + +
+
+JTAG Activities +Currently the API provides five different functions for performing operations +at the JTAG interface on the low level signal level (using the four signals +TMS, TCK, TDI, and TDO). + + + + +clock(tms,tdi,n) takes values for TMS and TDI output as its parameters, ensures that actual cable signals are set accordingly, and does a 0-1 transition on TCK (n times) + + + + +get_tdo() returns the current value at the TDO input. + + + + +set_trst(x) sets the TRST signal and returns the current value. + + + + +get_trst() returns the current value of the TRST signal. + + + +For many JTAG adapters, there's almost no delay when doing alternating clock() +and get_tdo(). Writing and reading happens immediately and the result is +available immediately as well. This is the case with most parallel port +adapters (but not when attached to USB-to-parallel adapters or USB docking +stations) and memory mapped IO (e.g. general purpose I/O pins of +microcontrollers). + +But there are adapters, especially USB and Ethernet based adapters, which +exhibit a rather long delay between the initiation of reading a bit and the +delivery of the value of the bit. It is at least 1 millisecond with USB, +which would limit the transfer rate to 1 kHz. One way to workaround this +is to transmit bits compacted into bytes and chunks of bytes, which is +possible with the transfer() function. + + + + +transfer(in, out) + + + +The transfer() function does a series of TCK pulses, with data for TDI read as +bytes from memory. The bytes are automatically serialized. TMS is set to zero +during transfer()s. Optionally, prior to each bit shifted out to the interface, +TDO input can be read into memory (deserialized into a byte array of the same +size as the input array). + +It still doesn't yield much improvement if the operation consists of many read +and write transitions (e.g. repeatedly writing an instruction and some data +register values, then reading from the data register, as it is necessary for +memory access). For that reason, the above functions are also available in +variants that don't cause immediate activity, but rather schedule it for later. +In the API, they're visible as + + + + +cable_defer_clock() + + + + +cable_defer_get_tdo() + + + + +cable_defer_set_trst() + + + + +cable_defer_get_trst() + + + + +cable_defer_transfer() + + + +These functions aren't implemented in the cable driver (but currently in +src/tap/cable.c). The cable driver just has to provide a flush() function to +actually execute the queued activity in some cable-specific optimal way, and +to store the results of get_tdo() and transfer() activity. The caller later +can pick up the results using these functions (implemented in cable.c): + + + + +cable_get_tdo_late() + + + + +cable_get_trst_late() + + + + +cable_transfer_late() + + + +As an example, consider the following sequence of activities: + + + + +clock() + + + + +get_tdo() + + + + +clock() + + + + +get_tdo() + + + +If the result of the first get_tdo() isn't absolutely required before the +second clock(), the sequence can be optimized into the following sequence (if + + + + +defer_clock() + + + + +defer_clock() + + + + +flush() + + + + +get_tdo_late() + + + + +get_tdo_late() + + + +The next sections explain the queueing mechanism and its limits in detail. + +
+
+When flushing occurs ====== +The cable_flush() function is used to flush the queue towards the cable. It +takes one additional argument, "how_much", which may be one of + + + + +OPTIONALLY: The cable driver may flush if it's reasonable (e.g. if the + queue has been filled so that some buffer limit for the cable interface + is reached). It would be wise to flush early to keep the queue small, if + there is no point in queueing up more items because the transfer to the + cable would have to be split into smaller chunks anyway. This is used by + UrJTAG immediately after adding items to the queue. + + + + +TO_OUTPUT: The cable driver should at least flush as much so that one + output becomes available in the output queue. If there's already something + in the output queue, this should be interpreted similar to OPTIONALLY. This + is used by UrJTAG immediately before it wants to use that output. + + + + +COMPLETELY: The cable driver has to flush the queue completely. This is + used by UrJTAG immediately before actions that circumvent the queueing + such as calls to the legacy clock/get_tdo functions. It could also be + used by application code to ensure that some action is actually done in + time. + + + +
+
+JTAG activity queueing +The source in src/tap/cable.c provides to important functions to access the +two queues "todo" (with activity to be done) and "done" (with results): + + + + +cable_add_queue_item + + + + +cable_get_queue_item + + + +In src/tap/cable/generic.c you'll find two implementations of dequeueing +algorithms, i.e. implementations of the flush() function. These could be used +by any new cable driver unless it provides a more sophisticated algorithm +itself: + + + + +generic_flush_one_by_one() simply calls the "classic" functions one after + another. The performance of the cable driver using this implementation will + be the same whether the immediate or defer variants of the functions are used. + + + + +generic_flush_using_transfer() tries to optimize as many clock() and + get_tdo() by transforming them into calls to transfer() instead. This can + give a slight advantage. + + + +The generic implementations also serve as a template for new cable-specific +implementations. + +
+
+Generic implementations +As a reference and in many cases completely sufficient for new cables, take a +look at the code in src/tap/cable/generic.c, which contains generic routines, +suitable for parallel port based cables (and some for other types of cables as +well). + +
+
+
+
+Data file format +JTAG declarations files are located in directory "data". The files contains +common part specific JTAG information in parseable form, e.g. list of the JTAG +commands, boundary scan register, list of JTAG registers, etc. + +Syntax of the JTAG declaration file is defined in the following subsections. + +
+General rules +JTAG declaration file is text file which consists of lines. Empty lines are +ignored. Text after first "#" on the line to the end of line is ignored. This +is useful for comments. All other lines are significant. + +Each significant line consists of tokens separated by whitespace. Whitespace +could be spaces and/or tabs. + +
+
+Signal Definition +Signal definition line consists of word "signal" followed by whitespace and +signal name (without spaces in the name). Rest of the line should contain +whitespace separated list of pins of the part. This list is currently not used +for any purpose in JTAG Tools. It is intended for future use. + +
+
+
+Development +
+Future Plans + + + +C API and library package + + + + +Bindings for Python, Perl, … + + + + +TCP/IP access + + + + +New cable drivers + + + + +… + + + +
+
+How to contribute + + + +Using Subversion + + + + +Create and submit a patch + + + + +Use SourceForge trackers + + + +
+
+
+ +F.A.Q. +For a list of known problems in current versions, please also check the "Bugs" +tracker at the UrJTAG website! + + + + +Q. The documentation is incomplete. Where can I get more information? + + + + A. Please ask in the "Using UrJTAG" Forum on http://urjtag.org + + + + + +Q. My flash isn't detected or can't be programmed. What can I do? + + + + A. Please record the output of the "detect" and "detectflash" commands and ask in the Forum. If possible, re-compile UrJTAG before with "—enable-jedec-exp" to get extra information. + + + + + +Q. My CPU/FPGA/etc. chip isn't detected. What can I do? + + + + A. First try to get hold of a "BSDL" description of the chip from the vendor, and specify where to find this file to UrJTAG using "bsdl path" before you "detect". Second, a bus driver has to be selected. Maybe "ejtag" or "prototype" work. + + + + + +Q. When I type "cable parallel 0x378 DLC5" (in a Cygwin environment) I get "Unknown port driver: parallel"? + + + + A. Please install the Cygwin ioperm package, and re-configure/compile. + + + + + +Q. When I type "cable parallel 0x378 DLC5" (in a Cygwin environment) I get "Error: Cable initialization failed!". + + + + A. Please install ioperm.sys driver using ioperm -i command. + + + + + +Q. When running autogen.sh, I get "Can't exec "autopoint": No such file or directory" + + + + A. You need the headers for gettext (e.g. Debian package "gettext-devel"). + + + + + +Q. During compilation, I get "svf_bison.y: No such file or directory" + + + + A. You need "bison". + + + + + +Q. During compilation, I get "flex: can't open … src/svf/svf_flex.l" + + + + A. You need "flex" + + + + + +Q. During compilation, I get "src/svf/svf_flex.l", line 27: unrecognized %option: bison-locations" + + + + A. You need a newer version of flex. It should be 2.5.31 or newer; + Unfortunately, Cygwin comes with only 2.5.4a. You may try to compile and + install a newer version of flex from source to solve this. The distributed + source tarball contains source pregenerated with a current flex version, + you need flex yourself only to compile from fresh SVN checkouts. + + + + + + +Licensing +
+Overview +Various licenses are used for the UrJTAG project. The GPL is used for most +of the code except for some include files, JIM, and cable driver source, where +a BSD or MIT license is used; this is noted in the file headers. + +
+
+GNU Free Documentation License (FDL) + GNU Free Documentation License + Version 1.2, November 2002 + + + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (Thus, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. +
+
+GNU General Public License (GPL) + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. +
+
+
diff --git a/web/htdocs/book/UrJTAG.html b/web/htdocs/book/UrJTAG.html new file mode 100644 index 00000000..f2439c29 --- /dev/null +++ b/web/htdocs/book/UrJTAG.html @@ -0,0 +1,4986 @@ + +Universal JTAG library, server and tools

Universal JTAG library, server and tools

Kolja Waschk (Ed.)


Table of Contents
1. Copyright
2. General
2.1. JTAG
2.1.1. Introduction
2.1.2. Interfaces
2.1.3. Additions
2.1.4. BSDL and UrJTAG data files
2.1.5. SVF files
2.1.6. JAM/STAPL files
2.2. UrJTAG
2.2.1. Introduction
2.2.2. About this document
2.2.3. UrJTAG Website
2.2.4. The name "UrJTAG"
2.2.5. Authors, contributors, … thanks
2.2.6. UrJTAG and openwince JTAG Tools
2.3. System requirements
2.3.1. Supported host operating systems
2.3.2. Required software for running UrJTAG
2.3.3. Supported JTAG adapters/cables
2.3.4. JTAG-aware parts (chips)
2.3.5. Flash chips
2.4. Compilation and installation
2.4.1. Required software for compiling UrJTAG
2.4.2. Required libraries for USB support
2.4.3. Installing from source tar.gz
2.4.4. Installing from Subversion repository
2.4.5. Linking to FTD2XX.DLL in Cygwin environment
2.4.6. Using LibUSB-Win32 in Cygwin environment
2.4.7. Building the BSDL subsystem
3. Usage
3.1. Quick start
3.1.1. Run the software
3.1.2. Configure the cable
3.1.3. Detect parts on the JTAG chain
3.1.4. Print current JTAG chain status
3.1.5. Sample device pin status
3.1.6. Burn flash connected to the part
3.2. JTAG commands
3.2.1. Overview
3.2.2. Basic commands
3.2.3. Chain management
3.2.4. Part definition commands
3.2.5. TAP control
3.2.6. RAM/Flash access
3.2.7. Highlevel commands
3.2.8. Unsupported commands
4. Internals
4.1. Files
4.1.1. Source code Overview
4.2. Drivers
4.2.1. Cable-specific drivers (src/tap/cable)
4.3. Data file format
4.3.1. General rules
4.3.2. Signal Definition
4.4. Development
4.4.1. Future Plans
4.4.2. How to contribute
5. F.A.Q.
6. Licensing
6.1. Overview
6.2. GNU Free Documentation License (FDL)
6.3. GNU General Public License (GPL)

Chapter 1. Copyright

Copyright 2007, 2008 Kolja Waschk and the respective authors.

Permission is granted to copy, distribute and/or modify this document under the +terms of the GNU Free Documentation License, Version 1.2 or any later version +published by the Free Software Foundation. A copy of the license is included in +the section entitled "GNU Free Documentation License".


Chapter 2. General

2.1. JTAG

JTAG basics can be found all over the internet. This section should go into +some more details about working with JTAG. What hardware do you need, what is +the usage of JTAG, where do I get files. What file formats are available…


2.1.1. Introduction

JTAG (IEEE 1149.1) is a serial interface for testing devices with +integrated circuits. The problem that the JTAG interface was designed to solve +is checking if connections between ICs are OK. Therefore you can set and check +in- and outputs of ICs. In order to save pins and logic a very simple serial +design was invented.

  • One pin serial input +

  • One pin serial output +

  • One pin clock +

  • One pin control +

The control pin (together with clock) allows to switch device states. A state +machine inside each chip can be controlled, e.g. to reset the device. This +control machine also allows to have two internal shift registers in each device +(although we only have on in- and one output-pin). The registers are called +instruction register (IR) and data register (DR). The current UrJTAG tool +allows you to set the IR and set and get the DR. It doesn't allow you to +directly control the statemachine (yet).


2.1.2. Interfaces

The simplest interface that you can build is like the Xilinx parallel cable +(also called DLC5). If your device works with a 5V or 3.3V supply voltage then +this device can even be build just with passive parts. (picture missing here) +UrJTAG also supports a number of other interface adapters.


2.1.3. Additions

In the meantime the jtag specification was used as a basis for programming +flash files and debugging processors. UrJTAG supports programming a couple of +different flash devices. It also supports programming of non-flash devices via +svf files. UrJTAG does not support debugging yet. Other open source solutions +such as OpenOCD allow you to debug ARM processors with gdb.


2.1.4. BSDL and UrJTAG data files

The BSDL file format describes the jtag interface for one IC. It is a VHDL +syntax with the needed information (like pin-names, register lengths and +commands) that is usually done by the supplier. e.g. Xilinx BSDL files are +all included in their free web-pack (using file extension ".bsd").

UrJTAG uses a different file format internally. So in order to add a new device +to UrJTAG you need to convert those files and produce a directory structure. +Currently there are at least three tools available to do that; included with +UrJTAG is "bsdl2jtag". Please ask on the mailing list in case of problems with +that. Please also send proven working files back to this project.

Starting with post-0.7 releases, UrJTAG contains a BSDL subsystem that +retrieves the descriptions for chips in the chain from BSDL files on the +fly. Be aware that this feature is currently experimental and may not work +with every BSDL file yet.


2.1.5. SVF files

The SVF file format contains a number of high level commands to drive the jtag +bus. For example you can shift the IR or DR and even check for the results. +The Xilinxs impact and Altera QuartusII tools allow you to write this file to +program devices.

The player has been developed according to the "Serial Vector Format +Specification", Revision E, 8 March 1999 issued by ASSET InterTech, Inc. The +full specification can be found at +http://www.asset-intertech.com/support/svf.pdf

UrJTAG features an "SVF player" that can read SVF files and perform the +described actions on the bus.

SVF parser and lexer are also copyright 2002, CDS at http://www-csd.ijs.si/. +They have been reused from the "Experimental Boundary Scan" project at +http://ebsp.sourceforge.net/.


2.1.6. JAM/STAPL files

Another format for describing actions over JTAG interfaces is STAPL, actually +standardized as JEDEC "JESD-71A". Compared to SVF, it looks more like an +actual programming language and features looping, conditional execution, and +more. STAPL is not yet supported by UrJTAG.


2.2. UrJTAG

2.2.1. Introduction

UrJTAG Tools is a software package which enables working with JTAG-aware (IEEE +1149.1) hardware devices (parts) and boards through JTAG adapter.

This package has open and modular architecture with ability to write +miscellaneous extensions (like board testers, flash memory programmers, and so +on).

JTAG Tools package 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. Please read +COPYING file for more info.

This software may damage your hardware!

Feedback and contributions are welcome.


2.2.2. About this document

This documentation is far from being complete. You're encouraged to amend and +supplement it and submit your changes in the Bugs or Enhancements tracker +at the UrJTAG website.


2.2.3. UrJTAG Website

The most current version of this documentation and UrJTAG sourcecode +is always available from the project homepage at http://www.urjtag.org


2.2.4. The name "UrJTAG"

I (Kolja) favour short names, so I thought about adding only a few +letters to "JTAG". The prefix "Ur" in German means "ancestral", an "Ur-Vater" +is a forefather. UrJTAG shall become the forefather, the prototype for many +other JTAG tools. By mere chance the "Ur" is also another name for an aurochs, +an animal similar to the GNU…


2.2.5. Authors, contributors, … thanks

A list of contributors is maintained in the file THANKS in the source +distribution. Special thanks go to Marcel Telka, who actually "invented" the +JTAG tools and wrote most of this basis of UrJTAG, and Arnim Laeuger for his +continuous support and development of SVF and BSDL subsystem and FT2232 +drivers.


2.2.6. UrJTAG and openwince JTAG Tools

The JTAG Tools originally were developed by Marcel Telka as part of +the openwince project. Still a large portion of the source code is his work. +However, the last release of the JTAG tools was version 0.5.1 in 2003. After a +few years the development completely stalled. Every few months or so on the +project's mailing list someone asked about continuing, but a critical mass +wasn't reached before late 2007. A fork of the JTAG tools was created under the +wings of the UrJTAG project at Sourceforge.


2.3. System requirements

2.3.1. Supported host operating systems

JTAG Tools should run on all Unix like operating systems including MS Windows +with Cygwin installed.


2.3.2. Required software for running UrJTAG

Required only for MS Windows:

  • current Cygwin net installation from http://cygwin.com +

  • ioperm package (a part of the standard Cygwin net installation) +

It may be necessary to run the command "ioperm -i" to install the IOPERM.SYS +driver in the system.

If UrJTAG was compiled to use the readline library, it has to be present on +the system as well. It's probably a standard part of your distribution.

More software is needed if you want to compile UrJTAG (which you probably want +because currently no pre-compiled binaries are avaible…). See "Installation" +below.


2.3.3. Supported JTAG adapters/cables

See help cable command for up-to-date info.

  • Arcom JTAG Cable +

  • Altera ByteBlaster/ByteBlaster II/ByteBlasterMV Parallel Port Download Cable +

  • Altera USB-Blaster and compatible http://www.ixo.de/info/usb_jtag +

  • Xilinx DLC5 JTAG Parallel Cable III +

  • ETC EA253 JTAG Cable +

  • ETC EI012 JTAG Cable +

  • Ka-Ro TRITON (PXA255/250) JTAG Cable +

  • Keith &amp; Koep JTAG Cable +

  • Lattice Parallel Port JTAG Cable +

  • Mpcbdm JTAG Cable +

  • Macraigor Wiggler JTAG Cable +

  • Amontec JTAGkey (FT2232-based) +

  • Olimex ARM-USB-JTAG (FT2232-based) +

  • Olimex ARM-USB-TINY (FT2232-based) +

  • OOCDLink-s (FT2232-based) (experimental) http://www.joernonline.de/dw/doku.php?id=projects:oocdlink:2_oocdlinks +

  • Other FT2232-based USB JTAG cables (experimental) +

  • Xverve Signalyzer Tool (FT2232-based) (experimental) +

  • Turtelizer 2 (FT2232-based) (experimental) http://www.ethernut.de/en/hardware/turtelizer/ +

  • USB to JTAG Interface (FT2232-based) (experimental) http://www.hs-augsburg.de/~hhoegl/proj/usbjtag/usbjtag.html +

  • Xilinx Platform USB Cable (experimental) +


2.3.4. JTAG-aware parts (chips)

The data/ directory of the UrJTAG installation has some more, but at +least the following are supported:

  • Altera EP1C20F400 +

  • Altera EPM7128AETC100 +

  • Analog Devices Sharc-21065L +

  • Atmel ATmega128 (partial support) +

  • Broadcom BCM1250 +

  • Broadcom BCM3310 (partial support) +

  • Broadcom BCM5421S +

  • Broadcom BCM4712 (partial support) +

  • DEC SA1100 +

  • Hitachi HD64465 +

  • Hitachi SH7727 +

  • Hitachi SH7729 +

  • IBM PowerPC 440GX +

  • Intel IXP425 +

  • Intel SA1110 +

  • Intel PXA250/PXA255/PXA260/PXA261/PXA262/PXA263 +

  • Lattice LC4032V +

  • Lattice M4A3-64/32 +

  • Lattice M4A3-256/192 +

  • Motorola MPC8245 +

  • Samsung S3C4510B +

  • Sharp LH7A400 +

  • Toshiba TX4925/TX4926 +

  • Xilinx XC2C256-TQ144 +

  • Xilinx XCR3032XL-VQ44 +

  • Xilinx XCR3128XL-CS144 +

  • Xilinx XCR3128XL-VQ100 +

  • Xilinx XCR3256XL-FT256 +


2.3.5. Flash chips

Not all chips are supported in every possible configuration, there may +be untested combinations of chip type, bus width, …

  • Intel 28FxxxJ3A (28F320J3A, 28F640J3A, 28F128J3A) +

  • Intel 28FxxxK3 (28F640K3, 28F128K3, 28F256K3) +

  • Intel 28FxxxK18 (28F640K18, 28F128K18, 28F256K18) +

  • AMD Am29LV64xD (Am29LV640D, Am29LV641D, Am29LV642D) +

  • AMD Am29xx040B (Am29F040B, Am29LV040B) +


2.4. Compilation and installation

2.4.1. Required software for compiling UrJTAG

To run autogen.sh, you need autoconf and automake, bison, and a recent flex.

The distributed source tarball contains source pregenerated with a current flex +version; flex therefore is only needed if you want to compile code checked +out from our Subversion repository. Flex 2.5.4a as it comes with Cygwin will +work but some parts of UrJTAG (namely the SVF player) become more verbose if +Flex 2.5.31 or newer is used. Building the BSDL subsystem files requires Flex +2.5.33 or newer. The configure script will compare the available Flex version +against these preconditions and enables or disables the related features. ,

Furthermore, libtool should be available, and "devel" versions of the following +packages:

  • gettext +

  • readline (not needed, but really eases interactive use) +

  • ioperm (needed only for Cygwin) +


2.4.2. Required libraries for USB support

For USB adapter support (including support for parallel port adapters attached +to USB-to-parallel converters), one or more additional libraries are required.

Many USB JTAG adapters and USB-to-parallel converters are based on chips +made by FTDI. To support these, either intra.net's "libftdi" or FTDI's +"FTD2XX" library can be used.

On many modern Linux distributions, libftdi is available as a precompiled +package and can be installed using the distribution's package management system +(e.g. "apt-get libftdi-dev" for Debian and Ubuntu). If it isn't available or +you don't run Linux, you can get it from

  • http://www.intra2net.com/de/produkte/opensource/ftdi/ +

Alternatively, you can use the FTD2XX library from the chip manufacturer FTDI. +It is available for Linux and Windows. To use the library for Windows in a +Cygwin environment, first get it from:

  • http://www.ftdichip.com/Drivers/D2XX.htm +

Unzip the CDM*.zip to some directory and tell UrJTAG about this directory +during the configure step before actual compilation:

./configure --with-libftd2xx=/cygdrive/c/windows/temp/CDM_Drivers

All other USB JTAG adapters can be supported only if libusb is installed. +There is a libusb-win32 variant that can be used in a Cygwin environment:

  • http://libusb.sourceforge.net (libusb) +

  • http://libusb-win32.sourceforge.net (libusb for Windows) +

For specific notes regarding the use of these libraries in a Cygwin +environmen, see below.


2.4.3. Installing from source tar.gz

The installation follows the standard configure, make, make install scheme:

tar xzvf urjtag.tar.gz
+cd ../jtag
+./configure
+make
+make install

2.4.4. Installing from Subversion repository

If you want to try the very newest version of UrJTAG…

svn co http://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk urjtag
cd urjtag/jtag
+./autogen.sh
+# ./configure done by autogen.sh; run it here with special options if needed
+make
+make install

2.4.5. Linking to FTD2XX.DLL in Cygwin environment

Before running configure, get the D2XX drivers from FTDI.

  • http://www.ftdichip.com/Drivers/D2XX.htm (FTDI FTD2XX library) +

Unzip the archive into a directory of your choice (probably a choice +without spaces in the name is better) and afterwards run configure with the +"—with-ftd2xx" pointing to that directory, e.g.

./configure --with-ftd2xx="/cygdrive/c/temp/ftdi-cdm-drivers"

Configure should now report

FTDI cable support
+  ...
+  via libftd2xx        : yes

2.4.6. Using LibUSB-Win32 in Cygwin environment

Before running configure, install the LibUSB-Win32 "filter" driver from SF.

  • http://libusb-win32.sourceforge.net +

Then point configure to the directory where LibUSB-Win32 was installed (it +might give problems if the path contains spaces, as "Program Files" does!):

./configure --with-libusb="/cygdrive/c/Programme/LibUSB-Win32/"

2.4.7. Building the BSDL subsystem

As mentioned above, building the BSDL lexer requires Flex 2.5.33 or newer. If +the detected Flex version is not recent enough, configure will disable the +BSDL subsystem. The detection result is summarized at the end of configure:

jtag is now configured for
+  ...
+  Build BSDL subsystem : yes

Flex is only required when you're working on a check-out of the Subversion +repository. In this case Flex has to be called to transform bsdl_flex.l to +bsdl_flex.c. When you're compiling from released sources, the local Flex +version is not relevant since the output file of Flex is part of the +tarball. I.e. even if the local Flex fails the check, the BSDL subsystem is +enabled and will be compiled from the released C files.


Chapter 3. Usage

3.1. Quick start

3.1.1. Run the software

Connect your JTAG adapter between your PC and target device and turn +on your device.

To run JTAG Tools type "jtag" and press Enter. jtag should start and +display some initial informations. Output should end with line like this:

This is "jtag command prompt". Type "help" and press Enter for initial help
+about available commands. To exit JTAG Tools type "quit" and press Enter.

3.1.2. Configure the cable

Type "help cable" for list of supported JTAG cables.

Type "cable" command followed by the cable name and possibly further +arguments for cable configuration. Example:

jtag> cable EA253 parallel 0x378
+Initializing ETC EA253 JTAG Cable on parallel port at 0x378

See the section about the "cable" command for details and USB support.


3.1.3. Detect parts on the JTAG chain

Type "detect" at the jtag command prompt:

jtag> detect

Your output should look like this:

IR length: 5
+Chain length: 1
+Device Id: 01011001001001100100000000010011
+  Manufacturer: Intel
+  Part:         PXA250
+  Stepping:     C0
+  Filename:     /usr/local/share/urjtag/intel/pxa250/pxa250c0

If you get empty output or an error message your JTAG adapter is not connected +properly, or your target board doesn't work, or it is turned off.

The "detect" command is required before all other commands.


3.1.4. Print current JTAG chain status

jtag> print chain
+ No. Manufacturer Part   Stepping Instruction Register
+---------------------------------------------------------
+   0 Intel        PXA250 C0       BYPASS      BR

3.1.5. Sample device pin status

jtag> instruction SAMPLE/PRELOAD
+jtag> shift ir
+jtag> shift dr
+jtag> dr
+1000110010000010000110010111111111111111111001101110...
+jtag> print chain
+ No. Manufacturer Part   Stepping Instruction    Register
+------------------------------------------------------------
+   0 Intel        PXA250 C0       SAMPLE/PRELOAD BSR
+jtag> get signal BOOT_SEL[0]
+BOOT_SEL[0] = 0
+jtag>
Note: BSR is "Boundary Scan Register"

3.1.6. Burn flash connected to the part

jtag> flashmem 0 brux.b
+0x00000000
+Note: Supported configuration is 2 x 16 bit only
+BOOT_SEL: Asynchronous 32-bit ROM
2 x 16 bit CFI devices detected (QRY ok)!
program:
+block 0 unlocked
+erasing block 0: 0
+addr: 0x00002854
+verify:
+addr: 0x00002854
+Done.
+jtag>

or:

jtag> flashmem msbin xboot.bin
+Note: Supported configuration is 2 x 16 bit only
+BOOT_SEL: Asynchronous 32-bit ROM
2 x 16 bit CFI devices detected (QRY ok)!
block 0 unlocked
+erasing block 0: 0
+program:
+record: start = 0x00000000, len = 0x00000004, checksum = 0x000001EB
+record: start = 0x00000040, len = 0x00000008, checksum = 0x000001B0
+record: start = 0x00001000, len = 0x00002B30, checksum = 0x00122CAB
+record: start = 0x00004000, len = 0x00000160, checksum = 0x0000684B
+record: start = 0x00005000, len = 0x00000054, checksum = 0x000008EE
+record: start = 0x00005054, len = 0x00000030, checksum = 0x00000DA9
+record: start = 0x00000000, len = 0x00001000, checksum = 0x00000000
verify:
+record: start = 0x00000000, len = 0x00000004, checksum = 0x000001EB
+record: start = 0x00000040, len = 0x00000008, checksum = 0x000001B0
+record: start = 0x00001000, len = 0x00002B30, checksum = 0x00122CAB
+record: start = 0x00004000, len = 0x00000160, checksum = 0x0000684B
+record: start = 0x00005000, len = 0x00000054, checksum = 0x000008EE
+record: start = 0x00005054, len = 0x00000030, checksum = 0x00000DA9
+record: start = 0x00000000, len = 0x00001000, checksum = 0x00000000
Done.
+jtag>

3.2. JTAG commands

3.2.1. Overview

Following is a list of commands currently supported by jtag and some +example usage.

bit +

define new BSR bit +

+

bus +

change active bus +

+

bsdl +

manage BSDL files +

+

cable +

select JTAG cable +

+

detect +

detect parts on the JTAG chain +

+

detectflash +

detect parameters of flash chips attached to a part +

+

discovery +

discovery of unknown parts in the JTAG chain +

+

dr +

display active data register for a part +

+

endian +

set/print endianess for reading/writing binary files +

+

eraseflash +

erase flash memory by number of blocks +

+

flashmem +

burn flash memory with data from a file +

+

frequency +

setup JTAG frequency +

+

get +

get external signal value +

+

help +

display this help +

+

include +

include command sequence from external file +

+

initbus +

initialize bus driver for active part +

+

instruction +

change active instruction for a part or declare new instruction +

+

part +

change active part for current JTAG chain +

+

peek +

read a single word +

+

poke +

write a single word +

+

print +

display JTAG chain list/status +

+

quit +

exit and terminate this session +

+

readmem +

read content of the memory and write it to file +

+

register +

define new data register for a part +

+

scan +

detect changes on input pins of current part +

+

set +

set external signal value +

+

shift +

shift data/instruction registers through JTAG chain +

+

signal +

define new signal for a part +

+

svf +

execute svf commands from file +

+

writemem +

write content from file to memory +

+

Some tools derived from the same openwince JTAG Tools code base as UrJTAG +know additional commands, which are not supported in UrJTAG. See the section +about "Unsupported commands", below, about workarounds.


3.2.2. Basic commands

3.2.2.1. quit

This command closes the jtag console.


3.2.2.2. help

Without additional parameter it gives an overview of the available commands. +With a parameter you can get more information about any of the commands. +Example:

jtag> help cable

Most cable drivers require some more details about the cable to start properly. +To learn about the details, use the "cable" command with the name of the cable +followed by the word "help". Example:

jtag> cable wiggler help

3.2.2.3. include

Run commands from a named script file installed with UrJTAG or applies a BSDL +file to the active part. The directory prefix is added automatically +(e.g. /usr/share/urjtag/, depending on your installation), unless the file +name starts with a dot or slash.

For example, the following startup sequence configures the cable, chain, and +loads definitions and bus driver for a Samsung S3C4510B CPU to peek its memory +at 0x0:

jtag> cable wiggler ppdev /dev/parport0
+jtag> detect
+jtag> include samsung/s3c4510b/s3c4510b
+jtag> peek 0x0000

If the file contains valid BSDL syntax, it will be converted to native +commands on the fly.

Optionally, a number X may be specified following the file name, to cause +an X times repetition of the command sequence from the file.


3.2.3. Chain management

3.2.3.1. cable

Sets and initialized the cable driver. This is usually the first command that +you are executing in a session. Example:

jtag> cable EA253 parallel 0x378
+Initializing ETC EA253 JTAG Cable on parallel port at 0x378

For a parallel cable using the ppdev driver you would use this:

jtag> cable DLC5 ppdev /dev/parport0

If you get an error, it may be that the parallel port kernel driver +was compiled as a module in your Linux kernel and wasn't loaded automatically. +Then you should try to load the ppdev driver manually (with root rights outside +the jtag shell):

modprobe ppdev
+modprobe parport
+modprobe parport_pc

UrJTAG now also supports some USB cables. Unfortunately, there is no standard +for "JTAG over USB", so this support is limited to a few selected cables only. +For cables based on the FT2232 chip from FTDI, the cable command has to be +given cable name, driver name, and USB Vendor and Product ID of the cable:

jtag> cable ARM-USB-OCD ftdi-mpsse 15ba:3

For some cables, UrJTAG knows the VID:PID and you can just say ":"

jtag> cable JTAGkey ftdi-mpsse :

On Windows, if UrJTAG was compiled to use the drivers supplied by +FTDI, the command should instead look like this:

jtag> cable ARM-USB-OCD ftd2xx-mpsse 15ba:3

The support for USB-based cables and their configuration is work +in progress; the above syntax may change (i.e. become simpler) soon.


3.2.3.2. detect

Detects devices on the chain. Example:

jtag> detect
+IR length: 5
+Chain length: 1
+Device Id: 01011001001001100100000000010011
+  Manufacturer: Intel
+  Part:         PXA250
+  Stepping:     C0
+  Filename:     /usr/local/share/jtag/intel/pxa250/pxa250c0

During "detect", UrJTAG searches through the files in its database (usually in +/usr/share/urjtag) and optionally in the search path for BSDL files (see bsdl +command) to find a match for the manufacturer, revision and part number for the +IDCODE read from the part. However, not all parts identify themselves in a way +that is useful for "detect". For example, many chips with an ARM processor core +inside present an IDCODE that may be specific to the the particular core inside +the chip (e.g. ARM7TDMI), but doesn't tell about the actual manufacturer of +the chip. In such case, the data for the part has to be included manually. See +also the documentation for the "include" command.


3.2.3.3. print

Print a list of parts in the chain and the currently active instruction per part.


3.2.3.4. initbus

Selects and initializes a bus of the currently selected part, e.g. the external +memory bus of a CPU. This is required in order to access chips that aren't +connected in the JTAG chain, but indirectly accessible through other chips +(e.g. CPU or programmable logic).

Type "help initbus" to get a list of supported bus types. +If you do not find a bus driver for your specific hardware, you might be lucky +enough to have EJTAG in your target (most MIPS-based CPUs do) and should try +the "ejtag" bus driver. In contrast to the method "via BSR", it uploads some +instructions to the CPU and triggers their execution to access the bus, and +should work with almost any EJTAG-capable chip (Note: JTAG isn't EJTAG):

jtag> initbus ejtag

There's another option to support new chips "via BSR", the "prototype" bus +driver, which can be adapted to support your part with command parameters. +The only prerequisite for using this driver is knowledge of the names of the +signals that represent address bus, data bus, and enable signals, and that +address and data lines are numbered in order.

For example, assume the signals are named in the BSDL description as follows:

  • Data bus: D0, D1, … D31 +

  • Address bus: ADDR0, ADDR1, … ADDR22 +

  • Output Enable: nOE +

  • Write Enable: nWE +

  • Chip Select: nRCS0 +

The enable signals seem to be active low (indicated by the leading "n" in their +names). Further we assume the interesting connected part, some flash chip, is +only 16 bits wide even though the data bus width is 32 bits. With this +information, you could use the following command (all on a single line!) to +access the bus:

initbus prototype amsb=ADDR22 alsb=ADDR0 dmsb=D15 dlsb=D0
+          ncs=nRCS0 nwe=nWE noe=nOE amode=x16

The "prototype" bus driver yet cannot deal with systems where address and data +bus are multiplexed on the same pins. If signals aren't numbered in the right +order or with gaps, you may get along by defining proper names as aliases for +the actual signals, with commands like "salias ADDR12 BSCGX44".

Most drivers work "via BSR", i.e. they directly access the pins of the device. +Because it isn't possible to efficiently address only particular pins but only +all at once, and data for all pins has to be transferred through JTAG for every +single change, this method isn't the fastest, but usually easiest to implement +and, well, sometimes it counts whether it works at all..

Some chips don't allow direct access to their pins via BSR at all. For these, +writing a new bus driver that utilizes a debug module to upload specific code +to access the bus is inevitable.


3.2.4. Part definition commands

The following commands are also used in the data files to define a device (IC) +on the JTAG chain. It is not recommended to use these commands in an interactive +session. Instead you should produce a device definition file out of a .bsd file +using one of the supplied tools (or use the new BSDL subsystem, see below).

bit +

define new BSR bit +

+

instruction +

change active instruction for a part or declare new instruction +

+

register +

define new data register for a part +

+

signal +

define new signal for a part +

+


3.2.5. TAP control

The following commands can be used to directly manipulate and display the state +of the TAP controller(s) and registers in the chain:

dr +

display active data register for a part +

+

instruction +

change active instruction for a part or declare new instruction +

+

get +

get external signal value +

+

scan +

detect changes on input pins of current part +

+

set +

set external signal value +

+

shift +

shift data/instruction registers through JTAG chain +

+


3.2.6. RAM/Flash access

These commands can be used if a part in the chain has memory connected to it +(or integrated). Before they can be used, a bus driver has to be selected and +initialized (see initbus command).

detectflash +

detect parameters of flash chips attached to a part +

+

endian +

set/print endianess for reading/writing binary files +

+

eraseflash +

erase flash memory by number of blocks +

+

flashmem +

burn flash memory with data from a file +

+

peek +

read a single word +

+

poke +

write a single word +

+

readmem +

read content of the memory and write it to file +

+

writemem +

write content from file to memory +

+


3.2.7. Highlevel commands

3.2.7.1. svf

The SVF player operates on a single part in the scan chain. Therefore, you +have to bring up the jtag software, specify a cable and detect the scan +chain beforehand.

The player will establish a new instruction called "SIR" and a new register +called "SDR". They are used internally by the respective SVF commands and are +reassigned with new values as the player advances through the file. It is not +recommended to use them outside of the SVF player as their content is dynamic.

An example session:

jtag> cable ppdev /dev/parport0 DLC5
+Initializing Xilinx DLC5 JTAG Parallel Cable III on ppdev port /dev/parport0
+jtag> detect
+IR length: 5
+Chain length: 1
+Device Id: 10010000101000100000000010010011
+  Manufacturer: Xilinx
+  Part:         XC2S300E-PQ208
+  Stepping:     9
+  Filename:     /usr/local/share/jtag/xilinx/xc2s300e-pq208/xc2s300e-pq208
+jtag> part <desired part of the scan chain>
+jtag> svf <SVF file for selected part>
+jtag> instruction BYPASS
+jtag> shift ir
+jtag> part <next part>
+jtag> svf <SVF file for selected part>
+jtag> instruction BYPASS
+jtag> shift ir

It is recommended to set the part's instruction register to BYPASS although +most SVF files do this at the end. By setting the instruction explicitely to +BYPASS the output of the print command will always show meaningful +information.

The SVF player will issue messages when situations arise that cannot be +handled. These messages are classified as warnings or errors depending on +whether the player can continue operation (warning) or not (error). +In case the TDO parameter of an SDR command leads to a mismatch the player +issues a warning and continues. If the player should abort in this case then +specify stop at the svf command.

Limitations and Deficiencies

Several limitations exist for the SVF player.

It has been tested so far with files generated by these tools:

  • Xilinx ISE WebPack 6.3.02i - 9.1.02i +

  • Altera Quartus II 4.1sp1 - 7.0 +

Configuration for these devices has been tested so far:

  • Altera EPC1C12Q240 +

  • Altera MAX3032, EPM3032ALC44 +

  • Altera MAX3064, EPM3064ALC44 +

  • Altera MAX7032, EPM7032SLC44 +

  • Altera MAX7064, EPM7064SLC44, EPM7064STC44 +

  • Xilinx Spartan-IIE, XC2S300E-PQ208 +

  • Xilinx Spartan-3, XC3S1000-FG456, XC3S5000-FG900 +

The implementation of some SVF commands has deficiencies.

  • HIR, HDR commands not supported. + Their functionality should be covered by the part concept of JTAG Tools. +

  • PIO command not supported. +

  • PIOMAP command not supported. +

  • RUNTEST SCK not supported. + The maximum time constraint is not guaranteed. +

  • SIR + No check is done against the TDO parameter. +

  • TRST + Parameters Z and ABSENT are not supported. +

  • TIR, TDR commands not supported. + Their functionality should be covered by the part concept of JTAG Tools. +

Operation can be slowed down significantly when the FREQUENCY command has +been specified. This is not a problem of the SVF player itself but seem to +happen when the frequency of UrJTAG is set to a value larger than 0. +Configuration takes very long although the maximum allowed frequency is 10 MHz. +Consider to comment out the FREQUENCY command at the beginning of the SVF file.


3.2.7.2. bsdl

The bsdl command is used to set up and test the underlying BSDL subsystem of +UrJTAG.

Whenever detect encounters a new part, a configuration process is +started. This involves matching the retrieved IDCODE against the part +descriptions in /usr/share/urjtag as described above. However, before this +database is searched for a suitable description, the BSDL subsystem is started +and searches for BSDL file that matches this device. If it finds a matching +file, traversal of the /usr/share/urjtag database is skipped. If not, then +this standard process follows.

To tell the BSDL subsytem where to look for BSDL files, the bsdl path +pathlist command has to be issued prior to detect. The contents of +pathlist must be a semicolon-separated list of directories where BSDL files +are located. This list is stored by bsdl path and is used lateron when +detect calls the BSDL subsystem.

The BSDL subsystem applies the first BSDL file that parses without +errors and that contains the correct IDCODE. Scanning the specified +directories happens in exactly the given order. Inside a directory however, +the order depends largely on your filesystem's behavior.

Further details of the bsdl command:

  • bsdl path <path1>[;<path2>[;<pathN>]] + set paths for locating BSDL files +

  • bsdl debug on|off + switches debug messages on or off +

  • bsdl test [file] + reads file (if specified) or all files found via bsdl path and + prints a short status, an active part is not required +

  • bsdl dump [file] + reads file (if specified) or all files found via bsdl path and + prints all configuration commands, an active part is not required +

The bsdl dump file command implements the same functionality as +bsdl2jtag.


3.2.8. Unsupported commands

3.2.8.1. script

Although it's still there, its functionality has been merged into the include +command. Please use "include" instead.


3.2.8.2. setdevice

This command was only there to support the SHARC 21065L processor, +which has no IDCODE and therefore can't be initialized correctly by +just running "detect". However, the proper initialization can be done +after "detect" by loading the proper declarations and bus driver manually:

jtag> include analog/sharc21065l/sharc21065l

3.2.8.3. spiflashmem

The commands "spidetectflash", "spiflashmem", "spireadflash" and +"spieraseflash" only exist in a version of the JTAG tools copyrighted by +Intratrade Ltd., we just know about them from a posting on the net.


Chapter 4. Internals

This section yet is only a placeholder for the information that will +be added soon…


4.1. Files

4.1.1. Source code Overview

doc/ +

Documentation +

+

data/ +

Part descriptions (Data files) +

+

include/ +

C header files +

+

src/ +

C source code +

+

src/bsdl +

BSDL subsystem +

+

src/bus +

Bus driver for various CPUs and other parts +

+

src/cmd +

Implementation of the commands for the "jtag" shell +

+

src/flash +

Flash detection and programming algorithms +

+

src/jim +

JIM, the JTAG target simulator +

+

src/lib +

Utility functions +

+

src/part +

Functions for accessing specific parts in a chain +

+

src/svf +

SVF player +

+

src/tap +

Functions for accessing the chain in general +

+


4.2. Drivers

  • Cable-specific drivers +

  • Parport drivers +

  • TAP drivers +

  • Chain drivers +

  • Bus drivers +

  • Flash drivers +

  • Commands +


4.2.1. Cable-specific drivers (src/tap/cable)

Cable-specific drivers are those which are visible to the user through +the "jtag" command shell. They're listed in response to the "help cable" +command. Each driver has to provide the following functions:

  • connect(), init() - Initialization +

  • done(), cable_free(), disconnect() - Cleaning up +

  • set_frequency() - set bitrate for shifting data through the chain +

  • clock(), get_tdo(), transfer() - immediate JTAG activities +

  • flush() - internally used to actually perform JTAG activities +

  • help() - a help text to be displayed by the jtag command shell +


4.2.1.1. Initialization

After allocating a "cable_t" structure, a pointer to it and further +parameters (as strings) have to be passed first to the selected cable's +connect() function.

Following that, the init() function is called via cable_init(). If cable_init() +returns a zero value, all is fine and the cable is ready for use.


4.2.1.2. Cleaning up

There are two functions for actual cleanup:

  • done() is responsible for driving the hardware to a safe and consistent state. +

  • cable_free() then can be used to clean up eventually extra allocated memory etc. +

Both are usually called from chain_disconnect().

An additional mechanism allows to clean up if a disconnection was detected by +the low level driver (e.g. USB or parallel port driver). A cable has to provide +a disconnect() function for this purpose:

  1. Low level (e.g. parport) driver calls cable driver->disconnect() +

  2. cable driver->disconnect() calls chain_disconnect() +

  3. chain_disconnect() calls cable driver->done() +

  4. chain_disconnect() then calls cable driver->cable_free() +

After return from chain_disconnect() to cable driver->disconnect(), the cable_t +structure has been freed and must not be accessed anymore.


4.2.1.3. JTAG Activities

Currently the API provides five different functions for performing operations +at the JTAG interface on the low level signal level (using the four signals +TMS, TCK, TDI, and TDO).

  • clock(tms,tdi,n) takes values for TMS and TDI output as its parameters, ensures that actual cable signals are set accordingly, and does a 0-1 transition on TCK (n times) +

  • get_tdo() returns the current value at the TDO input. +

  • set_trst(x) sets the TRST signal and returns the current value. +

  • get_trst() returns the current value of the TRST signal. +

For many JTAG adapters, there's almost no delay when doing alternating clock() +and get_tdo(). Writing and reading happens immediately and the result is +available immediately as well. This is the case with most parallel port +adapters (but not when attached to USB-to-parallel adapters or USB docking +stations) and memory mapped IO (e.g. general purpose I/O pins of +microcontrollers).

But there are adapters, especially USB and Ethernet based adapters, which +exhibit a rather long delay between the initiation of reading a bit and the +delivery of the value of the bit. It is at least 1 millisecond with USB, +which would limit the transfer rate to 1 kHz. One way to workaround this +is to transmit bits compacted into bytes and chunks of bytes, which is +possible with the transfer() function.

  • transfer(in, out) +

The transfer() function does a series of TCK pulses, with data for TDI read as +bytes from memory. The bytes are automatically serialized. TMS is set to zero +during transfer()s. Optionally, prior to each bit shifted out to the interface, +TDO input can be read into memory (deserialized into a byte array of the same +size as the input array).

It still doesn't yield much improvement if the operation consists of many read +and write transitions (e.g. repeatedly writing an instruction and some data +register values, then reading from the data register, as it is necessary for +memory access). For that reason, the above functions are also available in +variants that don't cause immediate activity, but rather schedule it for later. +In the API, they're visible as

  • cable_defer_clock() +

  • cable_defer_get_tdo() +

  • cable_defer_set_trst() +

  • cable_defer_get_trst() +

  • cable_defer_transfer() +

These functions aren't implemented in the cable driver (but currently in +src/tap/cable.c). The cable driver just has to provide a flush() function to +actually execute the queued activity in some cable-specific optimal way, and +to store the results of get_tdo() and transfer() activity. The caller later +can pick up the results using these functions (implemented in cable.c):

  • cable_get_tdo_late() +

  • cable_get_trst_late() +

  • cable_transfer_late() +

As an example, consider the following sequence of activities:

  1. clock() +

  2. get_tdo() +

  3. clock() +

  4. get_tdo() +

If the result of the first get_tdo() isn't absolutely required before the +second clock(), the sequence can be optimized into the following sequence (if

  1. defer_clock() +

  2. defer_clock() +

  3. flush() +

  4. get_tdo_late() +

  5. get_tdo_late() +

The next sections explain the queueing mechanism and its limits in detail.


4.2.1.4. When flushing occurs ======

The cable_flush() function is used to flush the queue towards the cable. It +takes one additional argument, "how_much", which may be one of

  • OPTIONALLY: The cable driver may flush if it's reasonable (e.g. if the + queue has been filled so that some buffer limit for the cable interface + is reached). It would be wise to flush early to keep the queue small, if + there is no point in queueing up more items because the transfer to the + cable would have to be split into smaller chunks anyway. This is used by + UrJTAG immediately after adding items to the queue. +

  • TO_OUTPUT: The cable driver should at least flush as much so that one + output becomes available in the output queue. If there's already something + in the output queue, this should be interpreted similar to OPTIONALLY. This + is used by UrJTAG immediately before it wants to use that output. +

  • COMPLETELY: The cable driver has to flush the queue completely. This is + used by UrJTAG immediately before actions that circumvent the queueing + such as calls to the legacy clock/get_tdo functions. It could also be + used by application code to ensure that some action is actually done in + time. +


4.2.1.5. JTAG activity queueing

The source in src/tap/cable.c provides to important functions to access the +two queues "todo" (with activity to be done) and "done" (with results):

  • cable_add_queue_item +

  • cable_get_queue_item +

In src/tap/cable/generic.c you'll find two implementations of dequeueing +algorithms, i.e. implementations of the flush() function. These could be used +by any new cable driver unless it provides a more sophisticated algorithm +itself:

  • generic_flush_one_by_one() simply calls the "classic" functions one after + another. The performance of the cable driver using this implementation will + be the same whether the immediate or defer variants of the functions are used. +

  • generic_flush_using_transfer() tries to optimize as many clock() and + get_tdo() by transforming them into calls to transfer() instead. This can + give a slight advantage. +

The generic implementations also serve as a template for new cable-specific +implementations.


4.2.1.6. Generic implementations

As a reference and in many cases completely sufficient for new cables, take a +look at the code in src/tap/cable/generic.c, which contains generic routines, +suitable for parallel port based cables (and some for other types of cables as +well).


4.3. Data file format

JTAG declarations files are located in directory "data". The files contains +common part specific JTAG information in parseable form, e.g. list of the JTAG +commands, boundary scan register, list of JTAG registers, etc.

Syntax of the JTAG declaration file is defined in the following subsections.


4.3.1. General rules

JTAG declaration file is text file which consists of lines. Empty lines are +ignored. Text after first "#" on the line to the end of line is ignored. This +is useful for comments. All other lines are significant.

Each significant line consists of tokens separated by whitespace. Whitespace +could be spaces and/or tabs.


4.3.2. Signal Definition

Signal definition line consists of word "signal" followed by whitespace and +signal name (without spaces in the name). Rest of the line should contain +whitespace separated list of pins of the part. This list is currently not used +for any purpose in JTAG Tools. It is intended for future use.


4.4. Development

4.4.1. Future Plans

  • C API and library package +

  • Bindings for Python, Perl, … +

  • TCP/IP access +

  • New cable drivers +

  • … +


4.4.2. How to contribute

  • Using Subversion +

  • Create and submit a patch +

  • Use SourceForge trackers +


Chapter 5. F.A.Q.

For a list of known problems in current versions, please also check the "Bugs" +tracker at the UrJTAG website!

Q. The documentation is incomplete. Where can I get more information?

A. Please ask in the "Using UrJTAG" Forum on http://urjtag.org +

Q. My flash isn't detected or can't be programmed. What can I do?

A. Please record the output of the "detect" and "detectflash" commands and ask in the Forum. If possible, re-compile UrJTAG before with "—enable-jedec-exp" to get extra information. +

Q. My CPU/FPGA/etc. chip isn't detected. What can I do?

A. First try to get hold of a "BSDL" description of the chip from the vendor, and specify where to find this file to UrJTAG using "bsdl path" before you "detect". Second, a bus driver has to be selected. Maybe "ejtag" or "prototype" work. +

Q. When I type "cable parallel 0x378 DLC5" (in a Cygwin environment) I get "Unknown port driver: parallel"?

A. Please install the Cygwin ioperm package, and re-configure/compile. +

Q. When I type "cable parallel 0x378 DLC5" (in a Cygwin environment) I get "Error: Cable initialization failed!".

A. Please install ioperm.sys driver using ioperm -i command. +

Q. When running autogen.sh, I get "Can't exec "autopoint": No such file or directory"

A. You need the headers for gettext (e.g. Debian package "gettext-devel"). +

Q. During compilation, I get "svf_bison.y: No such file or directory"

A. You need "bison". +

Q. During compilation, I get "flex: can't open … src/svf/svf_flex.l"

A. You need "flex" +

Q. During compilation, I get "src/svf/svf_flex.l", line 27: unrecognized %option: bison-locations"

A. You need a newer version of flex. It should be 2.5.31 or newer; + Unfortunately, Cygwin comes with only 2.5.4a. You may try to compile and + install a newer version of flex from source to solve this. The distributed + source tarball contains source pregenerated with a current flex version, + you need flex yourself only to compile from fresh SVN checkouts. +


Chapter 6. Licensing

6.1. Overview

Various licenses are used for the UrJTAG project. The GPL is used for most +of the code except for some include files, JIM, and cable driver source, where +a BSD or MIT license is used; this is noted in the file headers.


6.2. GNU Free Documentation License (FDL)

                GNU Free Documentation License
+                  Version 1.2, November 2002
+
+
+ Copyright (C) 2000,2001,2002  Free Software Foundation, Inc.
+     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense.  It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does.  But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book.  We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License.  Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein.  The "Document", below,
+refers to any such manual or work.  Any member of the public is a
+licensee, and is addressed as "you".  You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject.  (Thus, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.)  The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.  If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant.  The Document may contain zero
+Invariant Sections.  If the Document does not identify any Invariant
+Sections then there are none.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.  A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters.  A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text.  A copy that is not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification.  Examples of
+transparent image formats include PNG, XCF and JPG.  Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page.  For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language.  (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".)  To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document.  These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License.  You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute.  However, you may accept
+compensation in exchange for copies.  If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover.  Both covers must also clearly and legibly identify
+you as the publisher of these copies.  The front cover must present
+the full title with all words of the title equally prominent and
+visible.  You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it.  In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+   from that of the Document, and from those of previous versions
+   (which should, if there were any, be listed in the History section
+   of the Document).  You may use the same title as a previous version
+   if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+   responsible for authorship of the modifications in the Modified
+   Version, together with at least five of the principal authors of the
+   Document (all of its principal authors, if it has fewer than five),
+   unless they release you from this requirement.
+C. State on the Title page the name of the publisher of the
+   Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+   adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+   giving the public permission to use the Modified Version under the
+   terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+   and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section Entitled "History", Preserve its Title, and add
+   to it an item stating at least the title, year, new authors, and
+   publisher of the Modified Version as given on the Title Page.  If
+   there is no section Entitled "History" in the Document, create one
+   stating the title, year, authors, and publisher of the Document as
+   given on its Title Page, then add an item describing the Modified
+   Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+   public access to a Transparent copy of the Document, and likewise
+   the network locations given in the Document for previous versions
+   it was based on.  These may be placed in the "History" section.
+   You may omit a network location for a work that was published at
+   least four years before the Document itself, or if the original
+   publisher of the version it refers to gives permission.
+K. For any section Entitled "Acknowledgements" or "Dedications",
+   Preserve the Title of the section, and preserve in the section all
+   the substance and tone of each of the contributor acknowledgements
+   and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+   unaltered in their text and in their titles.  Section numbers
+   or the equivalent are not considered part of the section titles.
+M. Delete any section Entitled "Endorsements".  Such a section
+   may not be included in the Modified Version.
+N. Do not retitle any existing section to be Entitled "Endorsements"
+   or to conflict in title with any Invariant Section.
+O. Preserve any Warranty Disclaimers.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant.  To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version.  Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity.  If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy.  If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications".  You must delete all sections
+Entitled "Endorsements".
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections.  You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers.  In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License.  Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License.  However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time.  Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.  See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation.  If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+    Copyright (c)  YEAR  YOUR NAME.
+    Permission is granted to copy, distribute and/or modify this document
+    under the terms of the GNU Free Documentation License, Version 1.2
+    or any later version published by the Free Software Foundation;
+    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+    A copy of the license is included in the section entitled "GNU
+    Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+    with the Invariant Sections being LIST THEIR TITLES, with the
+    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.

6.3. GNU General Public License (GPL)

                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
\ No newline at end of file diff --git a/web/htdocs/book/_compilation_and_installation.html b/web/htdocs/book/_compilation_and_installation.html new file mode 100644 index 00000000..ac0b3358 --- /dev/null +++ b/web/htdocs/book/_compilation_and_installation.html @@ -0,0 +1,381 @@ + +Compilation and installation
Universal JTAG library, server and tools
PrevChapter 2. GeneralNext

2.4. Compilation and installation

2.4.1. Required software for compiling UrJTAG

To run autogen.sh, you need autoconf and automake, bison, and a recent flex.

The distributed source tarball contains source pregenerated with a current flex +version; flex therefore is only needed if you want to compile code checked +out from our Subversion repository. Flex 2.5.4a as it comes with Cygwin will +work but some parts of UrJTAG (namely the SVF player) become more verbose if +Flex 2.5.31 or newer is used. Building the BSDL subsystem files requires Flex +2.5.33 or newer. The configure script will compare the available Flex version +against these preconditions and enables or disables the related features. ,

Furthermore, libtool should be available, and "devel" versions of the following +packages:

  • gettext +

  • readline (not needed, but really eases interactive use) +

  • ioperm (needed only for Cygwin) +

2.4.2. Required libraries for USB support

For USB adapter support (including support for parallel port adapters attached +to USB-to-parallel converters), one or more additional libraries are required.

Many USB JTAG adapters and USB-to-parallel converters are based on chips +made by FTDI. To support these, either intra.net's "libftdi" or FTDI's +"FTD2XX" library can be used.

On many modern Linux distributions, libftdi is available as a precompiled +package and can be installed using the distribution's package management system +(e.g. "apt-get libftdi-dev" for Debian and Ubuntu). If it isn't available or +you don't run Linux, you can get it from

  • http://www.intra2net.com/de/produkte/opensource/ftdi/ +

Alternatively, you can use the FTD2XX library from the chip manufacturer FTDI. +It is available for Linux and Windows. To use the library for Windows in a +Cygwin environment, first get it from:

  • http://www.ftdichip.com/Drivers/D2XX.htm +

Unzip the CDM*.zip to some directory and tell UrJTAG about this directory +during the configure step before actual compilation:

./configure --with-libftd2xx=/cygdrive/c/windows/temp/CDM_Drivers

All other USB JTAG adapters can be supported only if libusb is installed. +There is a libusb-win32 variant that can be used in a Cygwin environment:

  • http://libusb.sourceforge.net (libusb) +

  • http://libusb-win32.sourceforge.net (libusb for Windows) +

For specific notes regarding the use of these libraries in a Cygwin +environmen, see below.

2.4.3. Installing from source tar.gz

The installation follows the standard configure, make, make install scheme:

tar xzvf urjtag.tar.gz
+cd ../jtag
+./configure
+make
+make install

2.4.4. Installing from Subversion repository

If you want to try the very newest version of UrJTAG…

svn co http://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk urjtag
cd urjtag/jtag
+./autogen.sh
+# ./configure done by autogen.sh; run it here with special options if needed
+make
+make install

2.4.5. Linking to FTD2XX.DLL in Cygwin environment

Before running configure, get the D2XX drivers from FTDI.

  • http://www.ftdichip.com/Drivers/D2XX.htm (FTDI FTD2XX library) +

Unzip the archive into a directory of your choice (probably a choice +without spaces in the name is better) and afterwards run configure with the +"—with-ftd2xx" pointing to that directory, e.g.

./configure --with-ftd2xx="/cygdrive/c/temp/ftdi-cdm-drivers"

Configure should now report

FTDI cable support
+  ...
+  via libftd2xx        : yes

2.4.6. Using LibUSB-Win32 in Cygwin environment

Before running configure, install the LibUSB-Win32 "filter" driver from SF.

  • http://libusb-win32.sourceforge.net +

Then point configure to the directory where LibUSB-Win32 was installed (it +might give problems if the path contains spaces, as "Program Files" does!):

./configure --with-libusb="/cygdrive/c/Programme/LibUSB-Win32/"

2.4.7. Building the BSDL subsystem

As mentioned above, building the BSDL lexer requires Flex 2.5.33 or newer. If +the detected Flex version is not recent enough, configure will disable the +BSDL subsystem. The detection result is summarized at the end of configure:

jtag is now configured for
+  ...
+  Build BSDL subsystem : yes

Flex is only required when you're working on a check-out of the Subversion +repository. In this case Flex has to be called to transform bsdl_flex.l to +bsdl_flex.c. When you're compiling from released sources, the local Flex +version is not relevant since the output file of Flex is part of the +tarball. I.e. even if the local Flex fails the check, the BSDL subsystem is +enabled and will be compiled from the released C files.


PrevHomeNext
System requirementsUpUsage
\ No newline at end of file diff --git a/web/htdocs/book/_copyright.html b/web/htdocs/book/_copyright.html new file mode 100644 index 00000000..235c6423 --- /dev/null +++ b/web/htdocs/book/_copyright.html @@ -0,0 +1,146 @@ + +Copyright
Universal JTAG library, server and tools
PrevNext

Chapter 1. Copyright

Copyright 2007, 2008 Kolja Waschk and the respective authors.

Permission is granted to copy, distribute and/or modify this document under the +terms of the GNU Free Documentation License, Version 1.2 or any later version +published by the Free Software Foundation. A copy of the license is included in +the section entitled "GNU Free Documentation License".


PrevHomeNext
Universal JTAG library, server and tools General
\ No newline at end of file diff --git a/web/htdocs/book/_data_file_format.html b/web/htdocs/book/_data_file_format.html new file mode 100644 index 00000000..7fc64478 --- /dev/null +++ b/web/htdocs/book/_data_file_format.html @@ -0,0 +1,183 @@ + +Data file format
Universal JTAG library, server and tools
PrevChapter 4. InternalsNext

4.3. Data file format

JTAG declarations files are located in directory "data". The files contains +common part specific JTAG information in parseable form, e.g. list of the JTAG +commands, boundary scan register, list of JTAG registers, etc.

Syntax of the JTAG declaration file is defined in the following subsections.

4.3.1. General rules

JTAG declaration file is text file which consists of lines. Empty lines are +ignored. Text after first "#" on the line to the end of line is ignored. This +is useful for comments. All other lines are significant.

Each significant line consists of tokens separated by whitespace. Whitespace +could be spaces and/or tabs.

4.3.2. Signal Definition

Signal definition line consists of word "signal" followed by whitespace and +signal name (without spaces in the name). Rest of the line should contain +whitespace separated list of pins of the part. This list is currently not used +for any purpose in JTAG Tools. It is intended for future use.


PrevHomeNext
DriversUpDevelopment
\ No newline at end of file diff --git a/web/htdocs/book/_development.html b/web/htdocs/book/_development.html new file mode 100644 index 00000000..6b858fd5 --- /dev/null +++ b/web/htdocs/book/_development.html @@ -0,0 +1,213 @@ + +Development
Universal JTAG library, server and tools
PrevChapter 4. InternalsNext

4.4. Development

4.4.1. Future Plans

  • C API and library package +

  • Bindings for Python, Perl, … +

  • TCP/IP access +

  • New cable drivers +

  • … +

4.4.2. How to contribute

  • Using Subversion +

  • Create and submit a patch +

  • Use SourceForge trackers +


PrevHomeNext
Data file formatUpF.A.Q.
\ No newline at end of file diff --git a/web/htdocs/book/_drivers.html b/web/htdocs/book/_drivers.html new file mode 100644 index 00000000..6bb2a538 --- /dev/null +++ b/web/htdocs/book/_drivers.html @@ -0,0 +1,606 @@ + +Drivers
Universal JTAG library, server and tools
PrevChapter 4. InternalsNext

4.2. Drivers

4.2.1. Cable-specific drivers (src/tap/cable)

Cable-specific drivers are those which are visible to the user through +the "jtag" command shell. They're listed in response to the "help cable" +command. Each driver has to provide the following functions:

  • connect(), init() - Initialization +

  • done(), cable_free(), disconnect() - Cleaning up +

  • set_frequency() - set bitrate for shifting data through the chain +

  • clock(), get_tdo(), transfer() - immediate JTAG activities +

  • flush() - internally used to actually perform JTAG activities +

  • help() - a help text to be displayed by the jtag command shell +

4.2.1.1. Initialization

After allocating a "cable_t" structure, a pointer to it and further +parameters (as strings) have to be passed first to the selected cable's +connect() function.

Following that, the init() function is called via cable_init(). If cable_init() +returns a zero value, all is fine and the cable is ready for use.

4.2.1.2. Cleaning up

There are two functions for actual cleanup:

  • done() is responsible for driving the hardware to a safe and consistent state. +

  • cable_free() then can be used to clean up eventually extra allocated memory etc. +

Both are usually called from chain_disconnect().

An additional mechanism allows to clean up if a disconnection was detected by +the low level driver (e.g. USB or parallel port driver). A cable has to provide +a disconnect() function for this purpose:

  1. Low level (e.g. parport) driver calls cable driver->disconnect() +

  2. cable driver->disconnect() calls chain_disconnect() +

  3. chain_disconnect() calls cable driver->done() +

  4. chain_disconnect() then calls cable driver->cable_free() +

After return from chain_disconnect() to cable driver->disconnect(), the cable_t +structure has been freed and must not be accessed anymore.

4.2.1.3. JTAG Activities

Currently the API provides five different functions for performing operations +at the JTAG interface on the low level signal level (using the four signals +TMS, TCK, TDI, and TDO).

  • clock(tms,tdi,n) takes values for TMS and TDI output as its parameters, ensures that actual cable signals are set accordingly, and does a 0-1 transition on TCK (n times) +

  • get_tdo() returns the current value at the TDO input. +

  • set_trst(x) sets the TRST signal and returns the current value. +

  • get_trst() returns the current value of the TRST signal. +

For many JTAG adapters, there's almost no delay when doing alternating clock() +and get_tdo(). Writing and reading happens immediately and the result is +available immediately as well. This is the case with most parallel port +adapters (but not when attached to USB-to-parallel adapters or USB docking +stations) and memory mapped IO (e.g. general purpose I/O pins of +microcontrollers).

But there are adapters, especially USB and Ethernet based adapters, which +exhibit a rather long delay between the initiation of reading a bit and the +delivery of the value of the bit. It is at least 1 millisecond with USB, +which would limit the transfer rate to 1 kHz. One way to workaround this +is to transmit bits compacted into bytes and chunks of bytes, which is +possible with the transfer() function.

  • transfer(in, out) +

The transfer() function does a series of TCK pulses, with data for TDI read as +bytes from memory. The bytes are automatically serialized. TMS is set to zero +during transfer()s. Optionally, prior to each bit shifted out to the interface, +TDO input can be read into memory (deserialized into a byte array of the same +size as the input array).

It still doesn't yield much improvement if the operation consists of many read +and write transitions (e.g. repeatedly writing an instruction and some data +register values, then reading from the data register, as it is necessary for +memory access). For that reason, the above functions are also available in +variants that don't cause immediate activity, but rather schedule it for later. +In the API, they're visible as

  • cable_defer_clock() +

  • cable_defer_get_tdo() +

  • cable_defer_set_trst() +

  • cable_defer_get_trst() +

  • cable_defer_transfer() +

These functions aren't implemented in the cable driver (but currently in +src/tap/cable.c). The cable driver just has to provide a flush() function to +actually execute the queued activity in some cable-specific optimal way, and +to store the results of get_tdo() and transfer() activity. The caller later +can pick up the results using these functions (implemented in cable.c):

  • cable_get_tdo_late() +

  • cable_get_trst_late() +

  • cable_transfer_late() +

As an example, consider the following sequence of activities:

  1. clock() +

  2. get_tdo() +

  3. clock() +

  4. get_tdo() +

If the result of the first get_tdo() isn't absolutely required before the +second clock(), the sequence can be optimized into the following sequence (if

  1. defer_clock() +

  2. defer_clock() +

  3. flush() +

  4. get_tdo_late() +

  5. get_tdo_late() +

The next sections explain the queueing mechanism and its limits in detail.

4.2.1.4. When flushing occurs ======

The cable_flush() function is used to flush the queue towards the cable. It +takes one additional argument, "how_much", which may be one of

  • OPTIONALLY: The cable driver may flush if it's reasonable (e.g. if the + queue has been filled so that some buffer limit for the cable interface + is reached). It would be wise to flush early to keep the queue small, if + there is no point in queueing up more items because the transfer to the + cable would have to be split into smaller chunks anyway. This is used by + UrJTAG immediately after adding items to the queue. +

  • TO_OUTPUT: The cable driver should at least flush as much so that one + output becomes available in the output queue. If there's already something + in the output queue, this should be interpreted similar to OPTIONALLY. This + is used by UrJTAG immediately before it wants to use that output. +

  • COMPLETELY: The cable driver has to flush the queue completely. This is + used by UrJTAG immediately before actions that circumvent the queueing + such as calls to the legacy clock/get_tdo functions. It could also be + used by application code to ensure that some action is actually done in + time. +

4.2.1.5. JTAG activity queueing

The source in src/tap/cable.c provides to important functions to access the +two queues "todo" (with activity to be done) and "done" (with results):

  • cable_add_queue_item +

  • cable_get_queue_item +

In src/tap/cable/generic.c you'll find two implementations of dequeueing +algorithms, i.e. implementations of the flush() function. These could be used +by any new cable driver unless it provides a more sophisticated algorithm +itself:

  • generic_flush_one_by_one() simply calls the "classic" functions one after + another. The performance of the cable driver using this implementation will + be the same whether the immediate or defer variants of the functions are used. +

  • generic_flush_using_transfer() tries to optimize as many clock() and + get_tdo() by transforming them into calls to transfer() instead. This can + give a slight advantage. +

The generic implementations also serve as a template for new cable-specific +implementations.

4.2.1.6. Generic implementations

As a reference and in many cases completely sufficient for new cables, take a +look at the code in src/tap/cable/generic.c, which contains generic routines, +suitable for parallel port based cables (and some for other types of cables as +well).


PrevHomeNext
InternalsUpData file format
\ No newline at end of file diff --git a/web/htdocs/book/_f_a_q.html b/web/htdocs/book/_f_a_q.html new file mode 100644 index 00000000..7fd4caad --- /dev/null +++ b/web/htdocs/book/_f_a_q.html @@ -0,0 +1,219 @@ + +F.A.Q.
Universal JTAG library, server and tools
PrevNext

Chapter 5. F.A.Q.

For a list of known problems in current versions, please also check the "Bugs" +tracker at the UrJTAG website!

Q. The documentation is incomplete. Where can I get more information?

A. Please ask in the "Using UrJTAG" Forum on http://urjtag.org +

Q. My flash isn't detected or can't be programmed. What can I do?

A. Please record the output of the "detect" and "detectflash" commands and ask in the Forum. If possible, re-compile UrJTAG before with "—enable-jedec-exp" to get extra information. +

Q. My CPU/FPGA/etc. chip isn't detected. What can I do?

A. First try to get hold of a "BSDL" description of the chip from the vendor, and specify where to find this file to UrJTAG using "bsdl path" before you "detect". Second, a bus driver has to be selected. Maybe "ejtag" or "prototype" work. +

Q. When I type "cable parallel 0x378 DLC5" (in a Cygwin environment) I get "Unknown port driver: parallel"?

A. Please install the Cygwin ioperm package, and re-configure/compile. +

Q. When I type "cable parallel 0x378 DLC5" (in a Cygwin environment) I get "Error: Cable initialization failed!".

A. Please install ioperm.sys driver using ioperm -i command. +

Q. When running autogen.sh, I get "Can't exec "autopoint": No such file or directory"

A. You need the headers for gettext (e.g. Debian package "gettext-devel"). +

Q. During compilation, I get "svf_bison.y: No such file or directory"

A. You need "bison". +

Q. During compilation, I get "flex: can't open … src/svf/svf_flex.l"

A. You need "flex" +

Q. During compilation, I get "src/svf/svf_flex.l", line 27: unrecognized %option: bison-locations"

A. You need a newer version of flex. It should be 2.5.31 or newer; + Unfortunately, Cygwin comes with only 2.5.4a. You may try to compile and + install a newer version of flex from source to solve this. The distributed + source tarball contains source pregenerated with a current flex version, + you need flex yourself only to compile from fresh SVN checkouts. +


PrevHomeNext
Development Licensing
\ No newline at end of file diff --git a/web/htdocs/book/_general.html b/web/htdocs/book/_general.html new file mode 100644 index 00000000..6809da5a --- /dev/null +++ b/web/htdocs/book/_general.html @@ -0,0 +1,293 @@ + +General
Universal JTAG library, server and tools
PrevNext

Chapter 2. General

2.1. JTAG

JTAG basics can be found all over the internet. This section should go into +some more details about working with JTAG. What hardware do you need, what is +the usage of JTAG, where do I get files. What file formats are available…

2.1.1. Introduction

JTAG (IEEE 1149.1) is a serial interface for testing devices with +integrated circuits. The problem that the JTAG interface was designed to solve +is checking if connections between ICs are OK. Therefore you can set and check +in- and outputs of ICs. In order to save pins and logic a very simple serial +design was invented.

  • One pin serial input +

  • One pin serial output +

  • One pin clock +

  • One pin control +

The control pin (together with clock) allows to switch device states. A state +machine inside each chip can be controlled, e.g. to reset the device. This +control machine also allows to have two internal shift registers in each device +(although we only have on in- and one output-pin). The registers are called +instruction register (IR) and data register (DR). The current UrJTAG tool +allows you to set the IR and set and get the DR. It doesn't allow you to +directly control the statemachine (yet).

2.1.2. Interfaces

The simplest interface that you can build is like the Xilinx parallel cable +(also called DLC5). If your device works with a 5V or 3.3V supply voltage then +this device can even be build just with passive parts. (picture missing here) +UrJTAG also supports a number of other interface adapters.

2.1.3. Additions

In the meantime the jtag specification was used as a basis for programming +flash files and debugging processors. UrJTAG supports programming a couple of +different flash devices. It also supports programming of non-flash devices via +svf files. UrJTAG does not support debugging yet. Other open source solutions +such as OpenOCD allow you to debug ARM processors with gdb.

2.1.4. BSDL and UrJTAG data files

The BSDL file format describes the jtag interface for one IC. It is a VHDL +syntax with the needed information (like pin-names, register lengths and +commands) that is usually done by the supplier. e.g. Xilinx BSDL files are +all included in their free web-pack (using file extension ".bsd").

UrJTAG uses a different file format internally. So in order to add a new device +to UrJTAG you need to convert those files and produce a directory structure. +Currently there are at least three tools available to do that; included with +UrJTAG is "bsdl2jtag". Please ask on the mailing list in case of problems with +that. Please also send proven working files back to this project.

Starting with post-0.7 releases, UrJTAG contains a BSDL subsystem that +retrieves the descriptions for chips in the chain from BSDL files on the +fly. Be aware that this feature is currently experimental and may not work +with every BSDL file yet.

2.1.5. SVF files

The SVF file format contains a number of high level commands to drive the jtag +bus. For example you can shift the IR or DR and even check for the results. +The Xilinxs impact and Altera QuartusII tools allow you to write this file to +program devices.

The player has been developed according to the "Serial Vector Format +Specification", Revision E, 8 March 1999 issued by ASSET InterTech, Inc. The +full specification can be found at +http://www.asset-intertech.com/support/svf.pdf

UrJTAG features an "SVF player" that can read SVF files and perform the +described actions on the bus.

SVF parser and lexer are also copyright 2002, CDS at http://www-csd.ijs.si/. +They have been reused from the "Experimental Boundary Scan" project at +http://ebsp.sourceforge.net/.

2.1.6. JAM/STAPL files

Another format for describing actions over JTAG interfaces is STAPL, actually +standardized as JEDEC "JESD-71A". Compared to SVF, it looks more like an +actual programming language and features looping, conditional execution, and +more. STAPL is not yet supported by UrJTAG.


PrevHomeNext
Copyright UrJTAG
\ No newline at end of file diff --git a/web/htdocs/book/_gnu_free_documentation_license_fdl.html b/web/htdocs/book/_gnu_free_documentation_license_fdl.html new file mode 100644 index 00000000..2a6464ca --- /dev/null +++ b/web/htdocs/book/_gnu_free_documentation_license_fdl.html @@ -0,0 +1,546 @@ + +GNU Free Documentation License (FDL)
Universal JTAG library, server and tools
PrevChapter 6. LicensingNext

6.2. GNU Free Documentation License (FDL)

                GNU Free Documentation License
+                  Version 1.2, November 2002
+
+
+ Copyright (C) 2000,2001,2002  Free Software Foundation, Inc.
+     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense.  It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does.  But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book.  We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License.  Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein.  The "Document", below,
+refers to any such manual or work.  Any member of the public is a
+licensee, and is addressed as "you".  You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject.  (Thus, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.)  The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.  If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant.  The Document may contain zero
+Invariant Sections.  If the Document does not identify any Invariant
+Sections then there are none.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.  A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters.  A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text.  A copy that is not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification.  Examples of
+transparent image formats include PNG, XCF and JPG.  Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page.  For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language.  (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".)  To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document.  These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License.  You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute.  However, you may accept
+compensation in exchange for copies.  If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover.  Both covers must also clearly and legibly identify
+you as the publisher of these copies.  The front cover must present
+the full title with all words of the title equally prominent and
+visible.  You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it.  In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+   from that of the Document, and from those of previous versions
+   (which should, if there were any, be listed in the History section
+   of the Document).  You may use the same title as a previous version
+   if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+   responsible for authorship of the modifications in the Modified
+   Version, together with at least five of the principal authors of the
+   Document (all of its principal authors, if it has fewer than five),
+   unless they release you from this requirement.
+C. State on the Title page the name of the publisher of the
+   Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+   adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+   giving the public permission to use the Modified Version under the
+   terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+   and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section Entitled "History", Preserve its Title, and add
+   to it an item stating at least the title, year, new authors, and
+   publisher of the Modified Version as given on the Title Page.  If
+   there is no section Entitled "History" in the Document, create one
+   stating the title, year, authors, and publisher of the Document as
+   given on its Title Page, then add an item describing the Modified
+   Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+   public access to a Transparent copy of the Document, and likewise
+   the network locations given in the Document for previous versions
+   it was based on.  These may be placed in the "History" section.
+   You may omit a network location for a work that was published at
+   least four years before the Document itself, or if the original
+   publisher of the version it refers to gives permission.
+K. For any section Entitled "Acknowledgements" or "Dedications",
+   Preserve the Title of the section, and preserve in the section all
+   the substance and tone of each of the contributor acknowledgements
+   and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+   unaltered in their text and in their titles.  Section numbers
+   or the equivalent are not considered part of the section titles.
+M. Delete any section Entitled "Endorsements".  Such a section
+   may not be included in the Modified Version.
+N. Do not retitle any existing section to be Entitled "Endorsements"
+   or to conflict in title with any Invariant Section.
+O. Preserve any Warranty Disclaimers.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant.  To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version.  Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity.  If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy.  If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications".  You must delete all sections
+Entitled "Endorsements".
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections.  You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers.  In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License.  Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License.  However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time.  Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.  See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation.  If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+    Copyright (c)  YEAR  YOUR NAME.
+    Permission is granted to copy, distribute and/or modify this document
+    under the terms of the GNU Free Documentation License, Version 1.2
+    or any later version published by the Free Software Foundation;
+    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+    A copy of the license is included in the section entitled "GNU
+    Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+    with the Invariant Sections being LIST THEIR TITLES, with the
+    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.

PrevHomeNext
LicensingUpGNU General Public License (GPL)
\ No newline at end of file diff --git a/web/htdocs/book/_gnu_general_public_license_gpl.html b/web/htdocs/book/_gnu_general_public_license_gpl.html new file mode 100644 index 00000000..f908d199 --- /dev/null +++ b/web/htdocs/book/_gnu_general_public_license_gpl.html @@ -0,0 +1,477 @@ + +GNU General Public License (GPL)
Universal JTAG library, server and tools
PrevChapter 6. Licensing 

6.3. GNU General Public License (GPL)

                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.

PrevHome 
GNU Free Documentation License (FDL)Up 
\ No newline at end of file diff --git a/web/htdocs/book/_internals.html b/web/htdocs/book/_internals.html new file mode 100644 index 00000000..394093ee --- /dev/null +++ b/web/htdocs/book/_internals.html @@ -0,0 +1,350 @@ + +Internals
Universal JTAG library, server and tools
PrevNext

Chapter 4. Internals

This section yet is only a placeholder for the information that will +be added soon…

4.1. Files

4.1.1. Source code Overview

doc/ +

Documentation +

+

data/ +

Part descriptions (Data files) +

+

include/ +

C header files +

+

src/ +

C source code +

+

src/bsdl +

BSDL subsystem +

+

src/bus +

Bus driver for various CPUs and other parts +

+

src/cmd +

Implementation of the commands for the "jtag" shell +

+

src/flash +

Flash detection and programming algorithms +

+

src/jim +

JIM, the JTAG target simulator +

+

src/lib +

Utility functions +

+

src/part +

Functions for accessing specific parts in a chain +

+

src/svf +

SVF player +

+

src/tap +

Functions for accessing the chain in general +

+


PrevHomeNext
JTAG commands Drivers
\ No newline at end of file diff --git a/web/htdocs/book/_jtag_commands.html b/web/htdocs/book/_jtag_commands.html new file mode 100644 index 00000000..a8a83cae --- /dev/null +++ b/web/htdocs/book/_jtag_commands.html @@ -0,0 +1,1889 @@ + +JTAG commands
Universal JTAG library, server and tools
PrevChapter 3. UsageNext

3.2. JTAG commands

3.2.1. Overview

Following is a list of commands currently supported by jtag and some +example usage.

bit +

define new BSR bit +

+

bus +

change active bus +

+

bsdl +

manage BSDL files +

+

cable +

select JTAG cable +

+

detect +

detect parts on the JTAG chain +

+

detectflash +

detect parameters of flash chips attached to a part +

+

discovery +

discovery of unknown parts in the JTAG chain +

+

dr +

display active data register for a part +

+

endian +

set/print endianess for reading/writing binary files +

+

eraseflash +

erase flash memory by number of blocks +

+

flashmem +

burn flash memory with data from a file +

+

frequency +

setup JTAG frequency +

+

get +

get external signal value +

+

help +

display this help +

+

include +

include command sequence from external file +

+

initbus +

initialize bus driver for active part +

+

instruction +

change active instruction for a part or declare new instruction +

+

part +

change active part for current JTAG chain +

+

peek +

read a single word +

+

poke +

write a single word +

+

print +

display JTAG chain list/status +

+

quit +

exit and terminate this session +

+

readmem +

read content of the memory and write it to file +

+

register +

define new data register for a part +

+

scan +

detect changes on input pins of current part +

+

set +

set external signal value +

+

shift +

shift data/instruction registers through JTAG chain +

+

signal +

define new signal for a part +

+

svf +

execute svf commands from file +

+

writemem +

write content from file to memory +

+

Some tools derived from the same openwince JTAG Tools code base as UrJTAG +know additional commands, which are not supported in UrJTAG. See the section +about "Unsupported commands", below, about workarounds.

3.2.2. Basic commands

3.2.2.1. quit

This command closes the jtag console.

3.2.2.2. help

Without additional parameter it gives an overview of the available commands. +With a parameter you can get more information about any of the commands. +Example:

jtag> help cable

Most cable drivers require some more details about the cable to start properly. +To learn about the details, use the "cable" command with the name of the cable +followed by the word "help". Example:

jtag> cable wiggler help

3.2.2.3. include

Run commands from a named script file installed with UrJTAG or applies a BSDL +file to the active part. The directory prefix is added automatically +(e.g. /usr/share/urjtag/, depending on your installation), unless the file +name starts with a dot or slash.

For example, the following startup sequence configures the cable, chain, and +loads definitions and bus driver for a Samsung S3C4510B CPU to peek its memory +at 0x0:

jtag> cable wiggler ppdev /dev/parport0
+jtag> detect
+jtag> include samsung/s3c4510b/s3c4510b
+jtag> peek 0x0000

If the file contains valid BSDL syntax, it will be converted to native +commands on the fly.

Optionally, a number X may be specified following the file name, to cause +an X times repetition of the command sequence from the file.

3.2.3. Chain management

3.2.3.1. cable

Sets and initialized the cable driver. This is usually the first command that +you are executing in a session. Example:

jtag> cable EA253 parallel 0x378
+Initializing ETC EA253 JTAG Cable on parallel port at 0x378

For a parallel cable using the ppdev driver you would use this:

jtag> cable DLC5 ppdev /dev/parport0

If you get an error, it may be that the parallel port kernel driver +was compiled as a module in your Linux kernel and wasn't loaded automatically. +Then you should try to load the ppdev driver manually (with root rights outside +the jtag shell):

modprobe ppdev
+modprobe parport
+modprobe parport_pc

UrJTAG now also supports some USB cables. Unfortunately, there is no standard +for "JTAG over USB", so this support is limited to a few selected cables only. +For cables based on the FT2232 chip from FTDI, the cable command has to be +given cable name, driver name, and USB Vendor and Product ID of the cable:

jtag> cable ARM-USB-OCD ftdi-mpsse 15ba:3

For some cables, UrJTAG knows the VID:PID and you can just say ":"

jtag> cable JTAGkey ftdi-mpsse :

On Windows, if UrJTAG was compiled to use the drivers supplied by +FTDI, the command should instead look like this:

jtag> cable ARM-USB-OCD ftd2xx-mpsse 15ba:3

The support for USB-based cables and their configuration is work +in progress; the above syntax may change (i.e. become simpler) soon.

3.2.3.2. detect

Detects devices on the chain. Example:

jtag> detect
+IR length: 5
+Chain length: 1
+Device Id: 01011001001001100100000000010011
+  Manufacturer: Intel
+  Part:         PXA250
+  Stepping:     C0
+  Filename:     /usr/local/share/jtag/intel/pxa250/pxa250c0

During "detect", UrJTAG searches through the files in its database (usually in +/usr/share/urjtag) and optionally in the search path for BSDL files (see bsdl +command) to find a match for the manufacturer, revision and part number for the +IDCODE read from the part. However, not all parts identify themselves in a way +that is useful for "detect". For example, many chips with an ARM processor core +inside present an IDCODE that may be specific to the the particular core inside +the chip (e.g. ARM7TDMI), but doesn't tell about the actual manufacturer of +the chip. In such case, the data for the part has to be included manually. See +also the documentation for the "include" command.

3.2.3.3. print

Print a list of parts in the chain and the currently active instruction per part.

3.2.3.4. initbus

Selects and initializes a bus of the currently selected part, e.g. the external +memory bus of a CPU. This is required in order to access chips that aren't +connected in the JTAG chain, but indirectly accessible through other chips +(e.g. CPU or programmable logic).

Type "help initbus" to get a list of supported bus types. +If you do not find a bus driver for your specific hardware, you might be lucky +enough to have EJTAG in your target (most MIPS-based CPUs do) and should try +the "ejtag" bus driver. In contrast to the method "via BSR", it uploads some +instructions to the CPU and triggers their execution to access the bus, and +should work with almost any EJTAG-capable chip (Note: JTAG isn't EJTAG):

jtag> initbus ejtag

There's another option to support new chips "via BSR", the "prototype" bus +driver, which can be adapted to support your part with command parameters. +The only prerequisite for using this driver is knowledge of the names of the +signals that represent address bus, data bus, and enable signals, and that +address and data lines are numbered in order.

For example, assume the signals are named in the BSDL description as follows:

  • Data bus: D0, D1, … D31 +

  • Address bus: ADDR0, ADDR1, … ADDR22 +

  • Output Enable: nOE +

  • Write Enable: nWE +

  • Chip Select: nRCS0 +

The enable signals seem to be active low (indicated by the leading "n" in their +names). Further we assume the interesting connected part, some flash chip, is +only 16 bits wide even though the data bus width is 32 bits. With this +information, you could use the following command (all on a single line!) to +access the bus:

initbus prototype amsb=ADDR22 alsb=ADDR0 dmsb=D15 dlsb=D0
+          ncs=nRCS0 nwe=nWE noe=nOE amode=x16

The "prototype" bus driver yet cannot deal with systems where address and data +bus are multiplexed on the same pins. If signals aren't numbered in the right +order or with gaps, you may get along by defining proper names as aliases for +the actual signals, with commands like "salias ADDR12 BSCGX44".

Most drivers work "via BSR", i.e. they directly access the pins of the device. +Because it isn't possible to efficiently address only particular pins but only +all at once, and data for all pins has to be transferred through JTAG for every +single change, this method isn't the fastest, but usually easiest to implement +and, well, sometimes it counts whether it works at all..

Some chips don't allow direct access to their pins via BSR at all. For these, +writing a new bus driver that utilizes a debug module to upload specific code +to access the bus is inevitable.

3.2.4. Part definition commands

The following commands are also used in the data files to define a device (IC) +on the JTAG chain. It is not recommended to use these commands in an interactive +session. Instead you should produce a device definition file out of a .bsd file +using one of the supplied tools (or use the new BSDL subsystem, see below).

bit +

define new BSR bit +

+

instruction +

change active instruction for a part or declare new instruction +

+

register +

define new data register for a part +

+

signal +

define new signal for a part +

+

3.2.5. TAP control

The following commands can be used to directly manipulate and display the state +of the TAP controller(s) and registers in the chain:

dr +

display active data register for a part +

+

instruction +

change active instruction for a part or declare new instruction +

+

get +

get external signal value +

+

scan +

detect changes on input pins of current part +

+

set +

set external signal value +

+

shift +

shift data/instruction registers through JTAG chain +

+

3.2.6. RAM/Flash access

These commands can be used if a part in the chain has memory connected to it +(or integrated). Before they can be used, a bus driver has to be selected and +initialized (see initbus command).

detectflash +

detect parameters of flash chips attached to a part +

+

endian +

set/print endianess for reading/writing binary files +

+

eraseflash +

erase flash memory by number of blocks +

+

flashmem +

burn flash memory with data from a file +

+

peek +

read a single word +

+

poke +

write a single word +

+

readmem +

read content of the memory and write it to file +

+

writemem +

write content from file to memory +

+

3.2.7. Highlevel commands

3.2.7.1. svf

The SVF player operates on a single part in the scan chain. Therefore, you +have to bring up the jtag software, specify a cable and detect the scan +chain beforehand.

The player will establish a new instruction called "SIR" and a new register +called "SDR". They are used internally by the respective SVF commands and are +reassigned with new values as the player advances through the file. It is not +recommended to use them outside of the SVF player as their content is dynamic.

An example session:

jtag> cable ppdev /dev/parport0 DLC5
+Initializing Xilinx DLC5 JTAG Parallel Cable III on ppdev port /dev/parport0
+jtag> detect
+IR length: 5
+Chain length: 1
+Device Id: 10010000101000100000000010010011
+  Manufacturer: Xilinx
+  Part:         XC2S300E-PQ208
+  Stepping:     9
+  Filename:     /usr/local/share/jtag/xilinx/xc2s300e-pq208/xc2s300e-pq208
+jtag> part <desired part of the scan chain>
+jtag> svf <SVF file for selected part>
+jtag> instruction BYPASS
+jtag> shift ir
+jtag> part <next part>
+jtag> svf <SVF file for selected part>
+jtag> instruction BYPASS
+jtag> shift ir

It is recommended to set the part's instruction register to BYPASS although +most SVF files do this at the end. By setting the instruction explicitely to +BYPASS the output of the print command will always show meaningful +information.

The SVF player will issue messages when situations arise that cannot be +handled. These messages are classified as warnings or errors depending on +whether the player can continue operation (warning) or not (error). +In case the TDO parameter of an SDR command leads to a mismatch the player +issues a warning and continues. If the player should abort in this case then +specify stop at the svf command.

Limitations and Deficiencies

Several limitations exist for the SVF player.

It has been tested so far with files generated by these tools:

  • Xilinx ISE WebPack 6.3.02i - 9.1.02i +

  • Altera Quartus II 4.1sp1 - 7.0 +

Configuration for these devices has been tested so far:

  • Altera EPC1C12Q240 +

  • Altera MAX3032, EPM3032ALC44 +

  • Altera MAX3064, EPM3064ALC44 +

  • Altera MAX7032, EPM7032SLC44 +

  • Altera MAX7064, EPM7064SLC44, EPM7064STC44 +

  • Xilinx Spartan-IIE, XC2S300E-PQ208 +

  • Xilinx Spartan-3, XC3S1000-FG456, XC3S5000-FG900 +

The implementation of some SVF commands has deficiencies.

  • HIR, HDR commands not supported. + Their functionality should be covered by the part concept of JTAG Tools. +

  • PIO command not supported. +

  • PIOMAP command not supported. +

  • RUNTEST SCK not supported. + The maximum time constraint is not guaranteed. +

  • SIR + No check is done against the TDO parameter. +

  • TRST + Parameters Z and ABSENT are not supported. +

  • TIR, TDR commands not supported. + Their functionality should be covered by the part concept of JTAG Tools. +

Operation can be slowed down significantly when the FREQUENCY command has +been specified. This is not a problem of the SVF player itself but seem to +happen when the frequency of UrJTAG is set to a value larger than 0. +Configuration takes very long although the maximum allowed frequency is 10 MHz. +Consider to comment out the FREQUENCY command at the beginning of the SVF file.

3.2.7.2. bsdl

The bsdl command is used to set up and test the underlying BSDL subsystem of +UrJTAG.

Whenever detect encounters a new part, a configuration process is +started. This involves matching the retrieved IDCODE against the part +descriptions in /usr/share/urjtag as described above. However, before this +database is searched for a suitable description, the BSDL subsystem is started +and searches for BSDL file that matches this device. If it finds a matching +file, traversal of the /usr/share/urjtag database is skipped. If not, then +this standard process follows.

To tell the BSDL subsytem where to look for BSDL files, the bsdl path +pathlist command has to be issued prior to detect. The contents of +pathlist must be a semicolon-separated list of directories where BSDL files +are located. This list is stored by bsdl path and is used lateron when +detect calls the BSDL subsystem.

The BSDL subsystem applies the first BSDL file that parses without +errors and that contains the correct IDCODE. Scanning the specified +directories happens in exactly the given order. Inside a directory however, +the order depends largely on your filesystem's behavior.

Further details of the bsdl command:

  • bsdl path <path1>[;<path2>[;<pathN>]] + set paths for locating BSDL files +

  • bsdl debug on|off + switches debug messages on or off +

  • bsdl test [file] + reads file (if specified) or all files found via bsdl path and + prints a short status, an active part is not required +

  • bsdl dump [file] + reads file (if specified) or all files found via bsdl path and + prints all configuration commands, an active part is not required +

The bsdl dump file command implements the same functionality as +bsdl2jtag.

3.2.8. Unsupported commands

3.2.8.1. script

Although it's still there, its functionality has been merged into the include +command. Please use "include" instead.

3.2.8.2. setdevice

This command was only there to support the SHARC 21065L processor, +which has no IDCODE and therefore can't be initialized correctly by +just running "detect". However, the proper initialization can be done +after "detect" by loading the proper declarations and bus driver manually:

jtag> include analog/sharc21065l/sharc21065l

3.2.8.3. spiflashmem

The commands "spidetectflash", "spiflashmem", "spireadflash" and +"spieraseflash" only exist in a version of the JTAG tools copyrighted by +Intratrade Ltd., we just know about them from a posting on the net.


PrevHomeNext
UsageUpInternals
\ No newline at end of file diff --git a/web/htdocs/book/_licensing.html b/web/htdocs/book/_licensing.html new file mode 100644 index 00000000..a9986eee --- /dev/null +++ b/web/htdocs/book/_licensing.html @@ -0,0 +1,152 @@ + +Licensing
Universal JTAG library, server and tools
PrevNext

Chapter 6. Licensing

6.1. Overview

Various licenses are used for the UrJTAG project. The GPL is used for most +of the code except for some include files, JIM, and cable driver source, where +a BSD or MIT license is used; this is noted in the file headers.


PrevHomeNext
F.A.Q. GNU Free Documentation License (FDL)
\ No newline at end of file diff --git a/web/htdocs/book/_system_requirements.html b/web/htdocs/book/_system_requirements.html new file mode 100644 index 00000000..c724cfe6 --- /dev/null +++ b/web/htdocs/book/_system_requirements.html @@ -0,0 +1,536 @@ + +System requirements
Universal JTAG library, server and tools
PrevChapter 2. GeneralNext

2.3. System requirements

2.3.1. Supported host operating systems

JTAG Tools should run on all Unix like operating systems including MS Windows +with Cygwin installed.

2.3.2. Required software for running UrJTAG

Required only for MS Windows:

  • current Cygwin net installation from http://cygwin.com +

  • ioperm package (a part of the standard Cygwin net installation) +

It may be necessary to run the command "ioperm -i" to install the IOPERM.SYS +driver in the system.

If UrJTAG was compiled to use the readline library, it has to be present on +the system as well. It's probably a standard part of your distribution.

More software is needed if you want to compile UrJTAG (which you probably want +because currently no pre-compiled binaries are avaible…). See "Installation" +below.

2.3.3. Supported JTAG adapters/cables

See help cable command for up-to-date info.

  • Arcom JTAG Cable +

  • Altera ByteBlaster/ByteBlaster II/ByteBlasterMV Parallel Port Download Cable +

  • Altera USB-Blaster and compatible http://www.ixo.de/info/usb_jtag +

  • Xilinx DLC5 JTAG Parallel Cable III +

  • ETC EA253 JTAG Cable +

  • ETC EI012 JTAG Cable +

  • Ka-Ro TRITON (PXA255/250) JTAG Cable +

  • Keith &amp; Koep JTAG Cable +

  • Lattice Parallel Port JTAG Cable +

  • Mpcbdm JTAG Cable +

  • Macraigor Wiggler JTAG Cable +

  • Amontec JTAGkey (FT2232-based) +

  • Olimex ARM-USB-JTAG (FT2232-based) +

  • Olimex ARM-USB-TINY (FT2232-based) +

  • OOCDLink-s (FT2232-based) (experimental) http://www.joernonline.de/dw/doku.php?id=projects:oocdlink:2_oocdlinks +

  • Other FT2232-based USB JTAG cables (experimental) +

  • Xverve Signalyzer Tool (FT2232-based) (experimental) +

  • Turtelizer 2 (FT2232-based) (experimental) http://www.ethernut.de/en/hardware/turtelizer/ +

  • USB to JTAG Interface (FT2232-based) (experimental) http://www.hs-augsburg.de/~hhoegl/proj/usbjtag/usbjtag.html +

  • Xilinx Platform USB Cable (experimental) +

2.3.4. JTAG-aware parts (chips)

The data/ directory of the UrJTAG installation has some more, but at +least the following are supported:

  • Altera EP1C20F400 +

  • Altera EPM7128AETC100 +

  • Analog Devices Sharc-21065L +

  • Atmel ATmega128 (partial support) +

  • Broadcom BCM1250 +

  • Broadcom BCM3310 (partial support) +

  • Broadcom BCM5421S +

  • Broadcom BCM4712 (partial support) +

  • DEC SA1100 +

  • Hitachi HD64465 +

  • Hitachi SH7727 +

  • Hitachi SH7729 +

  • IBM PowerPC 440GX +

  • Intel IXP425 +

  • Intel SA1110 +

  • Intel PXA250/PXA255/PXA260/PXA261/PXA262/PXA263 +

  • Lattice LC4032V +

  • Lattice M4A3-64/32 +

  • Lattice M4A3-256/192 +

  • Motorola MPC8245 +

  • Samsung S3C4510B +

  • Sharp LH7A400 +

  • Toshiba TX4925/TX4926 +

  • Xilinx XC2C256-TQ144 +

  • Xilinx XCR3032XL-VQ44 +

  • Xilinx XCR3128XL-CS144 +

  • Xilinx XCR3128XL-VQ100 +

  • Xilinx XCR3256XL-FT256 +

2.3.5. Flash chips

Not all chips are supported in every possible configuration, there may +be untested combinations of chip type, bus width, …

  • Intel 28FxxxJ3A (28F320J3A, 28F640J3A, 28F128J3A) +

  • Intel 28FxxxK3 (28F640K3, 28F128K3, 28F256K3) +

  • Intel 28FxxxK18 (28F640K18, 28F128K18, 28F256K18) +

  • AMD Am29LV64xD (Am29LV640D, Am29LV641D, Am29LV642D) +

  • AMD Am29xx040B (Am29F040B, Am29LV040B) +


PrevHomeNext
UrJTAGUpCompilation and installation
\ No newline at end of file diff --git a/web/htdocs/book/_urjtag.html b/web/htdocs/book/_urjtag.html new file mode 100644 index 00000000..6fa1d09e --- /dev/null +++ b/web/htdocs/book/_urjtag.html @@ -0,0 +1,268 @@ + +UrJTAG
Universal JTAG library, server and tools
PrevChapter 2. GeneralNext

2.2. UrJTAG

2.2.1. Introduction

UrJTAG Tools is a software package which enables working with JTAG-aware (IEEE +1149.1) hardware devices (parts) and boards through JTAG adapter.

This package has open and modular architecture with ability to write +miscellaneous extensions (like board testers, flash memory programmers, and so +on).

JTAG Tools package 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. Please read +COPYING file for more info.

This software may damage your hardware!

Feedback and contributions are welcome.

2.2.2. About this document

This documentation is far from being complete. You're encouraged to amend and +supplement it and submit your changes in the Bugs or Enhancements tracker +at the UrJTAG website.

2.2.3. UrJTAG Website

The most current version of this documentation and UrJTAG sourcecode +is always available from the project homepage at http://www.urjtag.org

2.2.4. The name "UrJTAG"

I (Kolja) favour short names, so I thought about adding only a few +letters to "JTAG". The prefix "Ur" in German means "ancestral", an "Ur-Vater" +is a forefather. UrJTAG shall become the forefather, the prototype for many +other JTAG tools. By mere chance the "Ur" is also another name for an aurochs, +an animal similar to the GNU…

2.2.5. Authors, contributors, … thanks

A list of contributors is maintained in the file THANKS in the source +distribution. Special thanks go to Marcel Telka, who actually "invented" the +JTAG tools and wrote most of this basis of UrJTAG, and Arnim Laeuger for his +continuous support and development of SVF and BSDL subsystem and FT2232 +drivers.

2.2.6. UrJTAG and openwince JTAG Tools

The JTAG Tools originally were developed by Marcel Telka as part of +the openwince project. Still a large portion of the source code is his work. +However, the last release of the JTAG tools was version 0.5.1 in 2003. After a +few years the development completely stalled. Every few months or so on the +project's mailing list someone asked about continuing, but a critical mass +wasn't reached before late 2007. A fork of the JTAG tools was created under the +wings of the UrJTAG project at Sourceforge.


PrevHomeNext
GeneralUpSystem requirements
\ No newline at end of file diff --git a/web/htdocs/book/_usage.html b/web/htdocs/book/_usage.html new file mode 100644 index 00000000..daec7b97 --- /dev/null +++ b/web/htdocs/book/_usage.html @@ -0,0 +1,322 @@ + +Usage
Universal JTAG library, server and tools
PrevNext

Chapter 3. Usage

3.1. Quick start

3.1.1. Run the software

Connect your JTAG adapter between your PC and target device and turn +on your device.

To run JTAG Tools type "jtag" and press Enter. jtag should start and +display some initial informations. Output should end with line like this:

This is "jtag command prompt". Type "help" and press Enter for initial help
+about available commands. To exit JTAG Tools type "quit" and press Enter.

3.1.2. Configure the cable

Type "help cable" for list of supported JTAG cables.

Type "cable" command followed by the cable name and possibly further +arguments for cable configuration. Example:

jtag> cable EA253 parallel 0x378
+Initializing ETC EA253 JTAG Cable on parallel port at 0x378

See the section about the "cable" command for details and USB support.

3.1.3. Detect parts on the JTAG chain

Type "detect" at the jtag command prompt:

jtag> detect

Your output should look like this:

IR length: 5
+Chain length: 1
+Device Id: 01011001001001100100000000010011
+  Manufacturer: Intel
+  Part:         PXA250
+  Stepping:     C0
+  Filename:     /usr/local/share/urjtag/intel/pxa250/pxa250c0

If you get empty output or an error message your JTAG adapter is not connected +properly, or your target board doesn't work, or it is turned off.

The "detect" command is required before all other commands.

3.1.4. Print current JTAG chain status

jtag> print chain
+ No. Manufacturer Part   Stepping Instruction Register
+---------------------------------------------------------
+   0 Intel        PXA250 C0       BYPASS      BR

3.1.5. Sample device pin status

jtag> instruction SAMPLE/PRELOAD
+jtag> shift ir
+jtag> shift dr
+jtag> dr
+1000110010000010000110010111111111111111111001101110...
+jtag> print chain
+ No. Manufacturer Part   Stepping Instruction    Register
+------------------------------------------------------------
+   0 Intel        PXA250 C0       SAMPLE/PRELOAD BSR
+jtag> get signal BOOT_SEL[0]
+BOOT_SEL[0] = 0
+jtag>
Note: BSR is "Boundary Scan Register"

3.1.6. Burn flash connected to the part

jtag> flashmem 0 brux.b
+0x00000000
+Note: Supported configuration is 2 x 16 bit only
+BOOT_SEL: Asynchronous 32-bit ROM
2 x 16 bit CFI devices detected (QRY ok)!
program:
+block 0 unlocked
+erasing block 0: 0
+addr: 0x00002854
+verify:
+addr: 0x00002854
+Done.
+jtag>

or:

jtag> flashmem msbin xboot.bin
+Note: Supported configuration is 2 x 16 bit only
+BOOT_SEL: Asynchronous 32-bit ROM
2 x 16 bit CFI devices detected (QRY ok)!
block 0 unlocked
+erasing block 0: 0
+program:
+record: start = 0x00000000, len = 0x00000004, checksum = 0x000001EB
+record: start = 0x00000040, len = 0x00000008, checksum = 0x000001B0
+record: start = 0x00001000, len = 0x00002B30, checksum = 0x00122CAB
+record: start = 0x00004000, len = 0x00000160, checksum = 0x0000684B
+record: start = 0x00005000, len = 0x00000054, checksum = 0x000008EE
+record: start = 0x00005054, len = 0x00000030, checksum = 0x00000DA9
+record: start = 0x00000000, len = 0x00001000, checksum = 0x00000000
verify:
+record: start = 0x00000000, len = 0x00000004, checksum = 0x000001EB
+record: start = 0x00000040, len = 0x00000008, checksum = 0x000001B0
+record: start = 0x00001000, len = 0x00002B30, checksum = 0x00122CAB
+record: start = 0x00004000, len = 0x00000160, checksum = 0x0000684B
+record: start = 0x00005000, len = 0x00000054, checksum = 0x000008EE
+record: start = 0x00005054, len = 0x00000030, checksum = 0x00000DA9
+record: start = 0x00000000, len = 0x00001000, checksum = 0x00000000
Done.
+jtag>

PrevHomeNext
Compilation and installation JTAG commands
\ No newline at end of file diff --git a/web/htdocs/book/index.html b/web/htdocs/book/index.html new file mode 100644 index 00000000..98300f50 --- /dev/null +++ b/web/htdocs/book/index.html @@ -0,0 +1,475 @@ + +Universal JTAG library, server and tools

Universal JTAG library, server and tools

Kolja Waschk (Ed.)


Table of Contents
1. Copyright
2. General
2.1. JTAG
2.1.1. Introduction
2.1.2. Interfaces
2.1.3. Additions
2.1.4. BSDL and UrJTAG data files
2.1.5. SVF files
2.1.6. JAM/STAPL files
2.2. UrJTAG
2.2.1. Introduction
2.2.2. About this document
2.2.3. UrJTAG Website
2.2.4. The name "UrJTAG"
2.2.5. Authors, contributors, … thanks
2.2.6. UrJTAG and openwince JTAG Tools
2.3. System requirements
2.3.1. Supported host operating systems
2.3.2. Required software for running UrJTAG
2.3.3. Supported JTAG adapters/cables
2.3.4. JTAG-aware parts (chips)
2.3.5. Flash chips
2.4. Compilation and installation
2.4.1. Required software for compiling UrJTAG
2.4.2. Required libraries for USB support
2.4.3. Installing from source tar.gz
2.4.4. Installing from Subversion repository
2.4.5. Linking to FTD2XX.DLL in Cygwin environment
2.4.6. Using LibUSB-Win32 in Cygwin environment
2.4.7. Building the BSDL subsystem
3. Usage
3.1. Quick start
3.1.1. Run the software
3.1.2. Configure the cable
3.1.3. Detect parts on the JTAG chain
3.1.4. Print current JTAG chain status
3.1.5. Sample device pin status
3.1.6. Burn flash connected to the part
3.2. JTAG commands
3.2.1. Overview
3.2.2. Basic commands
3.2.3. Chain management
3.2.4. Part definition commands
3.2.5. TAP control
3.2.6. RAM/Flash access
3.2.7. Highlevel commands
3.2.8. Unsupported commands
4. Internals
4.1. Files
4.1.1. Source code Overview
4.2. Drivers
4.2.1. Cable-specific drivers (src/tap/cable)
4.3. Data file format
4.3.1. General rules
4.3.2. Signal Definition
4.4. Development
4.4.1. Future Plans
4.4.2. How to contribute
5. F.A.Q.
6. Licensing
6.1. Overview
6.2. GNU Free Documentation License (FDL)
6.3. GNU General Public License (GPL)

  Next
  Copyright
\ No newline at end of file