63 tap = calloc(1,
sizeof(*tap));
81 LOG_DEBUG(
"Creating new SWIM \"tap\", Chip: %s, Tap: %s, Dotted: %s",
94 .handler = handle_swim_newtap_command,
96 .help =
"Create a new TAP instance named basename.tap_type, "
97 "and appends it to the scan chain.",
98 .usage =
"basename tap_type",
107 .help =
"perform swim adapter actions",
131 LOG_WARNING(
"\'srst_nogate\' reset_config option is required");
#define CMD_ARGV
Use this macro to access the arguments for the command being handled, rather than accessing the varia...
#define ERROR_COMMAND_SYNTAX_ERROR
#define CMD_ARGC
Use this macro to access the number of arguments for the command being handled, rather than accessing...
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
static int register_commands(struct command_context *cmd_ctx, const char *cmd_prefix, const struct command_registration *cmds)
Register one or more commands in the specified context, as children of parent (or top-level commends,...
struct esp_usb_jtag __attribute__
static enum reset_types jtag_reset_config
int adapter_deassert_reset(void)
void jtag_tap_init(struct jtag_tap *tap)
enum reset_types jtag_get_reset_config(void)
int adapter_assert_reset(void)
char * alloc_printf(const char *format,...)
#define LOG_WARNING(expr ...)
#define LOG_ERROR(expr ...)
#define LOG_DEBUG(expr ...)
size_t size
Size of the control block search area.
Represents a driver for a debugging interface.
const struct swim_driver * swim_ops
bool enabled
Is this TAP currently enabled?
int(* read_mem)(uint32_t addr, uint32_t size, uint32_t count, uint8_t *buffer)
Read target memory through ROTF (read on-the-fly) command.
int(* reconnect)(void)
Reconnect to the target.
int(* write_mem)(uint32_t addr, uint32_t size, uint32_t count, const uint8_t *buffer)
Write target memory through WOTF (write on-the-fly) command.
int(* srst)(void)
Send SRST (system reset) command to target.
Wrapper for transport lifecycle operations.
const char * name
Each transport has a unique name, used to select it from among the alternatives.
static struct transport swim_transport
bool transport_is_swim(void)
static int swim_transport_select(struct command_context *cmd_ctx)
static int swim_transport_init(struct command_context *cmd_ctx)
int swim_read_mem(uint32_t addr, uint32_t size, uint32_t count, uint8_t *buffer)
static void swim_constructor(void)
static const struct command_registration swim_transport_command_handlers[]
static const struct command_registration swim_transport_subcommand_handlers[]
int swim_system_reset(void)
COMMAND_HANDLER(handle_swim_newtap_command)
struct adapter_driver * adapter_driver
int swim_write_mem(uint32_t addr, uint32_t size, uint32_t count, const uint8_t *buffer)
This file implements support for STMicroelectronics debug protocol SWIM (Single Wire Interface Module...
struct transport * get_current_transport(void)
Returns the transport currently being used by this debug or programming session.
int transport_register(struct transport *new_transport)
Registers a transport.