summaryrefslogtreecommitdiff
path: root/src/jtag
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Buspirate: fix shadowMichal Demin2010-07-231-14/+14
|
* more careful luminary initDavid Brownell2010-07-191-7/+12
| | | | | | | | | | | 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>
* comments for Luminary ICDI layoutDavid Brownell2010-07-181-3/+27
| | | | | | | 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>
* debug-feature: jtagtcpip, improve jtag performanceØyvind Harboe2010-07-182-4/+76
| | | | | | postpone callbacks until jtag execute queue time. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* fix warningsØyvind Harboe2010-07-161-2/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* debug-feature: jtagtcpip, reduce performance impact of ping timesØyvind Harboe2010-07-162-46/+103
| | | | | | queue read back of data Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* debug feature: jtagtcpip, improve performanceØyvind Harboe2010-07-162-0/+26
| | | | | | | | | 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>
* debug feature: jtagtcpip, improved performanceØyvind Harboe2010-07-161-9/+22
| | | | | | only check error flag when rclk is actually enabled. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: fix shadow issues in adapter_initSpencer Oliver2010-07-121-1/+0
| | | | | | Use global jtag_only rather than local static. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* adapter.c: missing space in handle_interface_commandSpencer Oliver2010-07-121-1/+1
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* transport selection tweaksDavid Brownell2010-07-095-15/+39
| | | | | | | | | | | | * 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)>
* transport: fix bug/typo in transport_register cmdSpencer Oliver2010-07-093-5/+3
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* transport: fix segfault in transport selectØyvind Harboe2010-07-071-7/+6
| | | | | | | 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>
* transport: fix bug/typo in interface_transports commandØyvind Harboe2010-07-071-1/+2
| | | | | | | Classic manifestation of weakness of dangling { formatting :-) Hard to spot these sort of mistakes visually. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* initial "transport" frameworkDavid Brownell2010-07-027-11/+571
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)>
* ft2232: revert ft2232_read_scan changesSpencer Oliver2010-07-021-10/+9
| | | | | | | Revert change made in commit dd88b461da1cb8642200dd5c96fb1ff384ca9f7b. Caused segfaults when using ftdi driver under win32. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* ft2232: bugfix from previous commitSpencer Oliver2010-07-011-1/+1
| | | | | | fix build error with commit dd88b461da1cb8642200dd5c96fb1ff384ca9f7b Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* ft2232: simplify ft2232_read_scanMarc Pignat2010-07-011-9/+10
|
* ft2232: cleanup ft2232_writeMarc Pignat2010-07-011-42/+43
| | | | | * Include the size check into ft2232_write, so calling it is simpler. * Use sizeof(buffer) when possible
* jtag: retire jtag_get_error()Øyvind Harboe2010-06-212-9/+4
| | | | | | | 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>
* arm-jtag-ew: -Wshadow fixAndreas Fritiofson2010-06-191-6/+6
| | | | | | | declaration of ‘index’ shadows a global declaration in /usr/include/string.h Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
* mingw32: -Wshadow fixes in arm-jtag-ew.cFreddie Chopin2010-06-171-4/+4
| | | | | | (error: declaration of ‘stat’ shadows a global declaration; /usr/local/lib/gcc/i686-w64-mingw32/4.4.2/../../../../i686-w64-mingw32/include/sys/stat.h:279: error: shadowed declaration is here) Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
* mingw32: -Wshadow fixes in rlink.cFreddie Chopin2010-06-171-7/+7
| | | | | | (error: declaration of ‘byte’ shadows a global declaration; /usr/local/lib/gcc/i686-w64-mingw32/4.4.2/../../../../i686-w64-mingw32/include/rpcndr.h:50: error: shadowed declaration is here) Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
* rlink: -Wshadows fixesFreddie Chopin2010-06-171-15/+15
| | | | | | (error: declaration of ‘pHDev’ shadows a global declaration; ../../../../src/jtag/drivers/rlink.c:102: error: shadowed declaration is here) Signed-off-by: Freddie Chopin <freddie_chopin@op.pl>
* jlink: fix -Wshadow warningAntonio Borneo2010-06-171-7/+7
| | | | | Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* vsllink: fix -Wshadow warningAntonio Borneo2010-06-171-5/+5
| | | | Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* zy1000: fix arm11 optimisationØyvind Harboe2010-06-171-79/+78
| | | | | | | | | | copy & paste error + added FIFO throttling to work around lockup bug in FPGA. The arm11 optimisation was introduced post v0.4.0, so this is not a regression compared to previous release. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: -Wshadow warning fixØyvind Harboe2010-06-151-2/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: added mising headerThomas Koeller2010-06-101-0/+1
| | | | | | | Distributions created by 'make dist' were incomplete due to a missing header file. Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
* zy1000: fix optimisation gaffeØyvind Harboe2010-06-081-7/+30
| | | | | | DCC optimisation was broken on targets w/multiple TAP's. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: added watchdog serverØyvind Harboe2010-06-081-1/+92
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: rename JTAG_MOVESTATE to JTAG_TLR_RESETØyvind Harboe2010-06-0713-14/+21
| | | | | | | | | JTAG_MOVESTATE is misleading, this cmd is only used for reset. JTAG_PATHMOVE should be used otherwise. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix false positive warning about unitialized local variableØyvind Harboe2010-05-181-1/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix tcl command to read power dropout statusØyvind Harboe2010-05-051-3/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix keep_alive() bugØyvind Harboe2010-05-051-0/+2
| | | | | | | introduced in latest commit. Should have held off merging that commit. Sigh.... Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* command context: fix errors when running certain commands on startupØyvind Harboe2010-05-051-2/+2
| | | | | | | | | | | Various commands, e.g. "arm mcr xxxx" would fail if invoked upon startup since it there was no command context defined for the jim interpreter in that case. A Jim interpreter is now associated with a command context(telnet, gdb server's) or the default global command context. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: wait for srst to deassertØyvind Harboe2010-05-041-13/+27
| | | | | | | | make wait for srst deassert more long latency friendly (JTAG over TCP/IP), print actual time if it was more than 1ms. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* adapter: allow adjusting srst assert withmichal smulski2010-04-241-0/+24
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* JTAG/COMMANDS: review scope of functionsAntonio Borneo2010-04-102-2/+1
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* buildfixDavid Brownell2010-04-031-1/+2
| | | | | | | | | | Without this, a system using gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4) aborts builds after reporting: tcl.c: In function ‘handle_irscan_command’: tcl.c:1168: warning: passing argument 1 of ‘buf_set_u32’ discards qualifiers from pointer target type Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* jtag/tcl.c cleanup -- split out "adapter.c"David Brownell2010-03-274-430/+466
| | | | | | | | | | | | Clean up the jtag/tcl.c file, which was one of the biggest and messiest ones in that directory. Do it by splitting out all the generic adapter commands to a separate "adapter.c" file (leaving the "tcl.c" file holding only JTAG utilities). Also rename the little-used "jtag interface" to "adapter_name", which should have been at least re-categorized earlier (it's not jtag-only). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* zy1000: dev toolØyvind Harboe2010-03-252-27/+340
| | | | | | | | | first cut peek/poke over tcp/ip, used for debug/research purposes only. Long term JTAG over TCP/IP might be an offshoot. The performance is usable for development/testing purposes. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: allow it to build on linux host for testing purposesØyvind Harboe2010-03-252-27/+45
| | | | | | | For testing and checking the build this can be useful, it doesn't have any practical application outside development. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* FT2232 Messaaging fixDavid Brownell2010-03-241-1/+1
| | | | | | | The init cleanup patch overlooked a message which was wrongly specific to the "usbjtag" layout. Fix. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* zy1000: fix optimisaion bug in dcc writesØyvind Harboe2010-03-221-8/+2
| | | | | | Introduced & corrected since 0.4. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* bitq: fix warning now that out_value is constØyvind Harboe2010-03-221-1/+1
| | | | | | | This was an easy one. Just add the missing "const" to a local variable definition. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* ft2232 init mess cleanupDavid Brownell2010-03-211-60/+99
| | | | | | | | | | | | | | | | | | | | | | In the ft2232 driver, initialization for many layouts punts to a routine called usbjtag_init(), instead of a routine specific to each layout. That routine is a mess built around a "what type layout am I" core. That's a bad design ... in this case, especially so, since it bypasses the layout-specific dispatch which was just done, and obfuscates the initialization which is at least somewhat generic, instead of being specific to the "usbjtag" layout. Split and document out the generic parts of usbjtag_init(), and make the rest of those layouts have layout-specific init methods. Also, rename usbjtag_reset() ... that also was not specific to the "usbjtag" layout, and thus contributed to the previous code structure confusion. (Eventually, all layout-specific code (and method tables) should probably live in files specific to each layout. These changes will facilitate those and other cleanups to this driver.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>