| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* added support for targeting particular tap
* improved file reading
* improved command line parsing
* added progress meter
* more readable time measurement output
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Globally rename "jtag_khz" as "adapter_khz", and move it out of the "jtag"
command group ... it needs to be used with non-JTAG transports
Includes a migration aid (in jtag/startup.tcl) so that old user scripts
won't break. That aid should Sunset in about a year. (We may want to
update it to include a nag message too.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
| |
These fn's now clearly just clock out/in bits. No mystical
fields are involved.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jtag_add_dr/ir_scan() now takes the tap as the first
argument, rather than for each of the fields passed
in.
The code never exercised the path where there was
more than one tap being scanned, who knows if it even
worked.
This simplifies the implementation and reduces clutter
in the calling code.
use jtag_add_ir/dr_plain_scan() for more fancy situations.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
isspace() parameter must be an integer, else a 'char' gets
used as an array index (sigh).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More SVF fixes:
* Treat all content between parentheses as part of the same
parameter; don't (wrongly) treat whitespace as a delimiter.
* Use isspace() to catch that whitespace; it's not all single
spaces, newlines etc are also valid.
* When parsing bitstrings, strip leading whitespace too.
So for example, these are equivalent and should (now) be OK:
"TDI( 1234 )"
"TDI( 1 2 3 4 )"
"TDI(00 12 34 )"
"TDI(
00 12
34)"
[dbrownell@users.sourceforge.net: comment updates; trivial cleanup]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See http://forum.sparkfun.com/viewtopic.php?p=90983#90983 for discussion;
basically, the SVF parser wrongly expects "TDI (123)" but the space is
optional and it should accept "TDI(123)" too.
In the same way, "TDI(123)TDO(456)" should work too.
Rather than update the command parsing, this just makes sure the expected
spaces are present.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usage messages should use the same EBNF as the User's Guide;
no angle brackets. Be more complete too ... some params were
missing.
Don't use "&function"; its name is its address.
Unrelated: fix typo in one "target.c" usage message.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
| |
It's less accepting of signed char ... insisting that e.g. tolower()
not receive one as a parameter.
It's probably good to phase out such usage, given the number of bugs
that lurk in the vicinity (assumptions that char is unsigned), so fix
these even though such usage is actually legal.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Use register_commands() for registering {,x}svf commands.
|
|
|
|
|
| |
Replaces direct calls to register_command() with a macro, to allow
its parameters to be changed and callers updated in phases.
|
|
|
|
| |
Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
|
|
|
|
|
| |
This patch converts all instances of 'args' in COMMAND_HANDLER routines
to use CMD_ARGV macro.
|
|
|
|
|
| |
This patch converts all instances of 'argc' in COMMAND_HANDLER routines
to use CMD_ARGC.
|
|
|
|
|
|
|
|
| |
The ARRAY_SIZE macro was defined in several target files, so move it
to types.h.
This patch also removes two other identical macros: DIM (from jtag.h)
and asizeof (from arm11.h).
|
|
|
|
| |
Remove misleading typedef and redundant suffix from struct command_context.
|
|
|
|
| |
Removes all misleading typedef keywords from structures in svf.c.
|
|
|
|
| |
Remove useless structure typedef.
|
|
|
|
|
| |
Search and destroy the jtag_tap_t typedef. This also cleans up a
layering violation, removing the declaration from types.h.
|
|
|
|
|
|
| |
The number of command arguments will always be 0 or more, so use
the right type in handlers. This has a cascading effect up through
the layers, but the new COMMAND_HANDLER macros prevented total chaos.
|
| |
|
|
|
|
| |
Remove forward declarations by reordering command registration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code works like follow (N = bit_len):
N -1 %4 2<< -1 ~ (binary)
--------------------------------------------------
1 0 0 2 1 1111 1110
2 1 1 4 3 1111 1100
3 2 2 8 7 1111 1000
4 3 3 16 15 1111 0000
5 4 0 2 1 1111 1110
6 5 1 4 3 1111 1100
7 6 2 8 7 1111 1000
8 7 3 16 15 1111 0000
... ... ... ... ... ...
Addresses a bug reported by FangfangLi <ffli@syntest.com.cn>.
[dbrownell@users.sourceforge.net: fix spelling bug too]
Signed-off-by: Michael Roth <mroth@nessie.de>
Cc: FangfangLi <ffli@syntest.com.cn>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
| |
Ignore leading '0' characters on hex strings. For example a bit
pattern consisting of 6 bits could be written as 3f, 03f or 003f and
so on.
Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use the name mappings all the other code uses:
+ name-to-state ... needed to add one special case
+ state-to-name
- Improve various diagnostics:
+ don't complain about a "valid" state when the issue
is actually that it must be "stable"
+ say which command was affected
- Misc:
+ make more private data and code be static
+ use public DIM() not private dimof()
+ shorten the affected lines
Re the mappings, this means we're more generous in inputs we
accept, since case won't matter. Also our output diagnostics
will be a smidgeon more informative, saying "RUN/IDLE" not
just "IDLE" (emphasizing that there can be side effects).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
XSVF improvements:
- Layer parts of XSVF directly over SVF, calling svf_add_statemove()
instead of expecting jtag_add_statemove() to conform to the SVF/XSVF
requirements (which it doesn't).
This should improve XSTATE handling a lot; it removes most users of
jtag_add_statemove(), and the comments about how it should really do
what svf_add_statemove() does.
- Update XSTATE logic to be a closer match to the XSVF spec. The main
open issue here is (still) that this implementation doesn't know how
to build and submit paths from single-state transitions ... but now
it will report that error case.
- Update the User's Guide to mention the two utility scripts for
working with XSVF, and to mention the five extension opcodes.
Handling of state transition paths is, overall, still a mess. I think
they should all be specified as paths not unlike SVF uses, and compiled
to the bitstrings later ... so that we can actually make sense of the
paths. (And see the extra clocks, detours through RUN, etc.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't add extra TCK in current state; exit from RESET had four extras.
Only IDLE --> IDLE needs such an extra clock. (At least one TCK must
be issued.)
Allow entry to RESET; SVF allows it, so must we (despite those entries
being commented out of the statemove table).
When entering RESET, always use TLR ... we might end up with extra clocks
in reset that way, which is harmless, but we'll never end up in any other
state than RESET, which is useful paranoia.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
| |
SVF: comment the predefined/default paths; make them static const
SVF, XSVF: whitespace fixes, mostly so copyrights display sanely
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
| |
compile under Windows+Cygwin - fails with error about possibly uninitialized use of variable 'ch'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2612 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/openocd/trunk@2606 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
|
|
| |
between hex digits in
SVF file, making OpenOCD compatible with files generated by
Altera Quatrus II 9.0.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2600 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
| |
- Replace '\s*$' with ''.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2380 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
| |
- Replace '[ \t]*[)]' with ')'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
| |
- Replace '([ \t]*' with '('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/openocd/trunk@2359 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
|
| |
- Replace '\([^_]\)u32' with '\1uint32_t'.
- Replace '^u32' with 'uint32_t'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2281 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
|
| |
- Replace '\([^_]\)u8' with '\1uint8_t'.
- Replace '^u8' with 'uint8_t'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2276 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
| |
lower jtag.c layers
git-svn-id: svn://svn.berlios.de/openocd/trunk@1978 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
|
|
| |
This patch fixes a segfault when TDO was not received in XXR command:
- allocate space for the value and mask anyway
- clear the mask to zero to effectively skip the output comparison step
git-svn-id: svn://svn.berlios.de/openocd/trunk@1915 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
|
| |
Add svf_get_mask_u32 to generate a mask according to bitlen.
Fix this bug in other functions except for svf_check_tdo.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1914 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
| |
- add tap_state_svf_name since tap_state_name doesn't use SVF standard names
git-svn-id: svn://svn.berlios.de/openocd/trunk@1912 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
|
|
| |
Changes svf_check_tdo function (checks tdo output matches desired values):
- call buf_cmp_mask function to do comparison instead of using a loop.
- fixes a bug when data length is equal to sizeof(int).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1900 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
|
|
|
|
|
|
| |
the key command_*() helper functions, fixng the bugs that turned up.
Several of these bugs were from misuse of PRIi64; that's for 64-bit
integers, NOT for "long long" or "u64" (which work best with %lld).
git-svn-id: svn://svn.berlios.de/openocd/trunk@1873 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/openocd/trunk@1822 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/openocd/trunk@1710 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/openocd/trunk@1700 b42882b7-edfa-0310-969c-e2dbd0fdcd60
|