From 12092532be6d13ac98babfcaca2020ef9a94d2bf Mon Sep 17 00:00:00 2001 From: Kolja Waschk Date: Tue, 18 Dec 2007 10:46:04 +0000 Subject: [PATCH] Cosmetics, small corrections, Copyright git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@861 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 4 ++ jtag/doc/UrJTAG.txt | 89 ++++++++++++++++++++++++++++++--------------- jtag/src/jtag.c | 14 +++++-- 3 files changed, 73 insertions(+), 34 deletions(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index c387a92b..0c2699d3 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,7 @@ +2007-12-18 Kolja Waschk * jtag.c: Don't abort on invalid command line options diff --git a/jtag/doc/UrJTAG.txt b/jtag/doc/UrJTAG.txt index 7f6be5cd..5064346c 100644 --- a/jtag/doc/UrJTAG.txt +++ b/jtag/doc/UrJTAG.txt @@ -7,12 +7,13 @@ $Id $ This document is formatted to be readable for "asciidoc". Before you make any changes, please read the use guide at the asciidoc home page www.methods.co.nz/asciidoc and try to adapt to the style used here; e.g. -use the single-line section header style ("== header =="). +use the single-line section header style ("== header =="). Please do not use +any whitespace other than SPACE (ASCII 0x20) and break lines > 79 chars. ///////////////////////////////////////////////////////////////////////////// == Copyright == -Copyright 2007, 2008 Kolja Waschk (and the respective authors) +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 @@ -24,9 +25,10 @@ the section entitled "GNU Free Documentation License". == General == === JTAG === +// Contributed by Ralf Engels JTAG basics can be found all over the internet. This section should go into -some more details about working with JTAG. What hardwarde do you need, what is +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 ==== @@ -52,9 +54,9 @@ directly control the statemachine (yet). ==== Interfaces ==== -The simplest interface that you can build is 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) +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 ==== @@ -67,26 +69,42 @@ 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 +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. the Xilinx .bsd files are -all included in their free web-pack. +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 +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. Please ask on -the mailing list in case of problems with that. Please also send proven working -files back to this project. +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. + +We're working on implementing native BSDL support in UrJTAG itself, so that +BSDL files do not have to be converted into UrJTAG format anymore. ==== SVF files ==== -The svf file format contains a number of high level commands to drive the jtag +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 tool allows you to write this file to program devices. +SVF is documented in 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. + +==== 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 === +// Written by K.Waschk ==== Introduction ==== @@ -106,6 +124,12 @@ WARNING: 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 @@ -113,7 +137,7 @@ 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 +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, @@ -168,14 +192,18 @@ 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 - * Ka-Ro TRITON (PXA255/250) JTAG Cable * Macraigor Wiggler JTAG Cable + * Olimex FT2232-based ARM-USB-JTAG + * Other FT2232-based USB JTAG cables (experimental) + * Xilinx Platform USB Cable (experimental) ==== JTAG-aware parts (chips) ==== @@ -287,7 +315,8 @@ 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 + cd urjtag/jtag + ./autogen.sh # ./configure done by autogen.sh; run it here with special options if needed make make install @@ -299,7 +328,7 @@ If you want to try the very newest version of UrJTAG... == Usage == === Quick start === -//Contributed by Ralf Engels +// Contributed by Ralf Engels ==== Run the software ==== @@ -418,6 +447,7 @@ or: //------------------------------------------------------------------------ === JTAG commands === +// Various authors... ==== Overview ==== @@ -599,30 +629,29 @@ be added soon... svf/ ==== Data file format ==== -//By Marcel Telka +// By Marcel Telka -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. +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. +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. +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. //------------------------------------------------------------------------ diff --git a/jtag/src/jtag.c b/jtag/src/jtag.c index e9cfc3ef..4e8fc774 100644 --- a/jtag/src/jtag.c +++ b/jtag/src/jtag.c @@ -248,6 +248,7 @@ jtag_readline_loop( const char *prompt ) do { printf("%s", prompt); + fflush(stdout); jtag_readline_multiple_commands_support( line ); } while(fgets(line, 1023, stdin)); @@ -414,7 +415,11 @@ main( int argc, const char **argv ) if (version) { - printf(_("%s #%s\nCopyright (C) 2002, 2003 ETC s.r.o.\n"), PACKAGE_STRING, SVN_REVISION); + printf(_("\n%s #%s\n\n" + "Copyright (C) 2002, 2003 ETC s.r.o.\n" + "Copyright (C) 2007, 2008 Kolja Waschk and the respective authors\n" + ), PACKAGE_STRING, SVN_REVISION); + printf(_("\n" "This program is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" @@ -470,8 +475,9 @@ main( int argc, const char **argv ) /* interactive */ printf( - _("%s #%s\n" + _("\n%s #%s\n" "Copyright (C) 2002, 2003 ETC s.r.o.\n" + "Copyright (C) 2007, 2008 Kolja Waschk and the respective authors\n\n" "%s is free software, covered by the GNU General Public License, and you are\n" "welcome to change it and/or distribute copies of it under certain conditions.\n" "There is absolutely no warranty for %s.\n\n"), PACKAGE_STRING, SVN_REVISION, @@ -484,8 +490,8 @@ main( int argc, const char **argv ) return -1; } - printf( _("Warning: %s may damage your hardware! Type \"quit\" to exit!\n\n"), PACKAGE_NAME ); - printf( _("Type \"help\" for help.\n\n") ); + printf( _("WARNING: %s may damage your hardware!\n"), PACKAGE_NAME ); + printf( _("Type \"quit\" to exit, \"help\" for help.\n\n") ); /* Create ~/.jtag */ jtag_create_jtagdir();