OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | transport |
Wrapper for transport lifecycle operations. More... | |
Macros | |
#define | TRANSPORT_DAPDIRECT_JTAG BIT(4) |
#define | TRANSPORT_DAPDIRECT_SWD BIT(5) |
#define | TRANSPORT_HLA_JTAG BIT(2) |
#define | TRANSPORT_HLA_SWD BIT(3) |
#define | TRANSPORT_JTAG BIT(0) |
#define | TRANSPORT_SWD BIT(1) |
#define | TRANSPORT_SWIM BIT(6) |
#define | TRANSPORT_VALID_MASK |
Functions | |
int | allow_transports (struct command_context *ctx, unsigned int transport_ids, unsigned int transport_preferred_id) |
Called by debug adapter drivers, or affiliated Tcl config scripts, to declare the set of transports supported by an adapter. More... | |
struct transport * | get_current_transport (void) |
Returns the transport currently being used by this debug or programming session. More... | |
const char * | get_current_transport_name (void) |
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) |
const char * | transport_name (unsigned int id) |
int | transport_register (struct transport *new_transport) |
Registers a transport. More... | |
int | transport_register_commands (struct command_context *ctx) |
#define TRANSPORT_DAPDIRECT_JTAG BIT(4) |
Definition at line 23 of file transport.h.
#define TRANSPORT_DAPDIRECT_SWD BIT(5) |
Definition at line 24 of file transport.h.
#define TRANSPORT_HLA_JTAG BIT(2) |
Definition at line 21 of file transport.h.
#define TRANSPORT_HLA_SWD BIT(3) |
Definition at line 22 of file transport.h.
#define TRANSPORT_JTAG BIT(0) |
Definition at line 19 of file transport.h.
#define TRANSPORT_SWD BIT(1) |
Definition at line 20 of file transport.h.
#define TRANSPORT_SWIM BIT(6) |
Definition at line 25 of file transport.h.
#define TRANSPORT_VALID_MASK |
Definition at line 28 of file transport.h.
int allow_transports | ( | struct command_context * | ctx, |
unsigned int | transport_ids, | ||
unsigned int | transport_preferred_id | ||
) |
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 149 of file transport.c.
References allowed_transports, ERROR_FAIL, ERROR_OK, IS_PWR_OF_2, LOG_DEBUG, LOG_ERROR, mask, preferred_transport, session, TRANSPORT_DAPDIRECT_JTAG, TRANSPORT_DAPDIRECT_SWD, TRANSPORT_HLA_JTAG, TRANSPORT_HLA_SWD, TRANSPORT_JTAG, transport_name(), transport_select(), transport_single_is_autoselected, TRANSPORT_SWD, and TRANSPORT_VALID_MASK.
Referenced by COMMAND_HANDLER().
struct transport* get_current_transport | ( | void | ) |
Returns the transport currently being used by this debug or programming session.
Definition at line 252 of file transport.c.
References session.
Referenced by adapter_assert_reset(), adapter_deassert_reset(), adapter_resets(), COMMAND_HANDLER(), hl_transport_init(), transport_is_dapdirect_jtag(), transport_is_dapdirect_swd(), transport_is_hla(), transport_is_jtag(), transport_is_swd(), and transport_is_swim().
const char* get_current_transport_name | ( | void | ) |
Definition at line 258 of file transport.c.
References transport::id, is_transport_id_valid(), NULL, session, and transport_full_name().
Referenced by adapter_assert_reset(), adapter_deassert_reset(), adapter_resets(), and hl_transport_init().
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 115 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 1840 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(), 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(), 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 773 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(), cleanup_all_fds(), COMMAND_HANDLER(), dap_check_config(), dap_init_all(), imx_gpio_init(), imx_gpio_quit(), 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().
const char* transport_name | ( | unsigned int | id | ) |
Definition at line 86 of file transport.c.
References ARRAY_SIZE, NULL, and transport_names.
Referenced by allow_transports(), COMMAND_HANDLER(), and transport_register().
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 211 of file transport.c.
References ERROR_FAIL, ERROR_OK, transport::id, transport::init, is_transport_id_valid(), lh(), transport::lh, list_add_tail(), list_for_each_entry, LOG_DEBUG, LOG_ERROR, transport::select, transport_full_name(), and transport_name().
int transport_register_commands | ( | struct command_context * | ctx | ) |
Definition at line 432 of file transport.c.
References NULL, register_commands(), and transport_group.