Commit Graph

844 Commits

Author SHA1 Message Date
David Brownell
2bc7446bb8 buildfix with -DNDEBUG
Don't save that state unless its only user, an assertion,
is compiled.  Saving it broke a cygwin build.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-05 14:11:03 -08:00
Spencer Oliver
faad9e5923 parport: output port as hex rather than dec
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-01-05 19:54:36 +00:00
David Brownell
237a707f96 FT2232: fix doc typo
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-03 15:02:51 -08:00
David Brownell
e1258c703b JTAG/drivers: ft2232 docs
Add doxyegen description for this driver.

Correct the helptext (configures *or* displays based on #params),
and usage (use the same BNF as the User's Guide).

Remove superfluous #include

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-03 14:54:52 -08:00
David Brownell
50fb3a5129 JTAG/Drivers: Amontec JTAG accelerator fixes
Remove superfluous #include.

Correct the helptext (configures *or* displays based on #params),
and usage (use the same BNF as the User's Guide).

Add doxygen -- file-level description and a @todo for doing
RTCK correctly.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-03 14:51:01 -08:00
David Brownell
4aedb02fcd JTAG: Amontec JTAG accelerater "rtck" is back
The command processing conversion a while back lost the
"rtck" enable/disable command; restore it.

NOTE that having such a command is wrong; there's a standard
way to enable adaptive clocking ("speed 0").

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-03 13:30:06 -08:00
David Brownell
e0338293b8 JTAG/drivers: cleanup jtag_interface structs
Get rid of excess indents.
Ditto superfluous "&" before function pointers.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-03 13:07:18 -08:00
David Brownell
d9508b30e0 JTAG/drivers: amt_jtagaccel fixes + cleanup
Build fixes:  it failed abysmally with PPDEV enabled.  Swapped
a build-time error with a FIXME comment in the affected macros.

Cleanup: remove "&" before function pointers, and excess indent,
for the interface struct declaration.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-03 12:59:51 -08:00
Øyvind Harboe
bd3700e89d zy1000: firmware upgrade fixes for revc
Use ecos firmwareutil upgrade utilities

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-30 12:12:24 +01:00
Øyvind Harboe
12618e4c6d zy1000: less warnings
use inline for static functions in header files to
avoid warnings about fn not being used.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-30 12:11:33 +01:00
David Brownell
ec297e4bf1 Fix Luminary FT2232 layout docs/configs
Most of this patch updates documentation and comments for various
Luminary boards, supporting two bug fixes by helping to make sense
of the current mess:

 - Recent rev C lm3s811 eval boards didn't work.  They must use
   the ICDI layout, which sets up some signals that the older
   boards didn't need.  This is actually safe and appropriate
   for *all* recent boards ... so just make "luminary.cfg" use
   the ICDI layout.

 - "luminary-lm3s811.cfg", was previously unusable!  No VID/PID;
   and the wrong vendor string.  Make it work, but reserve it
   for older boards where the ICDI layout is wrong.

 - Default the LM3748 eval board to "luminary.cfg", like the
   other boards.  If someone uses an external JTAG adapter, all
   boards will use the same workaround (override that default).

The difference between the two FT2232 layouts is that eventually
the EVB layout will fail cleanly when asked to enable SWO trace,
but the ICDI layout will as cleanly be able to enable it.  Folk
using "luminary.cfg" with Rev B boards won't see anything going
wrong until SWO support is (someday) added.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-28 12:59:47 -08:00
Catalin Patulea
84dbf8ab5a Driver for USB-JTAG, Altera USB-Blaster and compatibles
The 10-pin JTAG layout used with these adapters is used by
a variety of platforms including AVR.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-26 15:05:06 -08:00
Antonio Borneo
f9d203d1e6 PARPORT code cleanup:
Align elements in array.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2009-12-26 10:19:57 +01:00
David Brownell
2c3e413d49 JTAG: shrink "scan_chain" output
Tweak the "scan_chain" output by removing column separators.  Also
remove the "current instruction" state ... which changes constantly.

Now its style resembles the "targets" output, and can even fit on
one line in standard terminals and in the PDF docs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-16 14:19:44 -08:00
David Brownell
af79925eb1 jtag: add '-ignore-version' option
Add a "-ignore-version" to "jtag newtap" which makes the IDCODE
comparison logic optionally ignore version differences.

Update the "scan_chain" command to illustrate this by showing
the "*" character instead of the (ignored) version nibble.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-14 15:55:51 -08:00
Spencer Oliver
6b9c14e908 build: fix cygwin build warnings
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2009-12-11 10:26:14 +00:00
Øyvind Harboe
134df4b701 zy1000: revc FPGA now works
remove kludge code.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-10 13:52:07 +01:00
David Brownell
910dd664ce Comment and doxygen fixes
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-09 10:25:52 -08:00
Rafael Campos Las Heras
733ced125a Fix compilation error with gcc 4.4.1
Signed-off-by: Rafael Campos Las Heras <methril@gmail.com>
2009-12-08 22:58:23 +01:00
Øyvind Harboe
96d2b61c04 zy1000: some background info on the zy1000 file.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-08 10:40:47 +01:00
Øyvind Harboe
97de520bc0 minidriver: fix inline capability of minidriver
Low latency low CPU processing power systems(embedded)
will benefit greatly from being able to inline certain
jtag_add_xxx() fn's. The trick is that this has to be
done in such a way as to allow implementing an OpenOCD
API with a shared library(eventually) on a PC hosted
OpenOCD.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-08 10:29:58 +01:00
Øyvind Harboe
eb1bc657ae build: add build/src to include path
This allows including generated include files.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-08 10:16:10 +01:00
David Brownell
dd9d1a3459 misc code review updates
More updates from the code review by Steve Grubb <sgrubb@redhat.com>.
The Jim float-comparision bug just gets a comment not a fix, though.

Cc: Steve Grubb <sgrubb@redhat.com>.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-05 14:40:06 -08:00
Zachary T Welch
79a73a786e separate Jim from jtag/core.c
After previous efforts, only one Jim routine remained in jtag/core.c,
and moving it to jtag/tcl.c painlessly finishes separating these layers.
The headers need separating, but the implementation is clean.
2009-12-04 03:34:32 -08:00
Zachary T Welch
eae56d27c3 allow 'jtag init' to be run in any mode
Help alleviate further potential problems with interactive startup.
2009-12-04 03:29:15 -08:00
Øyvind Harboe
24551b7b92 zy1000: FPGA revC wip
The bug in revC register memory access is pretty much
cornered now.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-04 08:21:25 +01:00
Zachary T Welch
822c06d9e3 remove tertiary include paths
With all #include directives converted, we only need to have the
top-level src/ directory in the search path.
2009-12-03 04:24:50 -08:00
Zachary T Welch
f7bd1e8f3a change #include "../hello.h" to "hello.h"
Before we can -I the top-level src/ directory alone, references to
"hello.h" must be updated.  This is an internal header, so it does
not need angle brackets.
2009-12-03 04:24:50 -08:00
Zachary T Welch
1650ab3a22 change #include "embeddedice.h" to <target/embeddedice.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "embeddedice.h"

the following form should be used.

	#include <target/embeddedice.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:41 -08:00
Zachary T Welch
2641fd9576 change #include "minidriver.h" to <jtag/minidriver.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "minidriver.h"

the following form should be used.

	#include <jtag/minidriver.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:40 -08:00
Zachary T Welch
cb4a475f6c change #include "jtag.h" to <jtag/jtag.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "jtag.h"

the following form should be used.

	#include <jtag/jtag.h>

The exception is from .c files in the same directory.
2009-12-03 04:24:33 -08:00
Zachary T Welch
165fb9309d change #include "interface.h" to <jtag/interface.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "interface.h"

the following form should be used.

	#include <jtag/interface.h>

The exception is from .c files in the same directory.
2009-12-03 04:22:52 -08:00
Zachary T Welch
c9e448222c change #include "commands.h" to <jtag/commands.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "commands.h"

the following form should be used.

	#include <jtag/commands.h>

The exception is from .c files in the same directory.
2009-12-03 04:22:52 -08:00
Zachary T Welch
df0e90ec8c change #include "types.h" to <helper/types.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "types.h"

the following form should be used.

	#include <helper/types.h>

The exception is from .c files in the same directory.
2009-12-03 04:22:52 -08:00
Zachary T Welch
6512e5e36b change #include "time_support.h" to <helper/time_support.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "time_support.h"

the following form should be used.

	#include <helper/time_support.h>

The exception is from .c files in the same directory.
2009-12-03 04:22:52 -08:00
Zachary T Welch
c79cca04be change #include "log.h" to <helper/log.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "log.h"

the following form should be used.

	#include <helper/log.h>

The exception is from .c files in the same directory.
2009-12-03 04:22:52 -08:00
Zachary T Welch
264d24495d change #include "command.h" to <helper/command.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "command.h"

the following form should be used.

	#include <helper/command.h>

The exception is from .c files in the same directory.
2009-12-03 04:22:48 -08:00
Zachary T Welch
d1bc4375e9 change #include "binarybuffer.h" to <helper/binarybuffer.h>
Changes from the flat namespace to heirarchical one.  Instead of writing:

	#include "binarybuffer.h"

the following form should be used.

	#include <helper/binarybuffer.h>

The exception is from .c files in the same directory.
2009-12-03 04:22:17 -08:00
Zachary T Welch
896ac8d4ef allow #include directives to use module name
Includes the src directory in the search path, so header files may be
migrated from:

  #include "foo.h"

to
  #include <module/foo.h>

which is more conducive for installation.
2009-12-03 01:54:15 -08:00
Zachary T Welch
879a04cc6b remove #if HAVE_JTAG_INTERFACE_H from minidriver.h
Adds two "minidriver_imp.h" files, so the right one is allowed to be
"#included" by the Makefile logic.
2009-12-02 23:27:09 -08:00
Zachary T Welch
865efd828a move jtag drivers to src/jtag/drivers
Moves JTAG interface drivers to src/jtag/drivers/,
Adds src/jtag/drivers/Makefile.am.
Builds libocdjtagdrivers.la.

Flattens the rlink driver files into the drivers/ directory, adding
the 'rlink_' prefix or '.rlink' suffix as appropriate.
2009-12-02 23:27:09 -08:00
Zachary T Welch
ac1887c703 jtag: factor init into 'jtag init'
Adds 'jtag init' command handler, which can be called as part of a
fine-grained 'init' process.
2009-12-02 13:26:22 -08:00
Øyvind Harboe
445da543d8 zy1000: keep up with latest changes to command handling
Keep up with Jim Tcl interpreter creation cleanup.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-01 09:53:23 +01:00
Zachary T Welch
7b2906de24 do not extern 'interp' from command.c
Adds 'interp' field to command_context, chasing the few remaining
references to the global variable outside of the command module.
2009-11-30 16:29:34 -08:00
Zachary T Welch
e1ee270265 jtag: avoid using interp global variable
Adds 'interp' field to jtag_tap_event_action structure to avoid
using the global variable of same name.
2009-11-30 16:29:34 -08:00
Øyvind Harboe
2264270fe4 zy1000: keep up with changes to command structure
Add missing COMMAND_REGISTRATION_DONE.

For now the command syntax for zy1000 needs to be compatible
across 0.3/0.4, the world outside OpenOCD interfaces to
zy1000 using the old syntax. Post 0.4 release(0.4.1 even)
I'll switch to subcommand scheme.

Switch to subcommands post 0.3 lifecycle.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-30 08:54:52 +01:00
Zachary T Welch
f8a62fb9c6 split jim_newtap_cmd into pieces
Moves the ID and IR-related option parsing to static helpers, removing
two levels of indent.
2009-11-28 13:00:39 -08:00
Zachary T Welch
7124be8247 improve jtag_tap_configure
Splits bulk of the jtag_tap_configure into jtag_tap_configure_event,
removing three or four levels of indentation in the process.
The resulting code was stylistically improved in other ways, but it
should be functionally identical.
2009-11-28 13:00:39 -08:00
Zachary T Welch
4ff5eda576 improve jtag_tap_handle_event indentation
Use 'continue' to reduce identation levels and superfluous logic.
2009-11-28 13:00:39 -08:00
Zachary T Welch
0377e5b54d begin moving JTAG jim handlers/helpers
Moves the tertiary jim handlers and required static helpers to the top
of tcl.c, defining them in a new registration array that is chained in
both the top-level context and under the jtag command.  The top-level
commands can be removed at some point in the future to reduce clutter.
2009-11-28 13:00:39 -08:00