aboutsummaryrefslogtreecommitdiff
path: root/src/jtag
AgeCommit message (Collapse)Author
2010-12-24initial SWD transport (SWD infrastructure #2)David Brownell
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(-)
2010-12-16Fix for compilation failure amt_jtagaccel.cJohn Devereux
Hi, I think there are errors in amt_jtagaccel.c I attach a small patch that I needed to make it compile.
2010-12-10Fix for segmentation fault from freed memory access in ↵Paul Richards
jtag_unregister_event_callback()
2010-12-08build: fix build from previous commitSpencer Oliver
commit 740b9e25b410c164e661d0334a9ea4168406726b broke the drivers for ftdi and parport due to retval already being defined. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-12-08jtag: getting the JTAG speed can failØyvind Harboe
If the JTAG speed has not been set, then it has no defined value, add code to propagate the error. No change to actual behavior as no new failure paths have been introduced. This is a no-op patch to make subsequent patches smaller. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-30Some cosmetic fixes to the Lisa/L layout support functions.Piotr Esden-Tempski
2010-11-30Added support for the blinking leds on Floss-JTAG v0.3 and newer.Piotr Esden-Tempski
2010-11-18build: add common.mkSpencer Oliver
Rather than specifying common makefile variables move them all to a common.mk. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-11-09TCL scripts: replace "puts" with "echo"Antonio Borneo
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-10-29jim tests: use installedØyvind Harboe
Delete obsolete jim that comes with OpenOCD.
2010-10-25buspirate: change handling of communication speed setting + create serial ↵Michal Demin
port open function Signed-off-by: Michal Demin <michaldemin@gmail.com>
2010-10-25buspirate: Serial port was not correctly closed.Michal Demin
Signed-off-by: Michal Demin <michaldemin@gmail.com>
2010-10-10add JLINK protocol doc refDavid Brownell
Provide URL for a recent version of JLINK protocol. Signed-Off-By: David Brownell <dbrownell@users.sourceforge.net>
2010-09-30Update ep93xx and at91rm9200 driversLuca Bruno
ep93xx and at91rm9200 are conditionally built only on arm and were not updated to reflect changes in command registration handler. This patch makes them properly compile again, fixing a build failure experienced on Debian armel. Signed-off-by: Luca Bruno <lucab@debian.org> Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
2010-09-26zy1000: fix non-JTAG master buildØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-20zy1000: add support for Linux hostØyvind Harboe
used /dev/mem and mmem() to memory map JTAG registers into user space and used new configure options to exclude eCos specific code. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-20zy1000: remove obsolete debug codeØyvind Harboe
Obsolete code clutter Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-08Remove duplicated initializationAlexander Stein
I a mail conversation with Øyvind we stated that speed may not be set at all on case CLOCK_MODE_KHZ and CLOCK_MODE_RCLK. Also there isn't proper error propagation adapter_khz_to_speed or jtag_rclk_to_speed. So jtag_get_speed may need some rewrite for error propagation. CC: Øyvind Harboe <oyvind.harboe@zylin.com> Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-07warning: fix silly -O3 warningØyvind Harboe
Some versions of GCC don't pick up that local variables are set in all code paths. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-03jtag: fix regression with dummy driver and when starting OpenOCD with target ↵Øyvind Harboe
powered down Do not fail startup if communication with target is not possible. OpenOCD supports launching without a target connected or the target powered down. The user will typically power up the target and issue a "reset init" + load his application after OpenOCD is started then. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-27bitq: unshadow pause()David Brownell
bitq.c: In function ‘bitq_scan_field’: bitq.c:224: error: declaration of ‘pause’ shadows a global declaration /usr/include/unistd.h:429: error: shadowed declaration is here Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-08-14Fix typo in usb_blaster_vid_pid error messageCatalin Patulea
2010-08-13Added support for the Lisa/L jtag LEDs.Piotr Esden-Tempski
2010-08-13Added support for Lisa/L builtin JTAG interface.Piotr Esden-Tempski
2010-08-12jtag: fix handling of 'tap enable' errorThomas Koeller
if a tap could not be _enabled_, the error message was 'failed to disable tap'. Fixed that. Also, display the failing tap's name. Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
2010-08-02zy1000: use correct base clock when calculating speed divisorØyvind Harboe
revc uses 60MHz and revb 64MHz, use this in calculations. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02zy1000: print out khz correctly in response to setting JTAG speedØyvind Harboe
Calculate printout based on same core routines. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02jtag: measure_clk debug procØyvind Harboe
It can be useful to get an approximate measurement of rtck frequency for debugging purposes. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02jtag: add jtag_flush_queue_sleep debug commandØyvind Harboe
it can be useful to throttle performance: test differences in behavior, test performance effect of long roundtrips. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-24"transport select" returns Jim valueDavid Brownell
Make it scriptable, so code can be conditionalized based on what transport is in use for the session. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-23Buspirate: fix shadowMichal Demin
2010-07-19more careful luminary initDavid Brownell
Set up more of the Luminary-specific signals, and stop cloning a few of the JTAG defaults. More comments too. Still leaves the "dap info 0" bugs unresolved (presumably coupled to this particular adapter family) where TPIU, ITM, DWT, and other debug modules wrongly display as extra NVICs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-18comments for Luminary ICDI layoutDavid Brownell
Provide $defines for more of the signals involved in the Luminary ICDI hardware, and comment some of what's going on. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-07-18debug-feature: jtagtcpip, improve jtag performanceØyvind Harboe
postpone callbacks until jtag execute queue time. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16fix warningsØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16debug-feature: jtagtcpip, reduce performance impact of ping timesØyvind Harboe
queue read back of data Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16debug feature: jtagtcpip, improve performanceØyvind Harboe
waiting for ZY1000 fifo to idle is now queued as an asynchronous command. This radically improves performance when waitIdle() is interspersed with writes as no readback is required over TCP/IP. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16debug feature: jtagtcpip, improved performanceØyvind Harboe
only check error flag when rclk is actually enabled. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-12jtag: fix shadow issues in adapter_initSpencer Oliver
Use global jtag_only rather than local static. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-12adapter.c: missing space in handle_interface_commandSpencer Oliver
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-09transport selection tweaksDavid Brownell
* 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)>
2010-07-09transport: fix bug/typo in transport_register cmdSpencer Oliver
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-07transport: fix segfault in transport selectØyvind Harboe
String compare against addresses in range 0 or so due to not checking if there was an active session first. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-07transport: fix bug/typo in interface_transports commandØyvind Harboe
Classic manifestation of weakness of dangling { formatting :-) Hard to spot these sort of mistakes visually. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-02initial "transport" frameworkDavid Brownell
This adds the guts of a transport framework with initialization, which should work with current JTAG-only configurations (tested with FT2232). Each debug adapter can declare the transports it supports, and exactly one transport is initialized. (with its commands) in any given OpenOCD session. * Define a new "struct transport with init hooks and a few "transport" subcommands to support it: "list" ... list the transports configured (just "jtag" for now) "select" ... makes the debug session use that transport "init" ... initializes the selected transport (internal) * "interface_transports" ... declares transports the current interface can support. (Some will do this from C code instead, when there are no hardware versioning (or other) issues to prevent it. Plus some FT2232 tweaks, including a few to streamline upcoming support for an SWD transport (initially for Luminary adapters). Eventually src/jtag should probably become src/transport, moving jtag-specific stuff to transport/jtag. Signed-off-by: David Brownell <db@helium.(none)>
2010-07-02ft2232: revert ft2232_read_scan changesSpencer Oliver
Revert change made in commit dd88b461da1cb8642200dd5c96fb1ff384ca9f7b. Caused segfaults when using ftdi driver under win32. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-01ft2232: bugfix from previous commitSpencer Oliver
fix build error with commit dd88b461da1cb8642200dd5c96fb1ff384ca9f7b Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-07-01ft2232: simplify ft2232_read_scanMarc Pignat
2010-07-01ft2232: cleanup ft2232_writeMarc Pignat
* Include the size check into ft2232_write, so calling it is simpler. * Use sizeof(buffer) when possible
2010-06-21jtag: retire jtag_get_error()Øyvind Harboe
This fn is an implementation detail of jtag_execute_queue() that is not to be exposed externally. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>