summaryrefslogtreecommitdiff
path: root/src/jtag
Commit message (Collapse)AuthorAgeFilesLines
* INTERFACE/SIGNAL: Added "find" option to tcl command interface_signal. Fixed ↵Tomek CEDRO2011-06-211-3/+26
| | | | "del" command. Added syntax check. Minor backend cosmetics.
* FT2232_DRIVER: Added bitbang() implementation backend to drive signals on ↵Tomek CEDRO2011-06-161-3/+104
| | | | FT2*32 chip.
* ADAPTER: Implemented TCL support for interface signal management ↵Tomek CEDRO2011-06-161-0/+71
| | | | (interface_signal command that supports add/del/list parameters).
* ADAPTER: Fixed transport selection mechanism to support transports other ↵Tomek CEDRO2011-06-161-8/+3
| | | | than jtag (if defined).
* 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.
* transport: move files over to transport folderØyvind Harboe2011-06-136-455/+3
| | | | | | as we introduce swd and jtag as two transports, we want to start up with a new transport folder to organize the code a bit.
* cleanup trailing whitespacesRodrigo L. Rosa2011-06-121-1/+1
|
* Added minimodule (ftdi) interfaceRodrigo L. Rosa2011-06-121-0/+55
|
* Silence -O3 warningØyvind Harboe2011-06-071-1/+1
|
* Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - leftover ↵Freddie Chopin2011-06-071-6/+0
| | | | changes
* adapter speed: require init script setting and centralize activation from ↵Jonas Hörberg2011-05-0110-53/+11
| | | | | | drivers to core.c Signed-off-by: Jonas Hörberg <jhorberg@sauer-danfoss.com>
* buspirate: fix building on some OSesDamjan Marion2011-04-261-0/+5
|
* jtag: clarify jtag->init() and jtag->quit() definitionsØyvind Harboe2011-04-192-7/+15
| | | | | | | | | 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>
* cortex_a : multiple target on the same dapMichel JAOUEN2011-04-131-0/+2
|
* jlink: jlink_debug_buffer use inline function when _DEBUG_USB_COMMS_ not defineJean-Christophe PLAGNIOL-VILLARD2011-04-091-10/+4
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
* Buffering for up to 64 bytes in USB Blaster.Ali Lown2011-04-081-12/+38
| | | | | Uses a global buffer. Add self to acknowledgements.
* Add support for LED to USB Blaster code.Ali Lown2011-04-081-0/+9
|
* types: write memory now uses constØyvind Harboe2011-04-012-4/+4
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix bug in ir scan handlingØyvind Harboe2011-03-211-0/+5
| | | | | | | set cur_instr to BYPASS as optimisation code will rely on checking the cached value. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: removed JTAG master TCP/IP serverØyvind Harboe2011-03-211-125/+2
| | | | | | | Move ZY1000 OpenOCD driver more in the direction of being a client to simplify code. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: add code to check that SRST assertsØyvind Harboe2011-03-181-34/+42
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Fix a bunch of typos.Uwe Hermann2011-03-172-2/+2
| | | | | | | | Fix a bunch of typos. Most are in code comments, so nothing should break. UNKOWN_COMMAND and CMD_UNKOWN are not used elsewhere, so correcting the spelling should also not break anything.
* zy1000: switch to pthreadØyvind Harboe2011-03-151-11/+13
| | | | | | pthreads work under Linux and eCos. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix JTAG over TCP/IP performance problemØyvind Harboe2011-03-151-8/+11
| | | | | | | only flush write queue just before waiting for more data, rather than when fetching more data from the buffer. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix incorrect usage of jtag_sleep()Øyvind Harboe2011-03-151-1/+2
| | | | | | | | Found by inspection: the correct thing in the context is to use usleep() rather than jtag_sleep(). Relates to JTAG over TCP/IP only. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: clean up jtag_sleep, handle short sleeps correctly via usleepØyvind Harboe2011-03-151-1/+8
| | | | | | | | | | | short sleeps are handled via usleep, longer sleeps we round up to nearest ms. There was a bug in jtag_sleep() in that it would round *down* to nearest ms, thus making all <1ms sleeps 0. Found by inspection rather than symptom. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: reduce memory usage for fw upgrade fnØyvind Harboe2011-03-151-16/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jlink: add Emulator configuration supportJean-Christophe PLAGNIOL-VILLARD2011-03-131-0/+397
| | | | | | 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 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.