aboutsummaryrefslogtreecommitdiff
path: root/src/jtag
AgeCommit message (Collapse)Author
2010-06-17zy1000: fix arm11 optimisationØyvind Harboe
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>
2010-06-15zy1000: -Wshadow warning fixØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-10jtag: added mising headerThomas Koeller
Distributions created by 'make dist' were incomplete due to a missing header file. Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
2010-06-08zy1000: fix optimisation gaffeØyvind Harboe
DCC optimisation was broken on targets w/multiple TAP's. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-08zy1000: added watchdog serverØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-07jtag: rename JTAG_MOVESTATE to JTAG_TLR_RESETØyvind Harboe
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>
2010-05-18zy1000: fix false positive warning about unitialized local variableØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05zy1000: fix tcl command to read power dropout statusØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05zy1000: fix keep_alive() bugØyvind Harboe
introduced in latest commit. Should have held off merging that commit. Sigh.... Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05command context: fix errors when running certain commands on startupØyvind Harboe
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>
2010-05-04zy1000: wait for srst to deassertØyvind Harboe
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>
2010-04-24adapter: allow adjusting srst assert withmichal smulski
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-04-10JTAG/COMMANDS: review scope of functionsAntonio Borneo
Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-04-03buildfixDavid Brownell
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>
2010-03-27jtag/tcl.c cleanup -- split out "adapter.c"David Brownell
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>
2010-03-25zy1000: dev toolØyvind Harboe
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>
2010-03-25zy1000: allow it to build on linux host for testing purposesØyvind Harboe
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>
2010-03-24FT2232 Messaaging fixDavid Brownell
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>
2010-03-22zy1000: fix optimisaion bug in dcc writesØyvind Harboe
Introduced & corrected since 0.4. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-22bitq: fix warning now that out_value is constØyvind Harboe
This was an easy one. Just add the missing "const" to a local variable definition. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-21ft2232 init mess cleanupDavid Brownell
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>
2010-03-21jtag: make out_value constØyvind Harboe
Tightens up the jtag_add_xxx_scan() API Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-19FT2232 comment tweaksDavid Brownell
Note that the FT4232 chips have four channels not two, and Elaborate on uses of the additional channels. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-19zy1000: clean up jtag_add_xx_scan fn'sØyvind Harboe
The implementation is now more straightforward as the scan_fields have been greatly simplified over time. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-19zy1000: fix bug in end state of DCC writesØyvind Harboe
Introduced in latest commits, found by code inspection & GCC warning. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-19jtag: retire jtag_get/set_end_state()Øyvind Harboe
Voila! This get rids of mysteries about what what state the TAP is in. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-19jtag: remove jtag_get_end_state()'s that should be unecessaryØyvind Harboe
By a bit of code inspection it seems like all of these instances of jtag_get_end_state() can be unambigously replaced by constants. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-18jtag: cut down on usage of unintended modification of global end stateØyvind Harboe
jtag_get/set_end_state() is now deprecated. There were lots of places in the code where the end state was unintentionally modified. The big Q is whether there were any places where the intention was to modify the end state. 0.5 is a long way off, so we'll get a fair amount of testing. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-17zy1000: tweak the DCC inner loop a tiny bitØyvind Harboe
Uses FIFO a bit more efficiently now. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-16bitbang: add jtag_add_tms_seq supportØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-15move "reset_config" out of JTAG command groupDavid Brownell
The SRST configuration options are not specific to JTAG, so this command may be needed with non-JTAG debug sessions. Just move the command to a different group. (The TRST options are, however, clearly JTAG-specific, but for compatibility, they're now left alone. The flags they control could later be disabled in non-JTAG sessions.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-15rename jtag_nsrst_assert_width as adapter_nsrst_assert_widthDavid Brownell
Globally rename "jtag_nsrst_assert_width" as "adapter_nsrst_assert_width", and move it out of the "jtag" command group ... it needs to be used with non-JTAG transports Includes a migration aid (in jtag/startup.tcl) so that old user scripts won't break. That aid should Sunset in about a year. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-15rename jtag_nsrst_delay as adapter_nsrst_delayDavid Brownell
Globally rename "jtag_nsrst_delay" as "adapter_nsrst_delay", and move it out of the "jtag" command group ... it needs to be used with non-JTAG transports Includes a migration aid (in jtag/startup.tcl) so that old user scripts won't break. That aid should Sunset in about a year. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-15rename jtag_khz as adapter_khzDavid Brownell
Globally rename "jtag_khz" as "adapter_khz", and move it out of the "jtag" command group ... it needs to be used with non-JTAG transports Includes a migration aid (in jtag/startup.tcl) so that old user scripts won't break. That aid should Sunset in about a year. (We may want to update it to include a nag message too.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-15FT2232: bulidfixSpencer Oliver
Fix build issue with commit c23d4596d2239bdbba080499de837f53e0c89e59 Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-03-14rename jtag_interface_{init,quit}()David Brownell
These routines apply to non-JTAG debug adapters too. To reduce confusion, give them better (non-misleading) names. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-14FT2232: lookup and save layout just onceDavid Brownell
Streamline use of the layout: have the "ft2232_layout" command look it up and save the result, instead of having a few different chunks of code looking it up later, and saving just its name (which is already part of the layout). This - is cleaner - reports errors sooner - facilitates earlier adapter-specific setup - removes unused "default to "usbjtag" logic Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-11versaloon cleanup patchDavid Brownell
Remove undesirable - backslashes at end-of-line; - initializations of BSS data to zero/NULL; - overlong lines (80+ characters) - whitespace issues - brackets around single-line statements And other minor issues reported by the Linux "checkpatch" utility Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-11New JTAG driver for Versaloonsimon qian
This patch greatly simplifies the Versaloon driver: - reducing the code size from more than 50K to less than 28K - adding support for IR/DR scan with unlimited size - using tap_get_tms_path and tap_get_tms_path_len. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-11Add support for Bus Pirate as a JTAG adapter.Michal Demin
This includes a driver and matching config file. This support needs to be enabled through the initial "configure" (use "--enable-buspirate"). Signed-off-by: Michal Demin <michaldemin@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-11split "interface" commands from "jtag" onesDavid Brownell
We'll need to be able to work with debug adapter interfaces (drivers) even when they're not used for JTAG ... for example, while there are multi-transport drivers which support JTAG *and* several other transports (or just one more, like SWD) there are also adapters with more limited goals (and no JTAG support at all). Start decoupling the two concepts ("debug adapter driver", "jtag") by having two command groups, which initialize separately. This will help us support OpenOCD sessions using only non-JTAG transports, in which JTAG commands should not be registered. Update docs to mention that the JTAG, SVF, and XSVF commands won't work without a JTAG transport. Note that at least commands working with SRST are still inappropriately coupled to JTAG ... inappropriate because (a) SRST is not part of the JTAG standard, for all that many platforms (like ARM) expect it; and also (b) because they're used with non-JTAG debug and programming interfaces, too. They should perhaps become generic "interface" operations at some point. (Similarly with the clock rate to be used by a given adapter.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-03-10JLINK: user info message cleanupSpencer Oliver
- remove trailing LF's from user info messages. - split long lines. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-03-08zy1000: embedded ice dcc tweakØyvind Harboe
How many bits to shift out before/after enabled tap not in bypass is calculated outside the loop. This is more of a demonstration of principle and to clarify code than a performance optimisation as such. Follows up a bit on the simplification work in jtag interface. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-08jtag: simplify jtag_add_plain_ir/dr_scanØyvind Harboe
These fn's now clearly just clock out/in bits. No mystical fields are involved. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-08jtag: jtag_add_ir_scan() now takes a single fieldØyvind Harboe
In the code a single field was all that was ever used. Makes jtag_add_ir_scan() simpler and leaves more complicated stuff to jtag_add_plain_ir_scan(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-08jtag: retire tap fieldØyvind Harboe
jtag_add_dr/ir_scan() now takes the tap as the first argument, rather than for each of the fields passed in. The code never exercised the path where there was more than one tap being scanned, who knows if it even worked. This simplifies the implementation and reduces clutter in the calling code. use jtag_add_ir/dr_plain_scan() for more fancy situations. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-05minidriver: fix arm11 compilation problemØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-01zy1000: faster jtag_add_ir_scan()Øyvind Harboe
Faster and simpler. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-01zy1000: arm11 load is now fasterØyvind Harboe
290kBytes/s @ 8MHz, no need to inline jtag_tap_next_enabled(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-01zy1000: add jtag_add_tms_seq supportØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>