David Brownell <david-b@pacbell.net> Update docs to say that "arm7_9 dbgrq enable...
[openocd.git] / doc / openocd.texi
index 904273230edc6e3b8ac9dc90859345391036fdb8..5537ba809e2d4763685561bf7b728be17fd137cc 100644 (file)
@@ -61,7 +61,6 @@ Free Documentation License''.
 @menu
 * About::                            About OpenOCD
 * Developers::                       OpenOCD Developers
-* Building OpenOCD::                 Building OpenOCD From SVN
 * JTAG Hardware Dongles::            JTAG Hardware Dongles
 * About JIM-Tcl::                    About JIM-Tcl
 * Running::                          Running OpenOCD
@@ -174,9 +173,27 @@ or expand the OpenOCD source code.
 
 @section OpenOCD Subversion Repository
 
-The ``Building From Source'' section provides instructions to retrieve
-and and build the latest version of the OpenOCD source code.
-@xref{Building OpenOCD}.
+You can download the current SVN version with an SVN client of your
+choice from the following repositories:
+
+   @uref{svn://svn.berlios.de/openocd/trunk}
+
+or
+
+   @uref{http://svn.berlios.de/svnroot/repos/openocd/trunk}
+
+Using the SVN command line client, you can use the following command to
+fetch the latest version (make sure there is no (non-svn) directory
+called "openocd" in the current directory):
+
+   svn checkout svn://svn.berlios.de/openocd/trunk openocd
+
+If you prefer GIT based tools, the @command{git-svn} package works too:
+
+   git svn clone -s svn://svn.berlios.de/openocd
+
+The ``README'' file contains the instructions for building the project
+from the repository.
 
 Developers that want to contribute patches to the OpenOCD system are
 @b{strongly} encouraged to base their work off of the most recent trunk
@@ -209,275 +226,6 @@ SVN commits to keep pace with the ongoing changes:
 @uref{https://lists.berlios.de/mailman/listinfo/openocd-svn}
 
 
-@node Building OpenOCD
-@chapter Building OpenOCD
-@cindex building
-
-@section Pre-Built Tools
-If you are interested in getting actual work done rather than building
-OpenOCD, then check if your interface supplier provides binaries for
-you. Chances are that that binary is from some SVN version that is more
-stable than SVN trunk where bleeding edge development takes place.
-
-@section Packagers Please Read!
-
-You are a @b{PACKAGER} of OpenOCD if you
-
-@enumerate
-@item @b{Sell dongles} and include pre-built binaries
-@item @b{Supply tools} i.e.: A complete development solution
-@item @b{Supply IDEs} like Eclipse, or RHIDE, etc.
-@item @b{Build packages} i.e.: RPM files, or DEB files for a Linux Distro
-@end enumerate
-
-As a @b{PACKAGER}, you will experience first reports of most issues.
-When you fix those problems for your users, your solution may help
-prevent hundreds (if not thousands) of other questions from other users.
-
-If something does not work for you, please work to inform the OpenOCD
-developers know how to improve the system or documentation to avoid
-future problems, and follow-up to help us ensure the issue will be fully
-resolved in our future releases.
-
-That said, the OpenOCD developers would also like you to follow a few
-suggestions:
-
-@enumerate
-@item Send patches, including config files, upstream.
-@item Always build with printer ports enabled.
-@item Use libftdi + libusb for FT2232 support.
-@end enumerate
-
-@section Building From Source
-
-You can download the current SVN version with an SVN client of your choice from the
-following repositories:
-
- @uref{svn://svn.berlios.de/openocd/trunk}
-
-or
-
- @uref{http://svn.berlios.de/svnroot/repos/openocd/trunk}
-
-Using the SVN command line client, you can use the following command to fetch the
-latest version (make sure there is no (non-svn) directory called "openocd" in the
-current directory):
-
-@example
- svn checkout svn://svn.berlios.de/openocd/trunk openocd
-@end example
-
-If you prefer GIT based tools, the @command{git-svn} package works too:
-
-@example
- git svn clone -s svn://svn.berlios.de/openocd
-@end example
-
-Building OpenOCD from a repository requires a recent version of the
-GNU autotools (autoconf >= 2.59 and automake >= 1.9).
-For building on Windows,
-you have to use Cygwin. Make sure that your @env{PATH} environment variable contains no
-other locations with Unix utils (like UnxUtils) - these can't handle the Cygwin
-paths, resulting in obscure dependency errors (This is an observation I've gathered
-from the logs of one user - correct me if I'm wrong).
-
-You further need the appropriate driver files, if you want to build support for
-a FTDI FT2232 based interface:
-
-@itemize @bullet
-@item @b{ftdi2232} libftdi (@uref{http://www.intra2net.com/opensource/ftdi/})
-@item @b{ftd2xx} libftd2xx (@uref{http://www.ftdichip.com/Drivers/D2XX.htm}),
-or the Amontec version (from @uref{http://www.amontec.com}),
-for easier support of JTAGkey's vendor and product IDs.
-@end itemize
-
-libftdi is supported under Windows. Do not use versions earlier than 0.14.
-To use the newer FT2232H chips, supporting RTCK and USB high speed (480 Mbps),
-you need libftdi version 0.16 or newer.
-
-Some people say that FTDI's libftd2xx code provides better performance.
-However, it is binary-only, while OpenOCD is licenced according
-to GNU GPLv2 without any exceptions.
-That means that @emph{distributing} copies of OpenOCD built with
-the FTDI code would violate the OpenOCD licensing terms.
-You may, however, build such copies for personal use.
-
-To build OpenOCD (on both Linux and Cygwin), use the following commands:
-
-@example
- ./bootstrap 
-@end example
-
-Bootstrap generates the configure script, and prepares building on your system.
-
-@example
- ./configure [options, see below]
-@end example
-
-Configure generates the Makefiles used to build OpenOCD.
-
-@example
- make 
- make install
-@end example
-
-Make builds OpenOCD, and places the final executable in ./src/, the last step, ``make install'' is optional.
-
-The configure script takes several options, specifying which JTAG interfaces
-should be included (among other things):
-
-@itemize @bullet
-@item
-@option{--enable-parport} - Enable building the PC parallel port driver.
-@item
-@option{--enable-parport_ppdev} - Enable use of ppdev (/dev/parportN) for parport.
-@item
-@option{--enable-parport_giveio} - Enable use of giveio for parport instead of ioperm.
-@item
-@option{--enable-amtjtagaccel} - Enable building the Amontec JTAG-Accelerator driver.
-@item
-@option{--enable-ecosboard} - Enable building support for eCosBoard based JTAG debugger.
-@item
-@option{--enable-ioutil} - Enable ioutil functions - useful for standalone OpenOCD implementations.
-@item
-@option{--enable-httpd} - Enable builtin httpd server - useful for standalone OpenOCD implementations.
-@item
-@option{--enable-ep93xx} - Enable building support for EP93xx based SBCs.
-@item
-@option{--enable-at91rm9200} - Enable building support for AT91RM9200 based SBCs.
-@item
-@option{--enable-gw16012} - Enable building support for the Gateworks GW16012 JTAG programmer.
-@item
-@option{--enable-ft2232_ftd2xx} - Support FT2232-family chips using
-the closed-source library from FTDICHIP.COM
-(result not for re-distribution).
-@item
-@option{--enable-ft2232_libftdi} - Support FT2232-family chips using
-a GPL'd ft2232 support library (result OK for re-distribution).
-@item
-@option{--with-ftd2xx-win32-zipdir=PATH} - If using FTDICHIP.COM ft2232c driver,
-give the directory where the Win32 FTDICHIP.COM 'CDM' driver zip file was unpacked.
-@item
-@option{--with-ftd2xx-linux-tardir=PATH} - If using FTDICHIP.COM ft2232c driver
-on Linux, give the directory where the Linux driver's TAR.GZ file was unpacked.
-@item
-@option{--with-ftd2xx-lib=shared|static} - Linux only. Default: static.
-Specifies how the FTDICHIP.COM libftd2xx driver should be linked.
-Note: 'static' only works in conjunction with @option{--with-ftd2xx-linux-tardir}.
-The 'shared' value is supported, however you must manually install the required
-header files and shared libraries in an appropriate place.
-@item
-@option{--enable-presto_libftdi} - Enable building support for ASIX Presto programmer using the libftdi driver.
-@item
-@option{--enable-presto_ftd2xx} - Enable building support for ASIX Presto programmer using the FTD2XX driver.
-@item
-@option{--enable-usbprog} - Enable building support for the USBprog JTAG programmer.
-@item
-@option{--enable-oocd_trace} - Enable building support for the OpenOCD+trace ETM capture device.
-@item
-@option{--enable-jlink} - Enable building support for the Segger J-Link JTAG programmer.
-@item
-@option{--enable-vsllink} - Enable building support for the Versaloon-Link JTAG programmer.
-@item
-@option{--enable-rlink} - Enable building support for the Raisonance RLink JTAG programmer.
-@item
-@option{--enable-arm-jtag-ew} - Enable building support for the Olimex ARM-JTAG-EW programmer.
-@item
-@option{--enable-dummy} - Enable building the dummy port driver.
-@end itemize
-
-@section Parallel Port Dongles
-
-If you want to access the parallel port using the PPDEV interface you have to specify
-both the @option{--enable-parport} AND the @option{--enable-parport_ppdev} option since
-the @option{--enable-parport_ppdev} option actually is an option to the parport driver
-(see @uref{http://forum.sparkfun.com/viewtopic.php?t=3795} for more info).
-
-The same is true for the @option{--enable-parport_giveio} option, you have to
-use both the @option{--enable-parport} AND the @option{--enable-parport_giveio} option if you want to use giveio instead of ioperm parallel port access method.
-
-@section FT2232C Based USB Dongles 
-
-There are 2 methods of using the FTD2232, either (1) using the
-FTDICHIP.COM closed source driver, or (2) the open (and free) driver
-libftdi. Some claim the (closed) FTDICHIP.COM solution is faster,
-which is the motivation for supporting it even though its licensing
-restricts it to non-redistributable OpenOCD binaries, and it is
-not available for all operating systems used with OpenOCD.
-
-The FTDICHIP drivers come as either a (win32) ZIP file, or a (Linux)
-TAR.GZ file. You must unpack them ``some where'' convient. As of this
-writing FTDICHIP does not supply means to install these
-files ``in an appropriate place''.
-As a result, there are two
-``./configure'' options that help. 
-
-Below is an example build process:
-
-@enumerate
-@item Check out the latest version of ``openocd'' from SVN.
-
-@item If you are using the FTDICHIP.COM driver, download
-and unpack the Windows or Linux FTD2xx drivers
-(@uref{http://www.ftdichip.com/Drivers/D2XX.htm}).
-If you are using the libftdi driver, install that package
-(e.g. @command{apt-get install libftdi} on systems with APT).
-
-@example
-/home/duane/ftd2xx.win32    => the Cygwin/Win32 ZIP file contents
-/home/duane/libftd2xx0.4.16 => the Linux TAR.GZ file contents
-@end example
-
-@item Configure with options resembling the following.
-
-@enumerate a
-@item Cygwin FTDICHIP solution:
-@example
-./configure --prefix=/home/duane/mytools \
-        --enable-ft2232_ftd2xx \
-        --with-ftd2xx-win32-zipdir=/home/duane/ftd2xx.win32
-@end example
-
-@item Linux FTDICHIP solution:
-@example
-./configure --prefix=/home/duane/mytools \
-        --enable-ft2232_ftd2xx \
-        --with-ft2xx-linux-tardir=/home/duane/libftd2xx0.4.16
-@end example
-
-@item Cygwin/Linux LIBFTDI solution ... assuming that
-@itemize
-@item For Windows -- that the Windows port of LIBUSB is in place.
-@item For Linux -- that libusb has been built/installed and is in place.
-@item That libftdi has been built and installed (relies on libusb).
-@end itemize
-
-Then configure the libftdi solution like this:
-
-@example
-./configure --prefix=/home/duane/mytools \
-        --enable-ft2232_libftdi
-@end example
-@end enumerate
-
-@item Then just type ``make'', and perhaps ``make install''.
-@end enumerate
-
-
-@section Miscellaneous Configure Options
-
-@itemize @bullet
-@item
-@option{--disable-option-checking} - Ignore unrecognized @option{--enable} and @option{--with} options.
-@item
-@option{--enable-gccwarnings} - Enable extra gcc warnings during build.
-Default is enabled.
-@item
-@option{--enable-release} - Enable building of an OpenOCD release, generally
-this is for developers. It simply omits the svn version string when the
-openocd @option{-v} is executed.
-@end itemize
-
 @node JTAG Hardware Dongles
 @chapter JTAG Hardware Dongles
 @cindex dongles
@@ -539,6 +287,8 @@ chips are starting to become available in JTAG adapters.
 @* See: @url{http://www.signalyzer.com}
 @item @b{evb_lm3s811}
 @* See: @url{http://www.luminarymicro.com} - The Stellaris LM3S811 eval board has an FTD2232C chip built in.
+@item @b{luminary_icdi}
+@* See: @url{http://www.luminarymicro.com} - Luminary In-Circuit Debug Interface (ICDI) Board, included in the Stellaris LM3S9B90 and LM3S9B92 Evaluation Kits.
 @item @b{olimex-jtag}
 @* See: @url{http://www.olimex.com}
 @item @b{flyswatter}
@@ -696,6 +446,8 @@ JIM-Tcl commands, and (older) the orginal command interpreter.
 @item @b{Commands}
 @* At the OpenOCD telnet command line (or via the GDB mon command) one
 can type a Tcl for() loop, set variables, etc.
+Some of the commands documented in this guide are implemented
+as Tcl scripts, from a @file{startup.tcl} file internal to the server.
 
 @item @b{Historical Note}
 @* JIM-Tcl was introduced to OpenOCD in spring 2008.
@@ -966,7 +718,7 @@ will help support users of any board using that chip.
 
 @item
 You may may need to write some C code.
-It may be as simple as a supporting a new new ft2232 or parport
+It may be as simple as a supporting a new ft2232 or parport
 based dongle; a bit more involved, like a NAND or NOR flash
 controller driver; or a big piece of work like supporting
 a new chip architecture.
@@ -1513,12 +1265,18 @@ supported.
 
 @section Configuration Stage
 @cindex configuration stage
-@cindex configuration command
+@cindex config command
 
 When the OpenOCD server process starts up, it enters a
 @emph{configuration stage} which is the only time that
 certain commands, @emph{configuration commands}, may be issued.
-Those configuration commands include declaration of TAPs
+In this manual, the definition of a configuration command is
+presented as a @emph{Config Command}, not as a @emph{Command}
+which may be issued interactively.
+
+Those configuration commands include declaration of TAPs,
+flash banks,
+the interface used for JTAG communication,
 and other basic setup.
 The server must leave the configuration stage before it
 may access or activate TAPs.
@@ -1607,19 +1365,19 @@ GDB behaviour is not sufficient.  GDB normally uses hardware
 breakpoints if the memory map has been set up for flash regions.
 @end deffn
 
-@deffn {Config command} gdb_detach (@option{resume}|@option{reset}|@option{halt}|@option{nothing})
+@deffn {Config Command} gdb_detach (@option{resume}|@option{reset}|@option{halt}|@option{nothing})
 Configures what OpenOCD will do when GDB detaches from the daemon.
 Default behaviour is @option{resume}.
 @end deffn
 
 @anchor{gdb_flash_program}
-@deffn {Config command} gdb_flash_program (@option{enable}|@option{disable})
+@deffn {Config Command} gdb_flash_program (@option{enable}|@option{disable})
 Set to @option{enable} to cause OpenOCD to program the flash memory when a
 vFlash packet is received.
 The default behaviour is @option{enable}.
 @end deffn
 
-@deffn {Config command} gdb_memory_map (@option{enable}|@option{disable})
+@deffn {Config Command} gdb_memory_map (@option{enable}|@option{disable})
 Set to @option{enable} to cause OpenOCD to send the memory configuration to GDB when
 requested. GDB will then know when to set hardware breakpoints, and program flash
 using the GDB load command. @command{gdb_flash_program enable} must also be enabled
@@ -1628,7 +1386,7 @@ Default behaviour is @option{enable}.
 @xref{gdb_flash_program}.
 @end deffn
 
-@deffn {Config command} gdb_report_data_abort (@option{enable}|@option{disable})
+@deffn {Config Command} gdb_report_data_abort (@option{enable}|@option{disable})
 Specifies whether data aborts cause an error to be reported
 by GDB memory read packets.
 The default behaviour is @option{disable};
@@ -1806,6 +1564,8 @@ Specifies the @var{serial-number} of the FTDI FT2232 device to use,
 in case the vendor provides unique IDs and more than one FT2232 device
 is connected to the host.
 If not specified, serial numbers are not considered.
+(Note that USB serial numbers can be arbitrary Unicode strings,
+and are not restricted to containing only decimal digits.)
 @end deffn
 
 @deffn {Config Command} {ft2232_layout} name
@@ -1819,6 +1579,7 @@ Currently valid layout @var{name} values include:
 @item @b{evb_lm3s811} Luminary Micro EVB_LM3S811 as a JTAG interface,
 either for the local Cortex-M3 (SRST only)
 or in a passthrough mode (neither SRST nor TRST)
+@item @b{luminary_icdi} Luminary In-Circuit Debug Interface (ICDI) Board
 @item @b{flyswatter} Tin Can Tools Flyswatter
 @item @b{icebear} ICEbear JTAG adapter from Section 5
 @item @b{jtagkey} Amontec JTAGkey and JTAGkey-Tiny (and compatibles)
@@ -2023,7 +1784,7 @@ support it, an error is returned when you try to use RTCK.
 
 @defun jtag_rclk fallback_speed_kHz
 @cindex RTCK
-This Tcl proc (defined in startup.tcl) attempts to enable RTCK/RCLK.
+This Tcl proc (defined in @file{startup.tcl}) attempts to enable RTCK/RCLK.
 If that fails (maybe the interface, board, or target doesn't
 support it), falls back to the specified frequency.
 @example
@@ -2344,9 +2105,16 @@ Actual config files use a variable instead of literals like
 @option{str912}, to support more than one chip of each type.
 @xref{Config File Guidelines}.
 
-At this writing there is only a single command to work with
-scan chains, and there is no support for enumerating
-TAPs or examining their attributes.
+@deffn Command {jtag names}
+Returns the names of all current TAPs in the scan chain.
+Use @command{jtag cget} or @command{jtag tapisenabled}
+to examine attributes and state of each TAP.
+@example
+foreach t [jtag names] @{
+    puts [format "TAP: %s\n" $t]
+@}
+@end example
+@end deffn
 
 @deffn Command {scan_chain}
 Displays the TAPs in the scan chain configuration,
@@ -2359,10 +2127,8 @@ In addition to the enable/disable status, the contents of
 each TAP's instruction register can also change.
 @end deffn
 
-@c FIXME!  there should be commands to enumerate TAPs
-@c and get their attributes, like there are for targets.
-@c "jtag cget ..." will handle attributes.
-@c "jtag names" for enumerating TAPs, maybe.
+@c FIXME!  "jtag cget" should be able to return all TAP
+@c attributes, like "$target_name cget" does for targets.
 
 @c Probably want "jtag eventlist", and a "tap-reset" event
 @c (on entry to RESET state).
@@ -2387,8 +2153,9 @@ and underscores are OK; while others (including dots!) are not.
 In older code, JTAG TAPs were numbered from 0..N.
 This feature is still present.
 However its use is highly discouraged, and
-should not be counted upon.
-Update all of your scripts to use TAP names rather than numbers.
+should not be relied on; it will be removed by mid-2010.
+Update all of your scripts to use TAP names rather than numbers,
+by paying attention to the runtime warnings they trigger.
 Using TAP numbers in target configuration scripts prevents
 reusing those scripts on boards with multiple targets.
 @end quotation
@@ -3390,8 +3157,8 @@ the family was cribbed from the data sheet. @emph{Note to future
 readers/updaters: Please remove this worrysome comment after other
 chips are confirmed.}
 
-The AT91SAM3U4[E/C] (256K) chips have 2 flash banks, the other chips
-(3U[1/2][E/C]) have 1 flash bank.  In all cases the flash banks are at
+The AT91SAM3U4[E/C] (256K) chips have two flash banks; most other chips
+have one flash bank.  In all cases the flash banks are at
 the following fixed locations:
 
 @example
@@ -4268,6 +4035,15 @@ port is 5555.
 Exits the current telnet session.
 @end deffn
 
+@c note EXTREMELY ANNOYING word wrap at column 75
+@c even when lines are e.g. 100+ columns ...
+@c coded in startup.tcl
+@deffn {Command} help [string]
+With no parameters, prints help text for all commands.
+Otherwise, prints each helptext containing @var{string}.
+Not every command provides helptext.
+@end deffn
+
 @deffn Command sleep msec [@option{busy}]
 Wait for at least @var{msec} milliseconds before resuming.
 If @option{busy} is passed, busy-wait instead of sleeping.
@@ -4855,6 +4631,8 @@ and any other core-specific commands that may be available.
 Control use of the EmbeddedIce DBGRQ signal to force entry into debug mode,
 instead of breakpoints.  This should be
 safe for all but ARM7TDMI--S cores (like Philips LPC). 
+This feature is enabled by default on most ARM9 cores,
+including ARM9TDMI, ARM920T, and ARM926EJ-S.
 @end deffn
 
 @deffn Command {arm7_9 dcc_downloads} (@option{enable}|@option{disable})
@@ -5717,7 +5495,7 @@ Return information about the flash banks
 @end itemize
 
 OpenOCD commands can consist of two words, e.g. "flash banks". The
-startup.tcl "unknown" proc will translate this into a Tcl proc
+@file{startup.tcl} "unknown" proc will translate this into a Tcl proc
 called "flash_banks".
 
 @section OpenOCD specific Global Variables

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)