OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | transport |
Wrapper for transport lifecycle operations. More... | |
Functions | |
int | allow_transports (struct command_context *ctx, const char *const *vector) |
Called by debug adapter drivers, or affiliated Tcl config scripts, to declare the set of transports supported by an adapter. More... | |
COMMAND_HELPER (transport_list_parse, char ***vector) | |
Makes and stores a copy of a set of transports passed as parameters to a command. More... | |
struct transport * | get_current_transport (void) |
Returns the transport currently being used by this debug or programming session. More... | |
bool | transport_is_dapdirect_jtag (void) |
Returns true if the current debug session is using JTAG as its transport. More... | |
bool | transport_is_dapdirect_swd (void) |
Returns true if the current debug session is using SWD as its transport. More... | |
static bool | transport_is_hla (void) |
bool | transport_is_jtag (void) |
Returns true if the current debug session is using JTAG as its transport. More... | |
bool | transport_is_swd (void) |
Returns true if the current debug session is using SWD as its transport. More... | |
bool | transport_is_swim (void) |
int | transport_register (struct transport *new_transport) |
Registers a transport. More... | |
int | transport_register_commands (struct command_context *ctx) |
int allow_transports | ( | struct command_context * | ctx, |
const char *const * | vector | ||
) |
Called by debug adapter drivers, or affiliated Tcl config scripts, to declare the set of transports supported by an adapter.
When there is only one member of that set, it is automatically selected.
Definition at line 86 of file transport.c.
References allowed_transports, ERROR_FAIL, ERROR_OK, LOG_ERROR, LOG_INFO, session, and transport_select().
Referenced by COMMAND_HANDLER().
COMMAND_HELPER | ( | transport_list_parse | , |
char *** | vector | ||
) |
Makes and stores a copy of a set of transports passed as parameters to a command.
vector | where the resulting copy is stored, as an argv-style NULL-terminated vector. |
Definition at line 176 of file transport.c.
References CMD_ARGC, CMD_ARGV, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, LOG_ERROR, transport::name, transport::next, NULL, and transport_list.
struct transport* get_current_transport | ( | void | ) |
Returns the transport currently being used by this debug or programming session.
Definition at line 157 of file transport.c.
References session.
Referenced by adapter_assert_reset(), adapter_deassert_reset(), adapter_resets(), hl_transport_init(), target_create(), transport_is_dapdirect_jtag(), transport_is_dapdirect_swd(), transport_is_hla(), transport_is_jtag(), transport_is_swd(), and transport_is_swim().
bool transport_is_dapdirect_jtag | ( | void | ) |
Returns true if the current debug session is using JTAG as its transport.
Definition at line 232 of file adi_v5_dapdirect.c.
References dapdirect_jtag_transport, and get_current_transport().
Referenced by adapter_assert_reset(), adapter_deassert_reset(), adapter_resets(), dap_check_config(), dap_init_all(), and stlink_dap_init().
bool transport_is_dapdirect_swd | ( | void | ) |
Returns true if the current debug session is using SWD as its transport.
Definition at line 241 of file adi_v5_dapdirect.c.
References dapdirect_swd_transport, and get_current_transport().
Referenced by adapter_assert_reset(), adapter_deassert_reset(), adapter_resets(), COMMAND_HANDLER(), dap_check_config(), dap_init_all(), and stlink_dap_init().
|
inlinestatic |
Definition at line 93 of file transport.h.
bool transport_is_jtag | ( | void | ) |
Returns true if the current debug session is using JTAG as its transport.
Definition at line 1827 of file jtag/core.c.
References get_current_transport(), and jtag_transport.
Referenced by adapter_assert_reset(), adapter_deassert_reset(), adapter_resets(), am335xgpio_init(), bcm2835gpio_init(), bcm2835gpio_quit(), cleanup_all_fds(), COMMAND_HANDLER(), COMMAND_HELPER(), cortex_a_assert_reset(), dap_check_config(), default_interface_jtag_execute_queue(), imx_gpio_init(), imx_gpio_quit(), is_jtag_poll_safe(), jtag_queue_command(), linuxgpiod_init(), sysfsgpio_init(), vdebug_init(), and vdebug_reset().
bool transport_is_swd | ( | void | ) |
Returns true if the current debug session is using SWD as its transport.
Definition at line 776 of file adi_v5_swd.c.
References get_current_transport(), and swd_transport.
Referenced by adapter_assert_reset(), adapter_deassert_reset(), adapter_resets(), am335xgpio_init(), bcm2835gpio_init(), bcm2835gpio_quit(), cleanup_all_fds(), COMMAND_HANDLER(), dap_check_config(), dap_init_all(), imx_gpio_init(), imx_gpio_quit(), linuxgpiod_init(), and sysfsgpio_init().
bool transport_is_swim | ( | void | ) |
Definition at line 150 of file swim.c.
References get_current_transport(), and swim_transport.
Referenced by adapter_assert_reset(), adapter_deassert_reset(), adapter_resets(), and stlink_dap_init().
int transport_register | ( | struct transport * | new_transport | ) |
Registers a transport.
There are general purpose transports (such as JTAG), as well as relatively proprietary ones which are specific to a given chip (or chip family).
Code implementing a transport needs to register it before it can be selected and then activated. This is a dynamic process, so that chips (and families) can define transports as needed (without needing error-prone static tables).
new_transport | the transport being registered. On a successful return, this memory is owned by the transport framework. |
Definition at line 129 of file transport.c.
References ERROR_FAIL, ERROR_OK, transport::init, LOG_DEBUG, LOG_ERROR, transport::name, transport::next, transport::select, and transport_list.
int transport_register_commands | ( | struct command_context * | ctx | ) |
Definition at line 351 of file transport.c.
References NULL, register_commands(), and transport_group.
Referenced by setup_command_handler().