summaryrefslogtreecommitdiff
path: root/src/jtag/transport.c
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* error handling: the error number is not part of the user interfaceØyvind Harboe2011-01-031-2/+2
| | | | | | | | 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>
* "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>
* transport selection tweaksDavid Brownell2010-07-091-2/+9
| | | | | | | | | | | | * 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>
* 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>
* initial "transport" frameworkDavid Brownell2010-07-021-0/+373
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)>