summaryrefslogtreecommitdiff
path: root/src/jtag/drivers
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* transport selection tweaksDavid Brownell2010-07-092-11/+3
| | | | | | | | | | | | * 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-091-1/+1
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* initial "transport" frameworkDavid Brownell2010-07-021-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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>
* jtag: rename JTAG_MOVESTATE to JTAG_TLR_RESETØyvind Harboe2010-06-0712-13/+13
| | | | | | | | | 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>
* 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>
* 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>
* FT2232 comment tweaksDavid Brownell2010-03-191-6/+18
| | | | | | | 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>
* bitbang: add jtag_add_tms_seq supportØyvind Harboe2010-03-166-0/+33
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* rename jtag_khz as adapter_khzDavid Brownell2010-03-151-2/+2
| | | | | | | | | | | 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>
* FT2232: bulidfixSpencer Oliver2010-03-151-1/+1
| | | | | | Fix build issue with commit c23d4596d2239bdbba080499de837f53e0c89e59 Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* FT2232: lookup and save layout just onceDavid Brownell2010-03-141-31/+39
| | | | | | | | | | | | | | 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>
* versaloon cleanup patchDavid Brownell2010-03-111-321/+271
| | | | | | | | | | | | | 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>
* New JTAG driver for Versaloonsimon qian2010-03-111-1072/+304
| | | | | | | | | | 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>
* Add support for Bus Pirate as a JTAG adapter.Michal Demin2010-03-112-0/+972
| | | | | | | | 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>
* JLINK: user info message cleanupSpencer Oliver2010-03-101-29/+46
| | | | | | | - remove trailing LF's from user info messages. - split long lines. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* jtag: simplify jtag_add_plain_ir/dr_scanØyvind Harboe2010-03-081-40/+19
| | | | | | | 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-081-3/+2
| | | | | | | | 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-081-27/+7
| | | | | | | | | | | | | | | | | 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>
* jtag: the post TAP state is now passed to the driversØyvind Harboe2010-03-011-1/+1
| | | | | | | | | | 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-271-0/+25
| | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* 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>
* 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>
* Presto: doxygen fixDavid Brownell2010-01-091-1/+2
| | | | | | Newline needed. 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>