summaryrefslogtreecommitdiff
path: root/src/jtag
Commit message (Collapse)AuthorAgeFilesLines
* jlink: add detect hw typeJean-Christophe PLAGNIOL-VILLARD2011-03-131-0/+21
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
* jlink: use tap buffer as 2kJean-Christophe PLAGNIOL-VILLARD2011-03-131-3/+3
| | | | | | | | | | | | as said in the datasheet Section 3.3.2 Organization of buffers All buffers are big enough to hold 2 KByte of data. this will double the speed of download Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
* jlink: add capability dumper and commandJean-Christophe PLAGNIOL-VILLARD2011-03-131-1/+101
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
* ft2232: fix log message and change log output to debugMathias K2011-03-031-1/+1
|
* jlink: add jlink_pid to specify the pid to useJean-Christophe PLAGNIOL-VILLARD2011-03-021-2/+25
| | | | | | | | this will allow us to use multiple jlink at the same time as when the USB-Address is specified the PID change from 0x0101 to (0x101 + usb_adress) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* jlink: switch commands to subcommandsJean-Christophe PLAGNIOL-VILLARD2011-03-021-3/+13
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* jlink: harmonise the device name to J-LinkJean-Christophe PLAGNIOL-VILLARD2011-03-021-4/+4
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* jlink: add new PID and VIDJean-Christophe PLAGNIOL-VILLARD2011-03-021-2/+8
| | | | | | | | | The default pid of the segger is 0x0101 But when you change the USB Address it will also pid = ( usb_address > 0x4) ? 0x0101 : (0x101 + usb_address) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* jtag: add wait_srst_deassert commandØyvind Harboe2011-02-251-0/+51
| | | | | | Useful to do something *real quick* after a SRST deassert. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* ft2232: fix possible read buffer overflowMathias K2011-02-241-3/+17
| | | | | | | | This patch fix a possible read buffer overflow in ft2232_execute_queue. Also the correct read queue size for libftdi and libftd2xx was added and and tested. In function ft2232_write a uninitialized value was initialized because we don't know if this value was set in the ftdi api call.
* jlink: set the speed at JLINK_MAX_SPEED when an exceeded speed is requestedJean-Christophe PLAGNIOL-VILLARD2011-02-231-2/+2
| | | | | | | | | | | it will allow to be at the highest speed of the jlink without touching the board or cpu config tested on sam-ice v5 and at91rm9200-ek Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
* ft2232: add functions for ft2232 set data bits high/low byte commandMathias K2011-02-141-280/+93
| | | | reduce duplication. No change in behavior.
* buspirate: Fix command parsing, fix errors to have more sense.Michal Demin2011-02-081-28/+26
| | | | Signed-off-by: Michal Demin <michaldemin@gmail.com>
* add basic TI xds100v2 supportMathias K2011-01-261-0/+94
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* str9xpec: Find flash controller from the chain.Santeri Salko2011-01-142-1/+2
| | | | | | | | | | | Find the flash controller by position since it is before the core, not after it. This fixes the problem that str9xpec enable_turbo (or any other str9xpec command) did not work. (See my post in http://forum.sparkfun.com/viewtopic.php?f=18&t=25542) Signed-off-by: Santeri Salko <santeri.salko@gmail.com>
* transport: fix transport command args gaffesimon qian2011-01-131-3/+3
| | | | | | | the wrong index of argv. argv[0] is the command itself, argv[1] the the transport to select. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* transport: fix LOG_DEBUG gaffesimon qian2011-01-131-2/+4
| | | | | | | | LOG_DEBUG() arguments are only evaluated when DEBUG logging is enabled, do not use arguments that have side effects like foo++. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* nit: more LOG_* \n fixesEric Wetzel2011-01-096-17/+17
| | | | | | | | | Remove extra \n from LOG_DEBUG, LOG_INFO, and LOG_WARNING messages Remove LOG_INFO_N LOG_INFO_N was only used once and had a \n at the end Change LOG_USER_N calls that end with \n to LOG_USER
* nit: do not add \n at end of LOG_ERROREric Wetzel2011-01-055-22/+22
| | | | Fixed in many other places, and submitted in response to Øyvind's invitation.
* error handling: the error number is not part of the user interfaceØyvind Harboe2011-01-032-3/+3
| | | | | | | | Do not propagate error number to user. This is for internal programming purposes only. Error messages to the user is reported as text via LOG_ERROR(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* initial SWD transport (SWD infrastructure #2)David Brownell2010-12-245-1/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(-)
* Fix for compilation failure amt_jtagaccel.cJohn Devereux2010-12-161-0/+3
| | | | | | | | Hi, I think there are errors in amt_jtagaccel.c I attach a small patch that I needed to make it compile.
* Fix for segmentation fault from freed memory access in ↵Paul Richards2010-12-101-13/+9
| | | | jtag_unregister_event_callback()
* build: fix build from previous commitSpencer Oliver2010-12-082-2/+2
| | | | | | | commit 740b9e25b410c164e661d0334a9ea4168406726b broke the drivers for ftdi and parport due to retval already being defined. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* jtag: getting the JTAG speed can failØyvind Harboe2010-12-0811-27/+71
| | | | | | | | | | | 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>
* Some cosmetic fixes to the Lisa/L layout support functions.Piotr Esden-Tempski2010-11-301-5/+1
|
* Added support for the blinking leds on Floss-JTAG v0.3 and newer.Piotr Esden-Tempski2010-11-301-0/+57
|
* build: add common.mkSpencer Oliver2010-11-182-6/+2
| | | | | | | Rather than specifying common makefile variables move them all to a common.mk. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* TCL scripts: replace "puts" with "echo"Antonio Borneo2010-11-091-4/+4
| | | | Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* jim tests: use installedØyvind Harboe2010-10-291-14/+19
| | | | Delete obsolete jim that comes with OpenOCD.
* buspirate: change handling of communication speed setting + create serial ↵Michal Demin2010-10-251-11/+16
| | | | | | port open function Signed-off-by: Michal Demin <michaldemin@gmail.com>
* buspirate: Serial port was not correctly closed.Michal Demin2010-10-251-0/+9
| | | | Signed-off-by: Michal Demin <michaldemin@gmail.com>
* add JLINK protocol doc refDavid Brownell2010-10-101-0/+3
| | | | | | Provide URL for a recent version of JLINK protocol. Signed-Off-By: David Brownell <dbrownell@users.sourceforge.net>
* Update ep93xx and at91rm9200 driversLuca Bruno2010-09-302-26/+12
| | | | | | | | | | 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>
* zy1000: fix non-JTAG master buildØyvind Harboe2010-09-261-1/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: add support for Linux hostØyvind Harboe2010-09-202-6/+45
| | | | | | | | 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>
* zy1000: remove obsolete debug codeØyvind Harboe2010-09-201-7/+0
| | | | | | Obsolete code clutter Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Remove duplicated initializationAlexander Stein2010-09-081-1/+0
| | | | | | | | | | | 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>
* warning: fix silly -O3 warningØyvind Harboe2010-09-071-1/+1
| | | | | | | 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>
* jtag: fix regression with dummy driver and when starting OpenOCD with target ↵Øyvind Harboe2010-09-031-5/+13
| | | | | | | | | | | | | | | | 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>
* bitq: unshadow pause()David Brownell2010-08-271-4/+4
| | | | | | | | 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>
* Fix typo in usb_blaster_vid_pid error messageCatalin Patulea2010-08-141-1/+1
|
* Added support for the Lisa/L jtag LEDs.Piotr Esden-Tempski2010-08-131-1/+56
|
* Added support for Lisa/L builtin JTAG interface.Piotr Esden-Tempski2010-08-131-0/+5
|
* jtag: fix handling of 'tap enable' errorThomas Koeller2010-08-121-2/+2
| | | | | | | | 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>
* zy1000: use correct base clock when calculating speed divisorØyvind Harboe2010-08-021-4/+11
| | | | | | revc uses 60MHz and revb 64MHz, use this in calculations. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: print out khz correctly in response to setting JTAG speedØyvind Harboe2010-08-021-4/+33
| | | | | | Calculate printout based on same core routines. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: measure_clk debug procØyvind Harboe2010-08-021-0/+9
| | | | | | | It can be useful to get an approximate measurement of rtck frequency for debugging purposes. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: add jtag_flush_queue_sleep debug commandØyvind Harboe2010-08-023-0/+45
| | | | | | | | 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>
* "transport select" returns Jim valueDavid Brownell2010-07-241-41/+30
| | | | | | | 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>