48 void (*jtag_add_scan)(
struct jtag_tap *active,
221 unsigned int jtag_num_taps = 0;
265 LOG_WARNING(
"Specify TAP '%s' by name, not number %u",
296 while ((*callbacks_p)->next)
297 callbacks_p = &((*callbacks_p)->next);
298 callbacks_p = &((*callbacks_p)->next);
302 (*callbacks_p)->callback =
callback;
303 (*callbacks_p)->priv =
priv;
304 (*callbacks_p)->next =
NULL;
317 if (((*p)->priv !=
priv) || ((*p)->callback !=
callback)) {
407 num_bits, out_bits, in_bits,
state);
412 uint8_t *in_check_mask,
int num_bits);
432 jtag_add_scan(active, in_num_fields, in_fields,
state);
434 for (
int i = 0; i < in_num_fields; i++) {
435 if ((in_fields[i].check_value) && (in_fields[i].in_value)) {
529 LOG_ERROR(
"BUG: TAP path doesn't finish in a stable state");
534 for (
unsigned int i = 0; i < num_states; i++) {
536 LOG_ERROR(
"BUG: TAP_RESET is not a valid state for pathmove sequences");
543 LOG_ERROR(
"BUG: %s -> %s isn't a valid TAP transition",
561 if (goal_state != cur_state) {
572 else if (goal_state == cur_state)
581 for (
unsigned int i = 0; i < tms_count; i++, tms_bits >>= 1) {
582 bool bit = tms_bits & 1;
585 moves[i] = cur_state;
608 LOG_ERROR(
"jtag_add_clocks() called with TAP in unstable state \"%s\"",
614 if (num_cycles > 0) {
636 LOG_ERROR(
"Adapter driver does not implement SRST handling");
664 int trst_with_tlr = 0;
682 && !req_tlr_or_trst) {
683 LOG_ERROR(
"BUG: can't assert only SRST");
697 if (req_tlr_or_trst) {
744 LOG_DEBUG(
"JTAG reset with TLR instead of TRST");
774 int trst_with_tlr = 0;
797 && !req_tlr_or_trst) {
798 LOG_ERROR(
"BUG: can't assert only SRST");
812 if (req_tlr_or_trst) {
856 LOG_DEBUG(
"JTAG reset with TLR instead of TRST");
891 uint8_t *in_check_mask,
int num_bits)
897 compare_failed = !
buf_eq_mask(captured, in_check_value, in_check_mask, num_bits);
899 compare_failed = !
buf_eq(captured, in_check_value, num_bits);
901 if (compare_failed) {
902 char *captured_str, *in_check_value_str;
910 LOG_WARNING(
"Bad value '%s' captured during DR or IR scan:",
912 LOG_WARNING(
" check_value: 0x%s", in_check_value_str);
915 free(in_check_value_str);
918 char *in_check_mask_str;
921 LOG_WARNING(
" check_mask: 0x%s", in_check_mask_str);
922 free(in_check_mask_str);
948 LOG_ERROR(
"No JTAG interface configured yet. "
949 "Issue 'init' command in startup scripts "
950 "before communicating with targets.");
962 LOG_ERROR(
"JTAG API jtag_execute_queue() called on non JTAG interface");
974 cmd->cmd.scan->ir_scan ?
"IR" :
"DR",
976 for (
unsigned int i = 0; i <
cmd->cmd.scan->num_fields; i++) {
996 cmd->cmd.runtest->num_cycles,
1001 const char *reset_str[3] = {
1002 "leave",
"deassert",
"assert"
1005 reset_str[
cmd->cmd.reset->trst + 1],
1006 reset_str[
cmd->cmd.reset->srst + 1]);
1083 #define JTAG_MAX_AUTO_TAPS 20
1085 #define EXTRACT_MFG(X) (((X) & 0xffe) >> 1)
1086 #define EXTRACT_PART(X) (((X) & 0xffff000) >> 12)
1087 #define EXTRACT_VER(X) (((X) & 0xf0000000) >> 28)
1092 #define END_OF_CHAIN_FLAG 0xffffffff
1095 #define JTAG_IRLEN_MAX 60
1101 .out_value = idcode_buffer,
1102 .in_value = idcode_buffer,
1106 for (
unsigned int i = 0; i < num_idcode; i++)
1116 uint8_t zero_check = 0x0;
1117 uint8_t one_check = 0xff;
1119 for (
unsigned int i = 0; i <
count * 4; i++) {
1120 zero_check |= idcodes[i];
1121 one_check &= idcodes[i];
1134 if (zero_check == 0x00 || one_check == 0xff) {
1135 LOG_ERROR(
"JTAG scan chain interrogation failed: all %s",
1136 (zero_check == 0x00) ?
"zeroes" :
"ones");
1137 LOG_ERROR(
"Check JTAG interface, timings, target power, etc.");
1144 const char *
name, uint32_t idcode)
1147 "JTAG tap: %s %16.16s: 0x%08x "
1148 "(mfg: 0x%3.3x (%s), part: 0x%4.4x, ver: 0x%1.1x)",
1150 (
unsigned int)idcode,
1177 bool triggered =
false;
1184 LOG_WARNING(
"Unexpected idcode after end of chain: %d 0x%08x",
1185 count, (
unsigned int)idcode);
1205 if (idcode == expected)
1219 snprintf(msg,
sizeof(msg),
"expected %u of %u", i + 1, tap->
expected_ids_cnt);
1241 uint8_t *idcode_buffer = calloc(4, max_taps);
1248 LOG_DEBUG(
"DR scan interrogation for IDCODE/BYPASS");
1260 unsigned int bit_count = 0;
1261 unsigned int autocount = 0;
1262 for (
unsigned int i = 0; i < max_taps; i++) {
1263 assert(bit_count < max_taps * 32);
1277 tap = calloc(1,
sizeof(*tap));
1298 LOG_INFO(
"TAP %s does not have valid IDCODE (idcode=0x%" PRIx32
")",
1324 LOG_ERROR(
"double-check your JTAG setup (interface, speed, ...)");
1333 free(idcode_buffer);
1348 uint8_t *ir_test =
NULL;
1354 unsigned int total_ir_length = 0;
1363 total_ir_length += 2;
1378 LOG_DEBUG(
"IR capture validation scan");
1413 LOG_WARNING(
"AUTO %s - use \"jtag newtap %s %s -irlen %u "
1414 "-expected-id 0x%08" PRIx32
"\"",
1427 LOG_ERROR(
"%s: IR capture error; saw 0x%0*" PRIx64
" not 0x%0*" PRIx32,
1441 uint64_t val =
buf_get_u64(ir_test, chain_pos, 2);
1445 LOG_ERROR(
"IR capture error at bit %d, saw 0x%s not 0x...3",
1462 unsigned int ir_len_bits;
1463 unsigned int ir_len_bytes;
1469 tap->
expected = calloc(1, ir_len_bytes);
1474 if (ir_len_bits > 32)
1488 LOG_DEBUG(
"Created Tap: %s @ abs position %u, "
1489 "irlen %u, capture: 0x%" PRIx32
" mask: 0x%" PRIx32, tap->
dotted_name,
1501 Jim_DecrRefCount(jteap->
interp, jteap->
body);
1520 bool issue_setup =
true;
1538 "AUTO PROBING MIGHT NOT WORK!!");
1567 LOG_ERROR(
"Trying to use configured scan chain anyway...");
1568 issue_setup =
false;
1584 issue_setup =
false;
1590 LOG_WARNING(
"Bypassing JTAG setup events due to errors");
1598 int retval, retval1;
1604 LOG_DEBUG(
"Initializing with hard SRST reset");
1610 return (retval ==
ERROR_OK) ? retval1 : retval;
1619 LOG_DEBUG(
"Initializing with hard TRST+SRST reset");
1658 LOG_WARNING(
"\'srst_nogate\' reset_config option is required");
1691 LOG_WARNING(
"\'srst_nogate\' reset_config option is required");
1697 if (Jim_Eval_Named(cmd_ctx->
interp,
"jtag_init", __FILE__, __LINE__) != JIM_OK)
1728 LOG_ERROR(
"No Valid JTAG Interface Configured.");
1854 LOG_ERROR(
"adapter has no srst signal");
1870 LOG_ERROR(
"transport %s has no trst signal",
1876 LOG_ERROR(
"adapter has no srst signal");
1886 LOG_ERROR(
"reset is not supported on transport %s",
1905 LOG_ERROR(
"reset is not supported on %s",
1922 LOG_ERROR(
"reset is not supported on %s",
1930 uint32_t port_size,
unsigned int *trace_freq,
1931 unsigned int traceclkin_freq, uint16_t *prescaler)
1935 traceclkin_freq, prescaler);
1936 }
else if (enabled) {
1937 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 int buf_len)
void * buf_set_ones(void *_buf, unsigned int size)
Set the contents of buf with count bits, all set to 1.
bool buf_eq_mask(const void *_buf1, const void *_buf2, const void *_mask, unsigned int size)
bool buf_eq(const void *_buf1, const void *_buf2, unsigned int size)
static uint32_t buf_get_u32(const uint8_t *_buffer, unsigned int first, unsigned int 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 int first, unsigned int 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 int first, unsigned int 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)
uint32_t size
Size of dw_spi_transaction::buffer.
static struct esp_usb_jtag * priv
bool transport_is_hla(void)
enum tap_state tap_state_transition(enum tap_state 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(enum tap_state state)
Function tap_state_name Returns a string suitable for display representing the JTAG tap_state.
int tap_get_tms_path_len(enum tap_state from, enum tap_state to)
Function int tap_get_tms_path_len returns the total number of bits that represents a TMS path transit...
bool tap_is_state_stable(enum tap_state astate)
Function tap_is_state_stable returns true if the astate is stable.
int tap_get_tms_path(enum tap_state from, enum tap_state to)
This function provides a "bit sequence" indicating what has to be done with TMS during a sequence of ...
#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)
static unsigned int jtag_tap_count(void)
void jtag_poll_unmask(bool saved)
Restore saved mask for polling.
void jtag_add_plain_dr_scan(int num_bits, const uint8_t *out_bits, uint8_t *in_bits, enum tap_state state)
Scan out the bits in ir scan mode.
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)
static unsigned int jtag_ntrst_delay
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)
unsigned int jtag_get_ntrst_assert_width(void)
static int adapter_system_reset(int req_srst)
static int jtag_flush_queue_sleep
unsigned int jtag_tap_count_enabled(void)
void jtag_add_dr_scan_check(struct jtag_tap *active, int in_num_fields, struct scan_field *in_fields, enum tap_state state)
A version of jtag_add_dr_scan() that uses the check_value/mask fields.
static unsigned int jtag_ntrst_assert_width
void jtag_add_reset(int req_tlr_or_trst, int req_srst)
A reset of the TAP state machine can be requested.
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[]
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)
unsigned int jtag_get_nsrst_delay(void)
static unsigned int adapter_nsrst_delay
void jtag_add_runtest(unsigned int num_cycles, enum tap_state state)
Goes to TAP_IDLE (if we're not already there), cycle precisely num_cycles in the TAP_IDLE state,...
int jtag_execute_queue(void)
For software FIFO implementations, the queued commands can be executed during this call or earlier.
void jtag_add_pathmove(unsigned int num_states, const enum tap_state *path)
Application code must assume that interfaces will implement transitions between states with different...
static unsigned int adapter_nsrst_assert_width
static int jtag_examine_chain_execute(uint8_t *idcode_buffer, unsigned int num_idcode)
void jtag_add_clocks(unsigned int num_cycles)
Function jtag_add_clocks first checks that the state in which the clocks are to be issued is stable,...
void jtag_add_ir_scan_noverify(struct jtag_tap *active, const struct scan_field *in_fields, enum tap_state state)
The same as jtag_add_ir_scan except no verification is performed out the output values.
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)
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)
int jtag_add_statemove(enum tap_state goal_state)
jtag_add_statemove() moves from the current state to goal_state.
unsigned int jtag_get_nsrst_assert_width(void)
static bool jtag_examine_chain_end(uint8_t *idcodes, unsigned int count, unsigned int max)
This helper checks that remaining bits in the examined chain data are all as expected,...
int swd_init_reset(struct command_context *cmd_ctx)
static void legacy_jtag_add_reset(int req_tlr_or_trst, int req_srst)
static struct transport jtag_transport
void jtag_set_nsrst_assert_width(unsigned int delay)
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.
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.
void jtag_add_dr_scan(struct jtag_tap *active, int in_num_fields, const struct scan_field *in_fields, enum tap_state state)
Generate a DR SCAN using the fields passed to the function.
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)
void jtag_set_ntrst_delay(unsigned int delay)
void jtag_set_verify_capture_ir(bool enable)
Enable or disable verification of IR scan checking.
unsigned int jtag_get_ntrst_delay(void)
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)
struct jtag_tap * jtag_tap_by_position(unsigned int n)
static bool jtag_idcode_is_final(uint32_t idcode)
static int jtag_reset_callback(enum jtag_event event, void *priv)
static unsigned int jtag_flush_queue_count
The number of JTAG queue flushes (for profiling and debugging purposes).
unsigned int jtag_get_flush_queue_count(void)
int adapter_deassert_reset(void)
static bool jtag_examine_chain_check(uint8_t *idcodes, unsigned int count)
static void jtag_add_ir_scan_noverify_callback(struct jtag_tap *active, int dummy, const struct scan_field *in_fields, enum tap_state state)
enum tap_state cmd_queue_cur_state
The current TAP state of the pending JTAG command queue.
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.
static struct jtag_event_callback * jtag_event_callbacks
void jtag_set_nsrst_delay(unsigned int delay)
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.
int jtag_add_tms_seq(unsigned int 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...
struct adapter_driver * adapter_driver
void jtag_tap_init(struct jtag_tap *tap)
void jtag_add_plain_ir_scan(int num_bits, const uint8_t *out_bits, uint8_t *in_bits, enum tap_state state)
Scan out the bits in ir scan mode.
void jtag_set_reset_config(enum reset_types type)
int default_interface_jtag_execute_queue(void)
Calls the interface callback to execute the queue.
enum reset_types jtag_get_reset_config(void)
static int jtag_error_clear(void)
Resets jtag_error to ERROR_OK, returning its previous value.
static bool jtag_examine_chain_match_tap(const struct jtag_tap *tap)
void jtag_add_ir_scan(struct jtag_tap *active, struct scan_field *in_fields, enum tap_state state)
Generate an IR SCAN with a list of scan fields with one entry for each enabled TAP.
int adapter_assert_reset(void)
void jtag_set_ntrst_assert_width(unsigned int delay)
bool jtag_poll_mask(void)
Mask (disable) polling and return the current mask status that should be feed to jtag_poll_unmask() t...
static void jtag_prelude(enum tap_state state)
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, enum tap_state state), int in_num_fields, struct scan_field *in_fields, enum tap_state state)
void jtag_set_verify(bool enable)
Enable or disable data scan verification checking.
int interface_jtag_add_plain_ir_scan(int num_bits, const uint8_t *out_bits, uint8_t *in_bits, enum tap_state state)
int interface_jtag_add_ir_scan(struct jtag_tap *active, const struct scan_field *in_fields, enum tap_state state)
see jtag_add_ir_scan()
int interface_jtag_execute_queue(void)
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_add_tms_seq(unsigned int num_bits, const uint8_t *seq, enum tap_state state)
int interface_jtag_add_reset(int req_trst, int req_srst)
This drives the actual srst and trst pins.
int interface_jtag_add_plain_dr_scan(int num_bits, const uint8_t *out_bits, uint8_t *in_bits, enum tap_state state)
int interface_jtag_add_pathmove(unsigned int num_states, const enum tap_state *path)
int interface_jtag_add_dr_scan(struct jtag_tap *active, int in_num_fields, const struct scan_field *in_fields, enum tap_state state)
see jtag_add_dr_scan()
int interface_jtag_add_sleep(uint32_t us)
int interface_jtag_add_clocks(unsigned int num_cycles)
int interface_jtag_add_runtest(unsigned int num_cycles, enum tap_state 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
#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 int line, const char *function, const char *format,...)
void alive_sleep(uint64_t ms)
char * alloc_printf(const char *format,...)
#define ERROR_NOT_IMPLEMENTED
#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__
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 int 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
unsigned 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
unsigned int abs_chain_position
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.
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.
unsigned int num_bits
The number of bits this field specifies.
uint8_t * check_mask
The mask to go with check_value.
Wrapper for transport lifecycle operations.
unsigned int id
Each transport has a unique ID, used to select it from among the alternatives.
int svf_register_commands(struct command_context *cmd_ctx)
bool transport_is_swim(void)
const char * get_current_transport_name(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)