48 void (*jtag_add_scan)(
struct jtag_tap *active,
215 unsigned jtag_num_taps = 0;
259 LOG_WARNING(
"Specify TAP '%s' by name, not number %u",
290 while ((*callbacks_p)->next)
291 callbacks_p = &((*callbacks_p)->next);
292 callbacks_p = &((*callbacks_p)->next);
296 (*callbacks_p)->callback =
callback;
297 (*callbacks_p)->priv =
priv;
298 (*callbacks_p)->next =
NULL;
311 if (((*p)->priv !=
priv) || ((*p)->callback !=
callback)) {
401 num_bits, out_bits, in_bits,
state);
406 uint8_t *in_check_mask,
int num_bits);
426 jtag_add_scan(active, in_num_fields, in_fields,
state);
428 for (
int i = 0; i < in_num_fields; i++) {
429 if ((in_fields[i].check_value) && (in_fields[i].in_value)) {
523 LOG_ERROR(
"BUG: TAP path doesn't finish in a stable state");
528 for (
int i = 0; i < num_states; i++) {
530 LOG_ERROR(
"BUG: TAP_RESET is not a valid state for pathmove sequences");
537 LOG_ERROR(
"BUG: %s -> %s isn't a valid TAP transition",
555 if (goal_state != cur_state) {
566 else if (goal_state == cur_state)
575 for (
unsigned i = 0; i < tms_count; i++, tms_bits >>= 1) {
576 bool bit = tms_bits & 1;
579 moves[i] = cur_state;
602 LOG_ERROR(
"jtag_add_clocks() called with TAP in unstable state \"%s\"",
608 if (num_cycles > 0) {
651 int trst_with_tlr = 0;
669 && !req_tlr_or_trst) {
670 LOG_ERROR(
"BUG: can't assert only SRST");
684 if (req_tlr_or_trst) {
731 LOG_DEBUG(
"JTAG reset with TLR instead of TRST");
761 int trst_with_tlr = 0;
784 && !req_tlr_or_trst) {
785 LOG_ERROR(
"BUG: can't assert only SRST");
799 if (req_tlr_or_trst) {
843 LOG_DEBUG(
"JTAG reset with TLR instead of TRST");
878 uint8_t *in_check_mask,
int num_bits)
884 compare_failed =
buf_cmp_mask(captured, in_check_value, in_check_mask, num_bits);
886 compare_failed =
buf_cmp(captured, in_check_value, num_bits);
888 if (compare_failed) {
889 char *captured_str, *in_check_value_str;
897 LOG_WARNING(
"Bad value '%s' captured during DR or IR scan:",
899 LOG_WARNING(
" check_value: 0x%s", in_check_value_str);
902 free(in_check_value_str);
905 char *in_check_mask_str;
908 LOG_WARNING(
" check_mask: 0x%s", in_check_mask_str);
909 free(in_check_mask_str);
935 LOG_ERROR(
"No JTAG interface configured yet. "
936 "Issue 'init' command in startup scripts "
937 "before communicating with targets.");
949 LOG_ERROR(
"JTAG API jtag_execute_queue() called on non JTAG interface");
961 cmd->cmd.scan->ir_scan ?
"IR" :
"DR",
963 for (
int i = 0; i <
cmd->cmd.scan->num_fields; i++) {
983 cmd->cmd.runtest->num_cycles,
988 const char *reset_str[3] = {
989 "leave",
"deassert",
"assert"
992 reset_str[
cmd->cmd.reset->trst + 1],
993 reset_str[
cmd->cmd.reset->srst + 1]);
1070 #define JTAG_MAX_AUTO_TAPS 20
1072 #define EXTRACT_MFG(X) (((X) & 0xffe) >> 1)
1073 #define EXTRACT_PART(X) (((X) & 0xffff000) >> 12)
1074 #define EXTRACT_VER(X) (((X) & 0xf0000000) >> 28)
1079 #define END_OF_CHAIN_FLAG 0xffffffff
1082 #define JTAG_IRLEN_MAX 60
1088 .out_value = idcode_buffer,
1089 .in_value = idcode_buffer,
1093 for (
unsigned i = 0; i < num_idcode; i++)
1103 uint8_t zero_check = 0x0;
1104 uint8_t one_check = 0xff;
1106 for (
unsigned i = 0; i <
count * 4; i++) {
1107 zero_check |= idcodes[i];
1108 one_check &= idcodes[i];
1121 if (zero_check == 0x00 || one_check == 0xff) {
1122 LOG_ERROR(
"JTAG scan chain interrogation failed: all %s",
1123 (zero_check == 0x00) ?
"zeroes" :
"ones");
1124 LOG_ERROR(
"Check JTAG interface, timings, target power, etc.");
1131 const char *
name, uint32_t idcode)
1134 "JTAG tap: %s %16.16s: 0x%08x "
1135 "(mfg: 0x%3.3x (%s), part: 0x%4.4x, ver: 0x%1.1x)",
1137 (
unsigned int)idcode,
1163 bool triggered =
false;
1170 LOG_WARNING(
"Unexpected idcode after end of chain: %d 0x%08x",
1171 count, (
unsigned int)idcode);
1191 if (idcode == expected)
1205 snprintf(msg,
sizeof(msg),
"expected %u of %u", ii + 1, tap->
expected_ids_cnt);
1227 uint8_t *idcode_buffer = calloc(4, max_taps);
1234 LOG_DEBUG(
"DR scan interrogation for IDCODE/BYPASS");
1246 unsigned bit_count = 0;
1247 unsigned autocount = 0;
1248 for (
unsigned i = 0; i < max_taps; i++) {
1249 assert(bit_count < max_taps * 32);
1263 tap = calloc(1,
sizeof(*tap));
1284 LOG_INFO(
"TAP %s does not have valid IDCODE (idcode=0x%" PRIx32
")",
1310 LOG_ERROR(
"double-check your JTAG setup (interface, speed, ...)");
1319 free(idcode_buffer);
1334 uint8_t *ir_test =
NULL;
1340 int total_ir_length = 0;
1349 total_ir_length += 2;
1364 LOG_DEBUG(
"IR capture validation scan");
1399 LOG_WARNING(
"AUTO %s - use \"jtag newtap %s %s -irlen %d "
1400 "-expected-id 0x%08" PRIx32
"\"",
1413 LOG_ERROR(
"%s: IR capture error; saw 0x%0*" PRIx64
" not 0x%0*" PRIx32,
1427 uint64_t val =
buf_get_u64(ir_test, chain_pos, 2);
1431 LOG_ERROR(
"IR capture error at bit %d, saw 0x%s not 0x...3",
1448 unsigned ir_len_bits;
1449 unsigned ir_len_bytes;
1455 tap->
expected = calloc(1, ir_len_bytes);
1460 if (ir_len_bits > 32)
1474 LOG_DEBUG(
"Created Tap: %s @ abs position %d, "
1475 "irlen %d, capture: 0x%x mask: 0x%x", tap->
dotted_name,
1488 Jim_DecrRefCount(jteap->
interp, jteap->
body);
1507 bool issue_setup =
true;
1525 "AUTO PROBING MIGHT NOT WORK!!");
1554 LOG_ERROR(
"Trying to use configured scan chain anyway...");
1555 issue_setup =
false;
1571 issue_setup =
false;
1577 LOG_WARNING(
"Bypassing JTAG setup events due to errors");
1585 int retval, retval1;
1591 LOG_DEBUG(
"Initializing with hard SRST reset");
1597 return (retval ==
ERROR_OK) ? retval1 : retval;
1606 LOG_DEBUG(
"Initializing with hard TRST+SRST reset");
1645 LOG_WARNING(
"\'srst_nogate\' reset_config option is required");
1678 LOG_WARNING(
"\'srst_nogate\' reset_config option is required");
1684 if (Jim_Eval_Named(cmd_ctx->
interp,
"jtag_init", __FILE__, __LINE__) != JIM_OK)
1715 LOG_ERROR(
"No Valid JTAG Interface Configured.");
1842 LOG_ERROR(
"adapter has no srst signal");
1858 LOG_ERROR(
"transport %s has no trst signal",
1864 LOG_ERROR(
"adapter has no srst signal");
1874 LOG_ERROR(
"reset is not supported on transport %s",
1893 LOG_ERROR(
"reset is not supported on %s",
1910 LOG_ERROR(
"reset is not supported on %s",
1918 uint32_t port_size,
unsigned int *trace_freq,
1919 unsigned int traceclkin_freq, uint16_t *prescaler)
1923 traceclkin_freq, prescaler);
1924 }
else if (enabled) {
1925 LOG_ERROR(
"The selected interface does not support tracing");
bool is_adapter_initialized(void)
int adapter_init(struct command_context *cmd_ctx)
Do low-level setup like initializing registers, output signals, and clocking.
bool transport_is_dapdirect_swd(void)
Returns true if the current debug session is using SWD as its transport.
bool transport_is_dapdirect_jtag(void)
Returns true if the current debug session is using JTAG as its transport.
bool transport_is_swd(void)
Returns true if the current debug session is using SWD as its transport.
char * buf_to_hex_str(const void *_buf, unsigned buf_len)
bool buf_cmp(const void *_buf1, const void *_buf2, unsigned size)
bool buf_cmp_mask(const void *_buf1, const void *_buf2, const void *_mask, unsigned size)
void * buf_set_ones(void *_buf, unsigned size)
Set the contents of buf with count bits, all set to 1.
static uint32_t buf_get_u32(const uint8_t *_buffer, unsigned first, unsigned num)
Retrieves num bits from _buffer, starting at the first bit, returning the bits in a 32-bit word.
static void buf_set_u32(uint8_t *_buffer, unsigned first, unsigned num, uint32_t value)
Sets num bits in _buffer, starting at the first bit, using the bits in value.
static uint64_t buf_get_u64(const uint8_t *_buffer, unsigned first, unsigned num)
Retrieves num bits from _buffer, starting at the first bit, returning the bits in a 64-bit word.
#define ERROR_COMMAND_SYNTAX_ERROR
struct jtag_command * jtag_command_queue_get(void)
static struct esp_usb_jtag * priv
bool transport_is_hla(void)
bool tap_is_state_stable(tap_state_t astate)
Function tap_is_state_stable returns true if the astate is stable.
tap_state_t tap_state_transition(tap_state_t cur_state, bool tms)
Function tap_state_transition takes a current TAP state and returns the next state according to the t...
const char * tap_state_name(tap_state_t state)
Function tap_state_name Returns a string suitable for display representing the JTAG tap_state.
int tap_get_tms_path(tap_state_t from, tap_state_t to)
This function provides a "bit sequence" indicating what has to be done with TMS during a sequence of ...
int tap_get_tms_path_len(tap_state_t from, tap_state_t to)
Function int tap_get_tms_path_len returns the total number of bits that represents a TMS path transit...
#define DEBUG_CAP_TMS_SEQ
#define tap_set_state(new_state)
This function sets the state of a "state follower" which tracks the state of the TAPs connected to th...
int ipdbg_register_commands(struct command_context *cmd_ctx)
static const char * jep106_manufacturer(unsigned int manufacturer)
void jtag_set_error(int error)
Set the current JTAG core execution error, unless one was set by a previous call previously.
int jtag_unregister_event_callback(jtag_event_handler_t callback, void *priv)
void jtag_poll_unmask(bool saved)
Restore saved mask for polling.
static void jtag_add_ir_scan_noverify_callback(struct jtag_tap *active, int dummy, const struct scan_field *in_fields, tap_state_t state)
struct jtag_tap * jtag_tap_by_string(const char *s)
int jtag_init_inner(struct command_context *cmd_ctx)
static void jtag_checks(void)
void jtag_execute_queue_noclear(void)
same as jtag_execute_queue() but does not clear the error flag
static void jtag_constructor(void)
int jtag_add_tms_seq(unsigned nbits, const uint8_t *seq, enum tap_state state)
If supported by the underlying adapter, this clocks a raw bit sequence onto TMS for switching between...
static int jtag_check_value_inner(uint8_t *captured, uint8_t *in_check_value, uint8_t *in_check_mask, int num_bits)
#define END_OF_CHAIN_FLAG
static int jtag_validate_ircapture(void)
int adapter_resets(int trst, int srst)
void jtag_set_ntrst_assert_width(unsigned delay)
static int jtag_examine_chain_execute(uint8_t *idcode_buffer, unsigned num_idcode)
static bool jtag_examine_chain_end(uint8_t *idcodes, unsigned count, unsigned max)
This helper checks that remaining bits in the examined chain data are all as expected,...
void jtag_add_plain_dr_scan(int num_bits, const uint8_t *out_bits, uint8_t *in_bits, tap_state_t state)
Scan out the bits in ir scan mode.
static int adapter_system_reset(int req_srst)
static int jtag_flush_queue_sleep
void jtag_add_pathmove(int num_states, const tap_state_t *path)
Application code must assume that interfaces will implement transitions between states with different...
void jtag_set_ntrst_delay(unsigned delay)
void jtag_add_reset(int req_tlr_or_trst, int req_srst)
A reset of the TAP state machine can be requested.
void jtag_add_plain_ir_scan(int num_bits, const uint8_t *out_bits, uint8_t *in_bits, tap_state_t state)
Scan out the bits in ir scan mode.
int jtag_init(struct command_context *cmd_ctx)
Initialize JTAG chain using only a RESET reset.
void jtag_poll_set_enabled(bool value)
Assign flag reporting whether JTAG polling is disallowed.
static const char * jtag_event_strings[]
static bool jtag_examine_chain_check(uint8_t *idcodes, unsigned count)
int jtag_srst_asserted(int *srst_asserted)
bool transport_is_jtag(void)
Returns true if the current debug session is using JTAG as its transport.
static int jtag_select(struct command_context *ctx)
static int jtag_ntrst_assert_width
void jtag_add_clocks(int num_cycles)
Function jtag_add_clocks first checks that the state in which the clocks are to be issued is stable,...
int jtag_execute_queue(void)
For software FIFO implementations, the queued commands can be executed during this call or earlier.
unsigned jtag_tap_count_enabled(void)
unsigned jtag_get_ntrst_delay(void)
void jtag_set_flush_queue_sleep(int ms)
Set ms to sleep after jtag_execute_queue() flushes queue.
bool is_jtag_poll_safe(void)
Return true if it's safe for a background polling task to access the JTAG scan chain.
const char * jtag_tap_name(const struct jtag_tap *tap)
void jtag_add_dr_scan_check(struct jtag_tap *active, int in_num_fields, struct scan_field *in_fields, tap_state_t state)
A version of jtag_add_dr_scan() that uses the check_value/mask fields.
int adapter_config_trace(bool enabled, enum tpiu_pin_protocol pin_protocol, uint32_t port_size, unsigned int *trace_freq, unsigned int traceclkin_freq, uint16_t *prescaler)
static int jtag_examine_chain(void)
struct jtag_tap * jtag_all_taps(void)
int jtag_power_dropout(int *dropout)
int adapter_poll_trace(uint8_t *buf, size_t *size)
tap_state_t cmd_queue_cur_state
The current TAP state of the pending JTAG command queue.
struct jtag_tap * jtag_tap_by_position(unsigned n)
int jtag_add_statemove(tap_state_t goal_state)
jtag_add_statemove() moves from the current state to goal_state.
void jtag_set_nsrst_assert_width(unsigned delay)
int swd_init_reset(struct command_context *cmd_ctx)
static int adapter_nsrst_delay
static void legacy_jtag_add_reset(int req_tlr_or_trst, int req_srst)
int jtag_get_flush_queue_count(void)
unsigned jtag_get_nsrst_delay(void)
static struct transport jtag_transport
int jtag_init_reset(struct command_context *cmd_ctx)
reset, then initialize JTAG chain
int jtag_register_event_callback(jtag_event_handler_t callback, void *priv)
struct jtag_tap * jtag_tap_next_enabled(struct jtag_tap *p)
void jtag_add_tlr(void)
Run a TAP_RESET reset where the end state is TAP_RESET, regardless of the start state.
void jtag_set_nsrst_delay(unsigned delay)
unsigned jtag_tap_count(void)
static struct jtag_tap * __jtag_all_taps
List all TAPs that have been created.
static enum reset_types jtag_reset_config
static void jtag_tap_add(struct jtag_tap *t)
Append a new TAP to the chain of all taps.
bool jtag_poll_get_enabled(void)
Return flag reporting whether JTAG polling is disallowed.
bool jtag_will_verify(void)
int jtag_call_event_callbacks(enum jtag_event event)
unsigned jtag_get_ntrst_assert_width(void)
void jtag_set_verify_capture_ir(bool enable)
Enable or disable verification of IR scan checking.
static void jtag_examine_chain_display(enum log_levels level, const char *msg, const char *name, uint32_t idcode)
void jtag_add_sleep(uint32_t us)
bool jtag_will_verify_capture_ir(void)
static bool jtag_verify_capture_ir
void jtag_tap_free(struct jtag_tap *tap)
static bool jtag_idcode_is_final(uint32_t idcode)
static int jtag_reset_callback(enum jtag_event event, void *priv)
static int jtag_flush_queue_count
The number of JTAG queue flushes (for profiling and debugging purposes).
int adapter_deassert_reset(void)
static void jtag_prelude(tap_state_t state)
void jtag_check_value_mask(struct scan_field *field, uint8_t *value, uint8_t *mask)
Execute jtag queue and check value with an optional mask.
void jtag_add_ir_scan(struct jtag_tap *active, struct scan_field *in_fields, tap_state_t state)
Generate an IR SCAN with a list of scan fields with one entry for each enabled TAP.
static struct jtag_event_callback * jtag_event_callbacks
static int jtag_check_value_mask_callback(jtag_callback_data_t data0, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3)
#define JTAG_MAX_AUTO_TAPS
void jtag_sleep(uint32_t us)
static int jtag_error
The jtag_error variable is set when an error occurs while executing the queue.
void jtag_add_runtest(int num_cycles, tap_state_t state)
Goes to TAP_IDLE (if we're not already there), cycle precisely num_cycles in the TAP_IDLE state,...
struct adapter_driver * adapter_driver
unsigned jtag_get_nsrst_assert_width(void)
void jtag_tap_init(struct jtag_tap *tap)
void jtag_set_reset_config(enum reset_types type)
int jtag_error_clear(void)
Resets jtag_error to ERROR_OK, returning its previous value.
int default_interface_jtag_execute_queue(void)
Calls the interface callback to execute the queue.
enum reset_types jtag_get_reset_config(void)
void jtag_add_ir_scan_noverify(struct jtag_tap *active, const struct scan_field *in_fields, tap_state_t state)
The same as jtag_add_ir_scan except no verification is performed out the output values.
static bool jtag_examine_chain_match_tap(const struct jtag_tap *tap)
int adapter_assert_reset(void)
static int jtag_ntrst_delay
static int adapter_nsrst_assert_width
void jtag_add_dr_scan(struct jtag_tap *active, int in_num_fields, const struct scan_field *in_fields, tap_state_t state)
Generate a DR SCAN using the fields passed to the function.
bool jtag_poll_mask(void)
Mask (disable) polling and return the current mask status that should be feed to jtag_poll_unmask() t...
void jtag_set_verify(bool enable)
Enable or disable data scan verification checking.
static void jtag_add_scan_check(struct jtag_tap *active, void(*jtag_add_scan)(struct jtag_tap *active, int in_num_fields, const struct scan_field *in_fields, tap_state_t state), int in_num_fields, struct scan_field *in_fields, tap_state_t state)
int interface_jtag_add_clocks(int num_cycles)
int interface_jtag_add_plain_dr_scan(int num_bits, const uint8_t *out_bits, uint8_t *in_bits, tap_state_t state)
int interface_add_tms_seq(unsigned num_bits, const uint8_t *seq, enum tap_state state)
int interface_jtag_execute_queue(void)
int interface_jtag_add_plain_ir_scan(int num_bits, const uint8_t *out_bits, uint8_t *in_bits, tap_state_t state)
void jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3)
int interface_jtag_add_dr_scan(struct jtag_tap *active, int in_num_fields, const struct scan_field *in_fields, tap_state_t state)
see jtag_add_dr_scan()
int interface_jtag_add_reset(int req_trst, int req_srst)
This drives the actual srst and trst pins.
int interface_jtag_add_ir_scan(struct jtag_tap *active, const struct scan_field *in_fields, tap_state_t state)
see jtag_add_ir_scan()
int interface_jtag_add_pathmove(int num_states, const tap_state_t *path)
int interface_jtag_add_sleep(uint32_t us)
int interface_jtag_add_runtest(int num_cycles, tap_state_t state)
int interface_jtag_add_tlr(void)
The JTAG interface can be implemented with a software or hardware fifo.
int jtag_register_commands(struct command_context *cmd_ctx)
int(* jtag_event_handler_t)(enum jtag_event event, void *priv)
Defines the function signature required for JTAG event callback functions, which are added with jtag_...
tap_state
Defines JTAG Test Access Port states.
#define ERROR_JTAG_NOT_STABLE_STATE
#define ERROR_JTAG_QUEUE_FAILED
#define ERROR_JTAG_INIT_FAILED
#define ERROR_JTAG_TRANSITION_INVALID
#define ERROR_JTAG_INIT_SOFT_FAIL
enum tap_state tap_state_t
Defines JTAG Test Access Port states.
#define ERROR_JTAG_STATE_INVALID
#define ERROR_JTAG_NOT_IMPLEMENTED
void jtag_notify_event(enum jtag_event)
Report Tcl event to all TAPs.
#define SRST_DEASSERT
Defines arguments for reset functions.
intptr_t jtag_callback_data_t
Defines the type of data passed to the jtag_callback_t interface.
void log_printf_lf(enum log_levels level, const char *file, unsigned line, const char *function, const char *format,...)
void alive_sleep(uint64_t ms)
char * alloc_printf(const char *format,...)
#define LOG_DEBUG_IO(expr ...)
#define LOG_WARNING(expr ...)
#define LOG_ERROR(expr ...)
#define LOG_INFO(expr ...)
#define LOG_DEBUG(expr ...)
static uint32_t bit(uint32_t value, unsigned int b)
uint8_t bits[QN908X_FLASH_MAX_BLOCKS *QN908X_FLASH_PAGES_PER_BLOCK/8]
struct qn908x_flash_bank __attribute__
size_t size
Size of the control block search area.
Represents a driver for a debugging interface.
struct jtag_interface * jtag_ops
Low-level JTAG APIs.
int(* config_trace)(bool enabled, enum tpiu_pin_protocol pin_protocol, uint32_t port_size, unsigned int *trace_freq, unsigned int traceclkin_freq, uint16_t *prescaler)
Configure trace parameters for the adapter.
int(* reset)(int srst, int trst)
Control (assert/deassert) the signals SRST and TRST on the interface.
int(* power_dropout)(int *power_dropout)
Read and clear the power dropout flag.
int(* poll_trace)(uint8_t *buf, size_t *size)
Poll for new trace data.
int(* srst_asserted)(int *srst_asserted)
Read and clear the srst asserted detection flag.
Contains a single callback along with a pointer that will be passed when an event occurs.
void * priv
the private data to pass to the callback
struct jtag_event_callback * next
the next callback
jtag_event_handler_t callback
a event callback
unsigned supported
Bit vector listing capabilities exposed by this driver.
int(* execute_queue)(struct jtag_command *cmd_queue)
Execute commands in the supplied queue.
struct jtag_tap_event_action * next
Jim_Obj * body
Contains a script to 'eval' when the event is triggered.
Jim_Interp * interp
The interpreter to use for evaluating the body.
uint32_t ir_capture_value
bool bypass
Bypass register selected.
uint8_t * expected_mask
Capture-IR expected mask.
bool ignore_version
Flag saying whether to ignore version field in expected_ids[].
bool disabled_after_reset
Is this TAP disabled after JTAG reset?
struct jtag_tap_event_action * event_action
uint8_t * cur_instr
current instruction
int ir_length
size of instruction register
uint8_t * expected
Capture-IR expected value.
uint8_t expected_ids_cnt
Number of expected identification codes.
bool has_idcode
not all devices have idcode, we'll discover this during chain examination
bool ignore_bypass
Flag saying whether to ignore the bypass bit in the code.
bool enabled
Is this TAP currently enabled?
uint32_t * expected_ids
Array of expected identification codes.
struct jtag_tap * next_tap
uint32_t idcode
device identification code
This structure defines a single scan field in the scan.
int num_bits
The number of bits this field specifies.
uint8_t * in_value
A pointer to a 32-bit memory location for data scanned out.
uint8_t * check_value
The value used to check the data scanned out.
const uint8_t * out_value
A pointer to value to be scanned into the device.
uint8_t * check_mask
The mask to go with check_value.
Wrapper for transport lifecycle operations.
const char * name
Each transport has a unique name, used to select it from among the alternatives.
int svf_register_commands(struct command_context *cmd_ctx)
bool transport_is_swim(void)
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.
#define ARRAY_SIZE(x)
Compute the number of elements of a variable length array.
#define DIV_ROUND_UP(m, n)
Rounds m up to the nearest multiple of n using division.
int xsvf_register_commands(struct command_context *cmd_ctx)