transport is only used within OpenOCD.
 
Symbols
loading...
Files
loading...

transport struct

Wrapper for transport lifecycle operations. OpenOCD talks to targets through some kind of debugging or programming adapter, using some protocol that probably has target-specific aspects. A "transport" reflects electrical protocol to the target, e..g jtag, swd, spi, uart, ... NOT the messaging protocols layered over it (e.g. JTAG has eICE, CoreSight, Nexus, OnCE, and more). In addition to the lifecycle operations packaged by this structure, a transport also involves an interface supported by debug adapters and used by components such as debug targets. For non-debug transports, there may be interfaces used to write to flash chips.

Syntax

struct transport {     const char *name;     int (*select)(struct command_context *ctx);     int (*init)(struct command_context *ctx);     int (*override_target)(const char **targetname);     struct transport *next; };

Fields

name

Each transport has a unique name, used to select it from among the alternatives. Examples might include "jtag", * "swd", "AVR_ISP" and more. Read more...

select

When a transport is selected, this method registers its commands and activates the transport (e.g. resets the link). After those commands are registered, they will often be used for further configuration of the debug link. Read more...

init

server startup uses this method to validate transport configuration. (For example, with JTAG this interrogates the scan chain against the list of expected TAPs.). Read more...

override_target

Optional. If defined, allows transport to override target name prior to initialisation. Read more...

next

Transports are stored in a singly linked list. Read more...

References

LocationReferrerScopeText
transport.h:35
struct transport {
adi_v5_dapdirect.c:209dapdirect_jtag_transport
static struct transport dapdirect_jtag_transport = {
adi_v5_dapdirect.c:215dapdirect_swd_transport
static struct transport dapdirect_swd_transport = {
adi_v5_swd.c:761swd_transport
static struct transport swd_transport = {
core.c:1813jtag_transport
static struct transport jtag_transport = {
hla_transport.c:165hl_transport_init()
struct transport *transport;
hla_transport.c:215hl_swd_transport
static struct transport hl_swd_transport = {
hla_transport.c:222hl_jtag_transport
static struct transport hl_jtag_transport = {
hla_transport.c:240transport_is_hla()
struct transport *t;
swim.c:138swim_transport
static struct transport swim_transport = {
target.c:5841target_create()
struct transport *tr = get_current_transport();
transport.c:46transport_list
static struct transport *transport_list;
transport.c:56session
static struct transport *session;
transport.c:62transport_select()
for (struct transport *t = transport_list; t; t = t->next) {
transport.c:129transport_register()
int transport_register(struct transport *new_transport)
transport.c:131transport_register()
struct transport *t;
transport.c:157get_current_transport()
struct transport *get_current_transport(void)
transport.c:193transport_list_parse()
struct transport *t;
transport.c:243handle_transport_list()
for (struct transport *t = transport_list; t; t = t->next)
transport.h:71transport::nexttransport
struct transport *next;
transport.h:74transport_register()::new_transporttransport_register()
int transport_register(struct transport *new_transport);
transport.h:76get_current_transport()
struct transport *get_current_transport(void);

Type Use