summaryrefslogtreecommitdiff
path: root/src/jtag/interface.h
Commit message (Collapse)AuthorAgeFilesLines
* IF/TRANSFER: interface->transfer() function is now fixed and verified to ↵Tomek CEDRO2011-07-281-1/+1
| | | | work correctly. Updated prototype to support LSB/MSB-first shift direction.
* TRANSPORT: Supported transport names lists are now declared by ↵Tomek CEDRO2011-06-251-2/+0
| | | | src/transport.h and defined by src/transport.c. Multiple definitions of 'jtag_only' were removed and code was updated to use 'oocd_transport_jtag_only' (also updated headers if necessary) as defined by src/transport.
* JTAG_INTERFACE: Extended jtag_interface API with additional methods to allow ↵Tomek CEDRO2011-06-161-7/+34
| | | | other transports reusing existing code. In future this will be moved out to generic interface driver. transfer() for generic read/write bitstream from/to char array. bitbang() for generic interface signal read/write. *signal singly-linked-list for dynamic interface signal list representation. *target may be used to represent active target that interface is connected to.
* jtag: clarify jtag->init() and jtag->quit() definitionsØyvind Harboe2011-04-191-1/+8
| | | | | | | | | only set jtag global pointer if jtag->init() succeeds. Less code, more clear what the rules are. Fix nit that error value from init() was not propagated unmodified. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* initial SWD transport (SWD infrastructure #2)David Brownell2010-12-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This piggy backs on JTAG so it's not yet pretty, but that seems unavoidable so far given today's OpenOCD internals. SWD init and data transfer are unfinished and untested, but that should cause no regressions, and will be addressed by the time drivers start using this infrastructure. Checking in whould get the code working better sooner, and turn up any structural/architectural issues while they're easier to fix. The debug adapter drivers will provide simple SWD driver structs with methods that kick in as needed (instead of JTAG). So far just one adapter driver has been updated (not yet ready to use or circulate). The biggest issues are probably - fault handling, where the ARM Debug Interface V5 pipelining needs work in both JTAG and SWD modes and - missing rewrite of block I/O code to work on both of our Cortex-ready transports (Current code is hard-wired to JTAG); relates also to the pipelining issue. - omitted support to activate/deactivate SWO/SWV trace (this is technically trivial, but configuring what to trace is NOT. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> ---- doc/openocd.texi | 17 ++ src/jtag/core.c | 3 src/jtag/interface.h | 4 src/jtag/jtag.h | 2 src/jtag/swd.h | 114 +++++++++++++++++++ src/jtag/tcl.c | 2 src/target/adi_v5_swd.c | 281 ++++++++++++++++++++++++++++++++++++++++++++++-- src/target/arm_adi_v5.c | 8 + src/target/arm_adi_v5.h | 3 9 files changed, 425 insertions(+), 9 deletions(-)
* transport selection tweaksDavid Brownell2010-07-091-0/+5
| | | | | | | | | | | | * Bugfix and simplify legacy jtag-only defaulting * Make "dummy" declare its jtag-only nature * likewise update ft2232 * warn if selection is _required_ (multi-transport adapters), fixes the "only ft2232 works" bug for at least dummy, with other drivers going the "legacy" path (submit patches). Signed-off-by: David Brownell <db@helium.(none)>
* interface: define TMS sequence commandDavid Brownell2010-02-271-0/+18
| | | | | | | | | | | | | | | | | | | | | | | For support of SWD we need to be able to clock out special bit sequences over TMS or SWDIO. Create this as a generic operation, not yet called by anything, which is split as usual into: - upper level abstraction ... here, jtag_add_tms_seq(); - midlayer implementation logic hooking that to the lowlevel code; - lowlevel minidriver operation ... here, interface_add_tms_seq(); - message type for request queue, here JTAG_TMS. This is done slightly differently than other operations: there's a flag saying whether the interface driver supports this request. (In fact a flag *word* so upper layers can learn about other capabilities too ... for example, supporting SWD operations.) That approach (flag) lets this method *eventually* be used to eliminate pathmove() and statemove() support from most adapter drivers, by moving all that logic into the mid-layer and increasing uniformity between the various drivers. (Which will in turn reduce subtle bugginess.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* change #include "jtag.h" to <jtag/jtag.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | 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.
* remove register_callbacks from jtag interfaceZachary T Welch2009-11-241-3/+1
| | | | | | | | Changes the jtag_interface->register_callbacks field to a list of commands to be registered. Changes callback to invocation of register_commands() with that command registration list. Removes all JTAG interface driver register_command callback functions, which the previous commits had converted into identical calls.
* command_context_t -> struct command_contextZachary T Welch2009-11-131-1/+1
| | | | Remove misleading typedef and redundant suffix from struct command_context.
* jtag_interface_t -> struct jtag_interfaceZachary T Welch2009-11-131-3/+2
| | | | Remove useless typedef and redundant suffix from struct jtag_interface.
* SVF: clean up, mostly for TAP state name handlingDavid Brownell2009-10-231-3/+0
| | | | | | | | | | | | | | | | | | | | | - 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>
* Remove whitespace that occurs before ')'.zwelch2009-06-231-1/+1
| | | | | | | - Replace '[ \t]*[)]' with ')'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove whitespace that occurs after '('.zwelch2009-06-231-1/+1
| | | | | | | - Replace '([ \t]*' with '('. git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '=' whitespacezwelch2009-06-231-1/+1
| | | | | | | | | - Replace ')\(=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(=\)(' with '\1 \2 ('. - Replace '\(\w\)\(=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2372 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Update documentationf or jtag_interface structure members.zwelch2009-06-031-15/+55
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2018 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Expose tap_state_by_name TAP helper available in public API.zwelch2009-06-031-6/+0
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2015 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Move the JTAG cable interface API implementationzwelch2009-06-031-0/+2
| | | | | | | | | - Cloned the src/jtag/jtag.c file to src/jtag/interface.c. - For each for of those files, deleted the contents of the other. - Add new source file to automake input. git-svn-id: svn://svn.berlios.de/openocd/trunk@2012 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add missed accessor for checking the current TMS table.zwelch2009-06-031-0/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2011 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Split and simplify handle_tms_sequence_command for further factoring.zwelch2009-06-031-0/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2010 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Make tap_state_by_name available in new JTAG interface API header.zwelch2009-06-031-0/+3
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2009 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add private src/jtag/interface.h for use by JTAG interface drivers:zwelch2009-06-021-0/+236
- Move the jtag_interface structure definition. - Move the Cable API declarations. - Add new header file to automake input. The next patch will move the implementation to interface.c. git-svn-id: svn://svn.berlios.de/openocd/trunk@2008 b42882b7-edfa-0310-969c-e2dbd0fdcd60