Add section to provide some documentation for cross-compiling.
[openocd.git] / README
diff --git a/README b/README
index 07aaf9a4967df6f12078686ca032b063ee0c0408..537bb0cbd28857e0f211269646f8650394f87f03 100644 (file)
--- a/README
+++ b/README
@@ -51,10 +51,11 @@ The OpenOCD User's Guide can be produced in two different format:
 The OpenOCD Developer Manual contains information about the internal
 architecture and other details about the code:
 
+  # NB! make sure doxygen is installed, type doxygen --version
   make doxygen
 
   # If HTMLVIEWER is set, this views the HTML Doxygen output.
-  ${HTMLVIEWER} doxyegen/index.html
+  ${HTMLVIEWER} doxygen/index.html
 
 The remaining sections describe how to configure the system such that
 you can build the in-tree documentation.
@@ -117,18 +118,23 @@ Building OpenOCD
 
 The INSTALL file contains generic instructions for running 'configure'
 and compiling the OpenOCD source code.  That file is provided by default
-for all GNU automake packages, and 
+for all GNU automake packages.  If you are not familiar with the GNU
+autotools, then you should read those instructions first.  
 
-if you are not familiar with the GNU autotools, then you should read
-those instructions first.  
-Still, the
-remainder of this document tries to provide complete instructions for
-those looking for a quick-install
+The remainder of this document tries to provide some instructions for
+those looking for a quick-install.
 
 OpenOCD Dependencies
 --------------------
 
-You will need to install the appropriate driver files, if you want to
+Presently, GCC is required to build OpenOCD.  The developers have begun
+to enforce strict code warnings (-Wall, -Werror, -Wextra, and more) and
+use C99-specific features: inline functions, named initializers, mixing
+declarations with code, and other tricks.  While it may be possible to
+use other compilers, they must be somewhat modern and could require
+extending support to conditionally remove GCC-specific extensions.
+
+Also, you need to install the appropriate driver files, if you want to
 build support for a USB or FTDI-based interface:
 
 - ft2232, jlink, rlink, vsllink, usbprog, arm-jtag-ew:
@@ -136,9 +142,14 @@ build support for a USB or FTDI-based interface:
 - ft2232 also requires:
   - libftdi: http://www.intra2net.com/opensource/ftdi/  *OR*
   - ftd2xx: http://www.ftdichip.com/Drivers/D2XX.htm,
-    or the Amontec version (from @uref{http://www.amontec.com}), for
+    or the Amontec version (from http://www.amontec.com), for
     easier support of JTAGkey's vendor and product IDs.
 
+Many Linux distributions provide these packages through their automated
+installation and update mechanisms; however, some Linux versions include
+older versions of libftdi.  In particular, using Ubuntu 8.04 has been
+problematic, but newer versions of Ubuntu do not have this problem.
+
 Compiling OpenOCD
 -----------------
 
@@ -155,6 +166,29 @@ will build OpenOCD and place the final executable in ./src/.  The
 final (optional) step, ``make install'', places all of the files in the
 required location.
 
+Cross-Compiling Options
+-----------------------
+
+To cross-compile, you must specify both --build and --host options to
+the 'configure' script.  For example, you can configure OpenOCD to
+cross-compile on a x86 Linux host to run on Windows (MinGW32), you could
+use the following configuration options:
+
+  ./configure --build=i686-pc-linux-gnu --host=i586-mingw32msvc ... 
+
+Likewise, the following options allow OpenOCD to be cross-compiled for
+an ARM target on the same x86 host:
+
+  ./configure --build=i686-pc-linux-gnu --host=arm-elf ...
+
+Both must be specified to work around bugs in autoconf.
+
+Scripts for producing ARM cross-compilers can be found on the web with a
+little searching.  A script to produce an x86 Linux-hosted MinGW32
+cross-compiler can be downloaded from the following URL:
+
+  http://www.mingw.org/wiki/LinuxCrossMinGW
+
 Configuration Options
 ---------------------
 
@@ -242,11 +276,6 @@ The following additional options may also be useful:
   --disable-wextra        Disable extra compiler warnings
   --disable-werror        Do not treat warnings as errors
 
-  --enable-release        Enable building of an OpenOCD release.  This
-                         option is intended for project maintainers.
-                         It simply omits the svn version string when
-                         the openocd -v is executed (to KISS).
-
   --disable-option-checking
                           Ignore unrecognized --enable and --with options.
   --disable-dependency-tracking  speeds up one-time build
@@ -367,7 +396,7 @@ 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:
+If you prefer GIT based tools, the git-svn package works too:
 
    git svn clone -s svn://svn.berlios.de/openocd
 
@@ -376,7 +405,7 @@ Tips For Building From The Subversion Repository
 
 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}
+Windows, you have to use Cygwin. Make sure that your 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 was an observation gathered from the logs of

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)