1 |
12 |
xianfeng |
These are the notes for building the Advanced JTAG Bridge program.
|
2 |
|
|
Nathan Yawn, nathan.yawn@opencores.org
|
3 |
|
|
|
4 |
|
|
BUILDING
|
5 |
|
|
|
6 |
|
|
This program doesn't use automake. It has been developed using the cygwin
|
7 |
|
|
environment under winXP, and should also compile under various GNU/Linux
|
8 |
|
|
distributions. It has been tested and in known to work with Ubuntu 9.04.
|
9 |
|
|
There are two sets of build flags defined in the Makefile,
|
10 |
|
|
one for cygwin and one for Linux - one set is used, one is commented out.
|
11 |
|
|
Edit the Makefile for your system, type "make," and see what happens...
|
12 |
|
|
|
13 |
|
|
The program may be built with support for the Advanced Debug Interface
|
14 |
|
|
(the default), or the legacy "debug_if" interface. To compile for the
|
15 |
|
|
legacy interface, __LEGACY__ should be added to CFLAGS in the Makefile
|
16 |
|
|
(the line is present but commented out by default). Note that support
|
17 |
|
|
for the two different debug hardware units is mutually exclusive; both
|
18 |
|
|
cannot be supported in the same build.
|
19 |
|
|
|
20 |
|
|
DEPENDENCIES
|
21 |
|
|
|
22 |
|
|
Adv_jtag_bridge has three dependencies:
|
23 |
|
|
|
24 |
|
|
- The pthreads library (probably already installed)
|
25 |
|
|
- Cygwin only: libioperm (for parallel port device access permissions)
|
26 |
|
|
- libusb
|
27 |
|
|
|
28 |
|
|
Since adv_jtag_bridge was written, a newer version of libusb has been
|
29 |
|
|
released (1.0), which used a different interface. We still use the old
|
30 |
|
|
interface (0.1), so be sure you install the "compatibility layer" if you
|
31 |
|
|
install the latest libusb. As of December 2008, libUSB-Win32 still used
|
32 |
|
|
v0.1, so cygwin users may not need to install any additional compatibility
|
33 |
|
|
layer.
|
34 |
|
|
|
35 |
|
|
BUGS
|
36 |
|
|
|
37 |
|
|
GDB 6.8 has a bug which prevents it from working when no stack frame is
|
38 |
|
|
present (such as at start-up on a bare-metal debugger, such as this one).
|
39 |
|
|
A simple patch applied to GDB 6.8 will work around the problem (a general
|
40 |
|
|
solution is not yet available). This patch can be found in the source
|
41 |
|
|
directory of adv_jtag_bridge as "gdb-6.8-bz436037-reg-no-longer-active.patch".
|
42 |
|
|
|
43 |
|
|
LICENSE
|
44 |
|
|
|
45 |
|
|
This code is based on "jp2", which was distributed under the GNU Public
|
46 |
|
|
License, version 2. Adv_jtag_bridge is therefore also distributed under
|
47 |
|
|
this license.
|
48 |
|
|
|
49 |
|
|
WARRANTY
|
50 |
|
|
|
51 |
|
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
52 |
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
53 |
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
54 |
|
|
more details.
|