summaryrefslogtreecommitdiff
path: root/src/jtag
Commit message (Collapse)AuthorAgeFilesLines
* zy1000: embedded ice dcc tweakØyvind Harboe2010-03-081-21/+48
| | | | | | | | | | 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>
* jtag: simplify jtag_add_plain_ir/dr_scanØyvind Harboe2010-03-086-64/+55
| | | | | | | These fn's now clearly just clock out/in bits. No mystical fields are involved. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: jtag_add_ir_scan() now takes a single fieldØyvind Harboe2010-03-087-26/+35
| | | | | | | | 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>
* jtag: retire tap fieldØyvind Harboe2010-03-087-113/+52
| | | | | | | | | | | | | | | | | 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>
* minidriver: fix arm11 compilation problemØyvind Harboe2010-03-051-0/+6
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: faster jtag_add_ir_scan()Øyvind Harboe2010-03-011-9/+3
| | | | | | Faster and simpler. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: arm11 load is now fasterØyvind Harboe2010-03-011-42/+71
| | | | | | 290kBytes/s @ 8MHz, no need to inline jtag_tap_next_enabled(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: add jtag_add_tms_seq supportØyvind Harboe2010-03-011-20/+41
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: the post TAP state is now passed to the driversØyvind Harboe2010-03-014-4/+5
| | | | | | | | | | after clocking out a tms sequence, then the TAP will be in some state. This state is now handed to the drivers. TAP_INVALID is a possible state after a TMS sequence if switching to SWD. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* FT2232: add missing enum when using ftd2xx librarySpencer Oliver2010-02-281-0/+10
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* Add board/redbee-usb.cfgMariano Alvira2010-02-281-0/+5
| | | | | | | | | | | The Redbee USB is a small form-factor usb stick from Redwire, LLC (www.redwirellc.com/store), built around a Freescale MC13224V ARM7TDMI + 802.15.4 radio (plus antenna). It includes an FT2232H for debugging, with Channel B connected to the mc13224v's JTAG interface (unusual) and Channel A connected to UART1. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* add board/redbee-econotag.cfg and JTAG supportMariano Alvira2010-02-271-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | The Redbee Econotag is an open hardware development kit from Redwire, LLC (www.redwirellc.com/store), for the Freescale MC13224V ARM7TDMI + 802.15.4 radio. It includes both an MC13224V and an FT2232H (for JTAG and UART support). It has flexible power supply options. Additional features are: - inverted-F pcb antenna - 36 GPIO brought out to 0.1" pin header (includes all peripheral pins) - Reset button - Two push buttons (on kbi1-5 and kbi0-4) - USB-A connector, powered from USB - up to 16V external input - pads for optional buck inductor - pads for optional 32.768kHz crystal - 2x LEDS on TX_ON and RX_ON [ dbrownell@users.sourceforge.net: shrink lines; texi ] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ft2232: implement TMS sequence commandDavid Brownell2010-02-271-2/+72
| | | | | | | Implement the new TMS_SEQ command on FT2232 hardware. Also, swap a bogus exit() call with a clean failure return. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* interface: define TMS sequence commandDavid Brownell2010-02-278-11/+124
| | | | | | | | | | | | | | | | | | | | | | | For support of SWD we need to be able to clock out special bit sequences over TMS or SWDIO. Create this as a generic operation, not yet called by anything, which is split as usual into: - upper level abstraction ... here, jtag_add_tms_seq(); - midlayer implementation logic hooking that to the lowlevel code; - lowlevel minidriver operation ... here, interface_add_tms_seq(); - message type for request queue, here JTAG_TMS. This is done slightly differently than other operations: there's a flag saying whether the interface driver supports this request. (In fact a flag *word* so upper layers can learn about other capabilities too ... for example, supporting SWD operations.) That approach (flag) lets this method *eventually* be used to eliminate pathmove() and statemove() support from most adapter drivers, by moving all that logic into the mid-layer and increasing uniformity between the various drivers. (Which will in turn reduce subtle bugginess.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ft2232: add a mechanism to specify channel in layout structsMariano Alvira2010-02-251-3/+7
| | | | | | | | | | | | | | | | | | | | | | | FT2232-family chips have two or more MPSSE modules. FTDI documentation calls these channels. JTAG adapter drivers thus need to be able to choose which channel to use. (For example, one channel may connect to a board's microcontroller, while another connects to a CPLD.) Since each channel has its own USB interface, libftdi (somewhat confusingly) identifies channels using INTERFACE_* symbols. Most boards use INTERFACE_A for JTAG, which is the default in OpenOCD. But some wire up a different one. Note that there are two facets of what makes a wiring "layout": - The mapping between debug signals map and channel signals ... embedded in C functions. - Label used in Tcl configuration scripts ... part of the "layout" structure. By letting the channel be part of the layout struct, we permit sharing the C functions between Tcl-visible layouts, when those signal mappings are reused. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* arm11: improve performance using minidriver hookØyvind Harboe2010-02-221-3/+65
| | | | | | | | | | | | | | | | zy1000 performance for GDB load went from 100kBytes/s to 300kBytes/s @ 8 MHz by implementing the inner loop of unack arm11 memory writes directly on top of the hw fifo. Profiling info: 78.57 0.77 0.77 arm11_run_instr_data_to_core_noack_inner 5.10 0.82 0.05 memcpy 4.08 0.86 0.04 jtag_tap_next_enabled 3.06 0.89 0.03 gdb_input Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* arm11: allow minidrivers to implement inner loop of memory writesØyvind Harboe2010-02-221-0/+8
| | | | | | | | | | | | | | | This allows minidrivers to e.g. hardware accelerate memory writes. Same trick as is used for arm7/9 dcc writes. Added error propagation for memory transfer failures in code rearrangement. Also the JTAG end state is not updated until after the memory write run is complete. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: jtag_add_dr_scan() performance improvementØyvind Harboe2010-02-221-8/+15
| | | | | | Reduce overhead in jtag_add_dr_scan() a bit. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* ft2232 table init cleanupDavid Brownell2010-02-211-19/+78
| | | | | | | | Use labeled initializers in the table of layouts instead of positional ones. This ls cleaner and less error prone, plus it simplifies patches which add members to these structure. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* FreeBSD buildfixDavid Brownell2010-02-201-2/+2
| | | | | | | | | Fix an unused variable warning seen when building the parport driver under FreeBSD. Using information from Xiaofan Chen <xiaofanc@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JLink: reference protocol documentationDavid Brownell2010-02-041-0/+4
| | | | | | | Segger publishes some documentation on this protocol; reference it, so future maintainers can know it exists. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JTAG: fix bug when no interface connectedSpencer Oliver2010-02-031-0/+7
| | | | | | - fix coredump when OpenOCD is started without a jtag interface connected. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* gdb: restore behavior from 0.3.1 for srst_asserted and power_restoreØyvind Harboe2010-02-011-2/+23
| | | | | | | | srst_asserted and power_restore can now be overriden to do nothing. By default they will "reset init" the targets and halt gdb. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* core arm11: Silence logs at level 3 if there is no activityEdgar Grimberg2010-01-251-4/+6
| | | | | | | | If the target and openocd are idling, the log should normally be silent at level 3. (Given no verbose logging options.) Signed-off-by: Edgar Grimberg <edgar.grimberg@zylin.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* zy1000: flush jtag buffer before changing speedØyvind Harboe2010-01-191-0/+3
| | | | | | | | | It is conceivable that there could be commands in the queue when a speed change request comes in. Flush the hw queue before changing speed. Not observed, found by inspection. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* vsllink -- add commentDavid Brownell2010-01-181-0/+3
| | | | | | | Previous patch deserved *inline* comment, not just in git revision history. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* commands: allow scan_chain command to be executed during configØyvind Harboe2010-01-181-1/+1
| | | | | | | Adding taps and then dumping them is quite reasonable thing to do in a config script. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* read target voltage first in vsllinksimon qian2010-01-171-0/+8
| | | | | | | | | | | | The very first command after init command should be "read target voltage". This is a tweak for the Old Versaloon firmware. Without this, in most most cases, it works. Under Ubuntu9.04, there is a chance that the USB will fail. The problem disappears if I read target voltage first. For the lastest Versaloon firmware, it's OK. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* jtag.h whitespace/comment cleanupDavid Brownell2010-01-141-9/+8
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* target: return JIM_OK instead of ERROR_OKØyvind Harboe2010-01-111-1/+1
| | | | | | | No change in actual binary as JIM_OK == ERROR_OK, but JIM_OK is correct here. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: reset bugfixØyvind Harboe2010-01-111-1/+7
| | | | | | | flush JTAG FIFO before reset. Fixes RCLK problems observed w/lpc2148, but really fixes a wider range of problems. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Presto: doxygen fixDavid Brownell2010-01-091-1/+2
| | | | | | Newline needed. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* jtag/tcl help/usage fixupsDavid Brownell2010-01-091-74/+115
| | | | | | | | | | The usual: expand several helptexts to be more correct and to use full sentences; make the usage messages use the same EBNF as the User's Guide; use function names for their addresses. Also add a comment about that odd jtag_command_handlers_to_move[] thing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ZY1000 help/usage fixupsDavid Brownell2010-01-091-8/+11
| | | | | | | The usual: same EBNF as in the User's Guide, full sentence helptext, function names *are* their addresses. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* jtag: presto, parport help/usage updatesDavid Brownell2010-01-092-18/+29
| | | | | | | | | | | Presto: add doxygen file comment. Parport: note a couple gaps in layout config. Both: use the uniform EBNF for usage, bugfix helptexts, use function name as its address not "&name". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* jtag/gw16012 usage/help updatesDavid Brownell2010-01-091-3/+5
| | | | | Use standard BNF. Improve/correct helptext for its "parport_port" command. Function address is just its name.
* buildfix with -DNDEBUGDavid Brownell2010-01-051-1/+4
| | | | | | | Don't save that state unless its only user, an assertion, is compiled. Saving it broke a cygwin build. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* parport: output port as hex rather than decSpencer Oliver2010-01-051-1/+1
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* FT2232: fix doc typoDavid Brownell2010-01-031-1/+1
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JTAG/drivers: ft2232 docsDavid Brownell2010-01-031-7/+33
| | | | | | | | | | | Add doxyegen description for this driver. Correct the helptext (configures *or* displays based on #params), and usage (use the same BNF as the User's Guide). Remove superfluous #include Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JTAG/Drivers: Amontec JTAG accelerator fixesDavid Brownell2010-01-031-6/+19
| | | | | | | | | | | | Remove superfluous #include. Correct the helptext (configures *or* displays based on #params), and usage (use the same BNF as the User's Guide). Add doxygen -- file-level description and a @todo for doing RTCK correctly. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JTAG: Amontec JTAG accelerater "rtck" is backDavid Brownell2010-01-031-1/+1
| | | | | | | | | | The command processing conversion a while back lost the "rtck" enable/disable command; restore it. NOTE that having such a command is wrong; there's a standard way to enable adaptive clocking ("speed 0"). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JTAG/drivers: cleanup jtag_interface structsDavid Brownell2010-01-038-80/+74
| | | | | | | Get rid of excess indents. Ditto superfluous "&" before function pointers. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JTAG/drivers: amt_jtagaccel fixes + cleanupDavid Brownell2010-01-031-14/+43
| | | | | | | | | | Build fixes: it failed abysmally with PPDEV enabled. Swapped a build-time error with a FIXME comment in the affected macros. Cleanup: remove "&" before function pointers, and excess indent, for the interface struct declaration. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* zy1000: firmware upgrade fixes for revcØyvind Harboe2009-12-301-16/+45
| | | | | | Use ecos firmwareutil upgrade utilities Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: less warningsØyvind Harboe2009-12-301-3/+2
| | | | | | | use inline for static functions in header files to avoid warnings about fn not being used. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Fix Luminary FT2232 layout docs/configsDavid Brownell2009-12-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of this patch updates documentation and comments for various Luminary boards, supporting two bug fixes by helping to make sense of the current mess: - Recent rev C lm3s811 eval boards didn't work. They must use the ICDI layout, which sets up some signals that the older boards didn't need. This is actually safe and appropriate for *all* recent boards ... so just make "luminary.cfg" use the ICDI layout. - "luminary-lm3s811.cfg", was previously unusable! No VID/PID; and the wrong vendor string. Make it work, but reserve it for older boards where the ICDI layout is wrong. - Default the LM3748 eval board to "luminary.cfg", like the other boards. If someone uses an external JTAG adapter, all boards will use the same workaround (override that default). The difference between the two FT2232 layouts is that eventually the EVB layout will fail cleanly when asked to enable SWO trace, but the ICDI layout will as cleanly be able to enable it. Folk using "luminary.cfg" with Rev B boards won't see anything going wrong until SWO support is (someday) added. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* Driver for USB-JTAG, Altera USB-Blaster and compatiblesCatalin Patulea2009-12-263-0/+598
| | | | | | | The 10-pin JTAG layout used with these adapters is used by a variety of platforms including AVR. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* PARPORT code cleanup:Antonio Borneo2009-12-261-6/+5
| | | | | | Align elements in array. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* JTAG: shrink "scan_chain" outputDavid Brownell2009-12-161-8/+8
| | | | | | | | | | Tweak the "scan_chain" output by removing column separators. Also remove the "current instruction" state ... which changes constantly. Now its style resembles the "targets" output, and can even fit on one line in standard terminals and in the PDF docs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>