summaryrefslogtreecommitdiff
path: root/src/jtag
Commit message (Collapse)AuthorAgeFilesLines
...
* statemove_command_t -> struct statemove_commandZachary T Welch2009-11-132-5/+4
| | | | Remove misleading typedef from struct statemove_command.
* cmd_queue_page_t -> struct cmd_queue_pageZachary T Welch2009-11-131-9/+8
| | | | Remove misleading typedef from struct cmd_queue_page.
* scan_command_t -> struct scan_commandZachary T Welch2009-11-138-43/+42
| | | | Remove misleading typedef on struct scan_command.
* more vsllink typedef cleanupZachary T Welch2009-11-131-6/+5
| | | | Remove useless typedef for struct insert_insignification_operation.
* vsllink_jtag_t -> struct vsllinkZachary T Welch2009-11-131-39/+38
| | | | Remove misleading typedef and redundant suffix.
* presto_t -> struct prestoZachary T Welch2009-11-131-6/+4
| | | | Remove useless typedef.
* ft2232_device_t -> struct ft2232_deviceZachary T Welch2009-11-131-6/+5
| | | | Remove misleading typedef from ft2232_device; it was barely used.
* jlink_jtag_t -> struct jlinkZachary T Welch2009-11-131-41/+40
| | | | Remove misleading typedef and redundant suffix.
* cable_t -> struct cableZachary T Welch2009-11-131-6/+5
| | | | Remove useless typedef and redundant suffix from parport struct cable.
* pending_scan_result_t -> struct pending_scan_resultZachary T Welch2009-11-133-20/+17
| | | | | Remove misleading typedef from struct struct pending_scan_result. Future patches need to remove these duplicated types and code.
* armjtagew_jtag_t -> struct armjtagewZachary T Welch2009-11-131-33/+32
| | | | Remove useless typedef and redundant suffix from struct armjtatew_jtag.
* use struct jtag_tap_event_actionZachary T Welch2009-11-132-7/+5
| | | | Remove useless typedef and redundant suffix from jtag_tap_event_action.
* jtag_event_callback_t -> struct jtag_event_callbackZachary T Welch2009-11-131-13/+19
| | | | | Remove useless typedef and redundant suffix from jtag_event_callback. Add documentation for the structure.
* jtag_interface_t -> struct jtag_interfaceZachary T Welch2009-11-1320-39/+38
| | | | Remove useless typedef and redundant suffix from struct jtag_interface.
* bitbang_interface_t -> struct bitbang_interfaceZachary T Welch2009-11-136-10/+9
| | | | Removes another useless typedef and suffix.
* bitq_interface_t -> struct biq_interfaceZachary T Welch2009-11-133-8/+6
| | | | Remove useless typedef and redundant suffix.
* encapsulate bitq_state structureZachary T Welch2009-11-132-10/+8
| | | | | | | Move the bitq_state structure from the header to source file, as it is used internally. Also removes its silly typedef.
* scan_field_t -> struct scan_fieldZachary T Welch2009-11-139-67/+66
| | | | Remove useless structure typedef.
* jtag_tap_t -> struct jtag_tapZachary T Welch2009-11-139-65/+60
| | | | | Search and destroy the jtag_tap_t typedef. This also cleans up a layering violation, removing the declaration from types.h.
* command_handler_t: make argc unsignedZachary T Welch2009-11-131-3/+2
| | | | | | 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.
* add CMD_NAME macro for command handlersZachary T Welch2009-11-131-1/+1
| | | | | By introducing the CMD_NAME macro, this parameter may be integrated as args[-1] in command.[ch], without touching any other call sites.
* use CALL_COMMAND_HANDLER instead of direct callsZachary T Welch2009-11-131-1/+1
| | | | | | By using CALL_COMMAND_HANDLER, parameters can be reordered, added, or even removed in inherited signatures, without requiring revisiting all of the various call sites.
* use COMMAND_HELPER for command helper functionsZachary T Welch2009-11-131-3/+1
| | | | | Define the numerous helpers that inherit command handler parameters using the COMMAND_HELPER macro.
* use COMMAND_HANDLER macro to define all commandsZachary T Welch2009-11-137-43/+34
|
* parport: add support for the jtag_khz command.Jonas Horberg2009-11-121-8/+64
| | | | | | | | | | | Add the khz and speed_div functions to the parport interface driver. Add the parport_toggling_time function that tells the parport driver how long (in nanoseconds) it takes for the hardware to toggle TCK. [dbrownell@users.sourceforge.net: tweak doc for clarity, mention multimeter, and whitespace fixes] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* fix 'jtag interface' behaviorZachary T Welch2009-11-111-1/+2
| | | | | Without this patch, running "openocd -c 'jtag interface'" segfaults. Now, it returns the string "undefined" when the interface is unset.
* jtag: remove useless declarationsZachary T Welch2009-11-096-295/+248
| | | | | | Contrary to my previous assessment, some opportunities to remove forward declarations were overlooked. Remove them by moving the definitions of the command registration and interface structure to the end of files.
* finish removing deprecated/obsolete commandsDavid Brownell2009-11-093-107/+4
| | | | | | | | | | | | | | | | | | | | It's been about a year since these were deprecated and, in most cases, removed. There's no point in carrying that documentation, or backwards compatibility for "jtag_device" and "jtag_speed", around forever. (Or a few remnants of obsolete code...) Removed a few obsolete uses of "jtag_speed": - The Calao stuff hasn't worked since July 2008. (Those Atmel targets need to work with a 32KHz core clock after reset until board-specific init-reset code sets up the PLL and enables a faster JTAg clock.) - Parport speed controls don't actually work (tops out at about 1 MHz on typical HW). - In general, speed controls need to live in board.cfg files (or sometimes target.cfg files), not interface.cfg ... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* src/jtag: remove 'extern' and wrap headers.Zachary T Welch2009-11-094-63/+72
| | | | | | | Removes the 'extern' keyword from function declarations. Wraps long prototypes to fit into 80 columns. Fixes documentation for jtag_tap_s::{,has}idcode fields.
* Fix vsllink bulk out endpoint parsing.Zachary T Welch2009-11-071-1/+1
|
* Improve jtag command argument parsing.Zachary T Welch2009-11-056-51/+36
|
* ft2232: cleanupDavid Brownell2009-11-041-110/+97
| | | | | | | | | Previous patch somehow made GCC lose some of its cookies; work around, zero-init that struct. Clean up code from the previous patch. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JTAG: support KT-LINK adapterKrzysztof Kajstura2009-11-041-0/+131
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* FT2232: increase read retry countsDimitar Dimitrov2009-11-011-8/+26
| | | | | | | | This change is necessary to debug AT91SAM9260 on my PC with a FT2232H dongle. Signed-off-by: Dimitar Dimitrov <dinuxbg@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* Signalyzer: H2 and H4 supportOleg Seiljus2009-10-271-0/+809
| | | | | | | | | | This patch includes partial support for these new JTAG adapters. More complete support will require updates to the libftdi code, for EEPROM access. [dbrownell@users.sourceforge.net: fix whitespace, linelen, etc ] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ft2232: less noise with _DEBUG_JTAG_IO_David Brownell2009-10-261-1/+0
| | | | Don't log "Yes, I'm *still* in TAP_IDLE" every seven runtest clocks.
* JTAG: "jtag newtap ..." cleanupDavid Brownell2009-10-261-7/+2
| | | | | | Get rid of needless variable, improve and shrink diagnostic. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JTAG: simple autoprobingDavid Brownell2009-10-261-12/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds basic autoprobing support for the JTAG scan chains which cooperate. To use, you can invoke OpenOCD with just: - interface spec: "-f interface/...cfg" - possibly with "-c 'reset_config ...'" for SRST/TRST - possibly with "-c 'jtag_khz ...'" for the JTAG clock Then set up config files matching the reported TAPs. It doesn't declare targets ... just TAPs. So facilities above the JTAG and SVF/XSVF levels won't be available without a real config; this is almost purely a way to generate diagnostics. Autoprobe was successful with most boards I tested, except ones incorporating C55x DSPs (which don't cooperate with this scheme for IR length autodetection). Here's what one multi-TAP chip reported, with the "Warn:" prefixes removed: clock speed 500 kHz There are no enabled taps. AUTO PROBING MIGHT NOT WORK!! AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x2b900f0f ..." AUTO auto1.tap - use "jtag newtap auto1 tap -expected-id 0x07926001 ..." AUTO auto2.tap - use "jtag newtap auto2 tap -expected-id 0x0b73b02f ..." AUTO auto0.tap - use "... -irlen 4" AUTO auto1.tap - use "... -irlen 4" AUTO auto2.tap - use "... -irlen 6" no gdb ports allocated as no target has been specified The patch tweaks IR setup a bit, so we can represent TAPs with undeclared IR length. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JTAG: jtag_tap_init() bugfixesDavid Brownell2009-10-251-9/+18
| | | | | | | Stop allocating three bytes per IR bit, and cope somewhat better with IR lengths over 32 bits. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* jtag: clean up TAP state name handlingDavid Brownell2009-10-233-68/+63
| | | | | | | | | | | | Some cosmetic cleanup, and switch to a single table mapping between state names and symbols (vs two routines which only share that state with difficulty). Get rid of TAP_NUM_STATES, and some related knowledge about how TAP numbers are assigned. Later on, this will help us get rid of more such hardwired knowlege. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* SVF: clean up, mostly for TAP state name handlingDavid Brownell2009-10-233-4/+8
| | | | | | | | | | | | | | | | | | | | | - 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: use svf_add_statemove()David Brownell2009-10-201-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Removed unused interface_jtag_set_end_state and wrote down some notes on ↵Øyvind Harboe2009-10-203-13/+0
| | | | TCP/IP client/server scheme.
* More svn to git version string fixes.Øyvind Harboe2009-10-201-1/+5
|
* jtag_add_statemove() always uses TLR to get to RESETDavid Brownell2009-10-191-5/+7
| | | | | | | As decided a while back, this isn't a transition we want to chance. Whenever someone wants to got to RESET, force it. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* Switch from svn to git version string handling.oyvind2009-10-191-7/+4
|
* portability updatesDavid Brownell2009-10-141-5/+6
| | | | | | | | | Based on some patches from <redirect.slash.nil@gmail.com> for preliminary Win64 compilation. More such updates are needed, but they need work. Compile tested on 64 and 32 bit Linuxes, and Cygwin. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* cosmetic cleanup in TMS tablesDavid Brownell2009-10-131-11/+17
| | | | | | | Cleanup comments and layout/whitespace in the TMS tables. Table contents stayed the same (ignoring whitespace). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* printf format warning fixesDavid Brownell2009-10-101-1/+1
| | | | | | Observed on a Cygwin build. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* add documentation about reset customizationDavid Brownell2009-10-091-10/+19
| | | | | | | | | | We added two overridable procedures; document them, and the two jtag arp_* operations they necessarily expose. Update the comment about the jtag_init_reset() routine; it's been obsolete for as long as it's had SRST support. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>