OpenOCD
jlink.c File Reference
Include dependency graph for jlink.c:

Go to the source code of this file.

Data Structures

struct  device_config
 
struct  pending_scan_result
 

Macros

#define JLINK_MAX_SPEED   12000
 
#define JLINK_TAP_BUFFER_SIZE   2048
 
#define MAX_PENDING_SCAN_RESULTS   256
 
#define SWO_MAX_FREQ_DEV   0.03
 

Functions

struct device_config __attribute__ ((packed))
 
static bool adjust_swd_buffer_size (void)
 
static bool calculate_swo_prescaler (unsigned int traceclkin_freq, uint32_t trace_freq, uint16_t *prescaler)
 
static uint32_t calculate_trace_buffer_size (void)
 
 COMMAND_HANDLER (jlink_handle_config_command)
 
 COMMAND_HANDLER (jlink_handle_config_ip_address_command)
 
 COMMAND_HANDLER (jlink_handle_config_mac_address_command)
 
 COMMAND_HANDLER (jlink_handle_config_reset_command)
 
 COMMAND_HANDLER (jlink_handle_config_target_power_command)
 
 COMMAND_HANDLER (jlink_handle_config_usb_address_command)
 
 COMMAND_HANDLER (jlink_handle_config_write_command)
 
 COMMAND_HANDLER (jlink_handle_emucom_read_command)
 
 COMMAND_HANDLER (jlink_handle_emucom_write_command)
 
 COMMAND_HANDLER (jlink_handle_free_memory_command)
 
 COMMAND_HANDLER (jlink_handle_hwstatus_command)
 
 COMMAND_HANDLER (jlink_handle_jlink_jtag_command)
 
 COMMAND_HANDLER (jlink_handle_target_power_command)
 
 COMMAND_HANDLER (jlink_usb_command)
 
static 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)
 
static void cpy_ip (uint8_t *dst, uint8_t *src)
 
static bool detect_swo_freq_and_prescaler (struct jaylink_swo_speed speed, unsigned int traceclkin_freq, unsigned int *trace_freq, uint16_t *prescaler)
 
static void fill_buffer (uint8_t *buf, uint32_t val, uint32_t len)
 
static int jaylink_log_handler (const struct jaylink_context *ctx, enum jaylink_log_level level, const char *format, va_list args, void *user_data)
 
static void jlink_clock_data (const uint8_t *out, unsigned out_offset, const uint8_t *tms_out, unsigned tms_offset, uint8_t *in, unsigned in_offset, unsigned length)
 Queue data to go out and in, flushing the queue as many times as necessary. More...
 
static void jlink_end_state (tap_state_t state)
 
static int jlink_execute_command (struct jtag_command *cmd)
 
static void jlink_execute_pathmove (struct jtag_command *cmd)
 
static int jlink_execute_queue (void)
 
static void jlink_execute_runtest (struct jtag_command *cmd)
 
static void jlink_execute_scan (struct jtag_command *cmd)
 
static void jlink_execute_sleep (struct jtag_command *cmd)
 
static void jlink_execute_stableclocks (struct jtag_command *cmd)
 
static void jlink_execute_statemove (struct jtag_command *cmd)
 
static int jlink_flush (void)
 
static int jlink_init (void)
 
static int jlink_khz (int khz, int *jtag_speed)
 
static int jlink_open_device (uint32_t ifaces, bool *found_device)
 
static void jlink_path_move (int num_states, tap_state_t *path)
 
static void jlink_queue_data_in (uint32_t len)
 
static void jlink_queue_data_out (const uint8_t *data, uint32_t len)
 
static int jlink_quit (void)
 
static int jlink_register (void)
 
static void jlink_reset (int trst, int srst)
 
static int jlink_reset_safe (int trst, int srst)
 
static void jlink_runtest (int num_cycles)
 
static int jlink_speed (int speed)
 
static int jlink_speed_div (int speed, int *khz)
 
static void jlink_stableclocks (int num_cycles)
 
static void jlink_state_move (void)
 
static int jlink_swd_init (void)
 
static void jlink_swd_queue_cmd (uint8_t cmd, uint32_t *dst, uint32_t data, uint32_t ap_delay_clk)
 
static void jlink_swd_read_reg (uint8_t cmd, uint32_t *value, uint32_t ap_delay_clk)
 
static int jlink_swd_run_queue (void)
 
static int jlink_swd_switch_seq (enum swd_special_seq seq)
 
static void jlink_swd_write_reg (uint8_t cmd, uint32_t value, uint32_t ap_delay_clk)
 
static void jlink_tap_init (void)
 
static bool jlink_usb_location_equal (struct jaylink_device *dev)
 
static int poll_trace (uint8_t *buf, size_t *size)
 
static bool read_device_config (struct device_config *cfg)
 
static int select_interface (void)
 
static void show_config (struct command_invocation *cmd)
 
static void show_config_ip_address (struct command_invocation *cmd)
 
static void show_config_mac_address (struct command_invocation *cmd)
 
static void show_config_target_power (struct command_invocation *cmd)
 
static void show_config_usb_address (struct command_invocation *cmd)
 
static bool string_to_ip (const char *s, uint8_t *ip, int *pos)
 

Variables

struct pending_scan_result __attribute__
 
static uint8_t caps [JAYLINK_DEV_EXT_CAPS_SIZE]
 
static struct device_config config
 
static struct jaylink_connection conn
 
static struct jaylink_connection connlist [JAYLINK_MAX_CONNECTIONS]
 
static struct jaylink_device_handle * devh
 
static enum jaylink_target_interface iface = JAYLINK_TIF_JTAG
 
uint8_t ip_address [4]
 
static struct jaylink_context * jayctx
 
struct adapter_driver jlink_adapter_driver
 
static const struct command_registration jlink_command_handlers []
 
static const struct command_registration jlink_config_subcommand_handlers []
 
static const struct command_registration jlink_emucom_subcommand_handlers []
 
static struct jtag_interface jlink_interface
 
static enum tap_state jlink_last_state = TAP_RESET
 
static const struct command_registration jlink_subcommand_handlers []
 
static const struct swd_driver jlink_swd
 
static const char *const jlink_transports [] = { "jtag", "swd", NULL }
 
static enum jaylink_jtag_version jtag_command_version
 
uint8_t mac_address [6]
 
static struct pending_scan_result pending_scan_results_buffer [MAX_PENDING_SCAN_RESULTS]
 
static int pending_scan_results_length
 
static int queued_retval
 
uint8_t reserved_1 [3]
 
uint8_t reserved_2 [24]
 
uint8_t reserved_3 [8]
 
uint8_t reserved_4 [202]
 
static uint32_t serial_number
 
uint8_t subnet_mask [4]
 
static unsigned int swd_buffer_size = JLINK_TAP_BUFFER_SIZE
 
static unsigned tap_length
 
uint32_t target_power
 
static uint8_t tdi_buffer [JLINK_TAP_BUFFER_SIZE]
 
static uint8_t tdo_buffer [JLINK_TAP_BUFFER_SIZE]
 
static struct device_config tmp_config
 
static uint8_t tms_buffer [JLINK_TAP_BUFFER_SIZE]
 
static bool trace_enabled
 
static enum jaylink_usb_address usb_address
 
static bool use_serial_number
 
static bool use_usb_address
 
static bool use_usb_location
 

Macro Definition Documentation

◆ JLINK_MAX_SPEED

#define JLINK_MAX_SPEED   12000

Definition at line 51 of file jlink.c.

◆ JLINK_TAP_BUFFER_SIZE

#define JLINK_TAP_BUFFER_SIZE   2048

Definition at line 52 of file jlink.c.

◆ MAX_PENDING_SCAN_RESULTS

#define MAX_PENDING_SCAN_RESULTS   256

Definition at line 1981 of file jlink.c.

◆ SWO_MAX_FREQ_DEV

#define SWO_MAX_FREQ_DEV   0.03

Definition at line 57 of file jlink.c.

Function Documentation

◆ __attribute__()

struct device_config __attribute__ ( (packed)  )

◆ adjust_swd_buffer_size()

static bool adjust_swd_buffer_size ( void  )
static

Definition at line 454 of file jlink.c.

References caps, devh, JLINK_TAP_BUFFER_SIZE, LOG_DEBUG, LOG_ERROR, MIN, and swd_buffer_size.

Referenced by config_trace(), and jlink_init().

◆ calculate_swo_prescaler()

static bool calculate_swo_prescaler ( unsigned int  traceclkin_freq,
uint32_t  trace_freq,
uint16_t *  prescaler 
)
static

Definition at line 1252 of file jlink.c.

References TPIU_ACPR_MAX_SWOSCALER.

Referenced by config_trace().

◆ calculate_trace_buffer_size()

static uint32_t calculate_trace_buffer_size ( void  )
static

Definition at line 1228 of file jlink.c.

References caps, devh, ERROR_FAIL, and LOG_ERROR.

Referenced by config_trace().

◆ COMMAND_HANDLER() [1/14]

COMMAND_HANDLER ( jlink_handle_config_command  )

Definition at line 1681 of file jlink.c.

References caps, CMD, CMD_ARGC, command_print(), ERROR_OK, and show_config().

◆ COMMAND_HANDLER() [2/14]

◆ COMMAND_HANDLER() [3/14]

COMMAND_HANDLER ( jlink_handle_config_mac_address_command  )

◆ COMMAND_HANDLER() [4/14]

COMMAND_HANDLER ( jlink_handle_config_reset_command  )

Definition at line 1622 of file jlink.c.

References caps, config, ERROR_OK, and tmp_config.

◆ COMMAND_HANDLER() [5/14]

COMMAND_HANDLER ( jlink_handle_config_target_power_command  )

◆ COMMAND_HANDLER() [6/14]

COMMAND_HANDLER ( jlink_handle_config_usb_address_command  )

◆ COMMAND_HANDLER() [7/14]

COMMAND_HANDLER ( jlink_handle_config_write_command  )

◆ COMMAND_HANDLER() [8/14]

COMMAND_HANDLER ( jlink_handle_emucom_read_command  )

◆ COMMAND_HANDLER() [9/14]

COMMAND_HANDLER ( jlink_handle_emucom_write_command  )

◆ COMMAND_HANDLER() [10/14]

COMMAND_HANDLER ( jlink_handle_free_memory_command  )

Definition at line 1017 of file jlink.c.

References caps, CMD, command_print(), devh, ERROR_FAIL, and ERROR_OK.

◆ COMMAND_HANDLER() [11/14]

COMMAND_HANDLER ( jlink_handle_hwstatus_command  )

Definition at line 991 of file jlink.c.

References CMD, command_print(), devh, ERROR_FAIL, ERROR_OK, and status.

◆ COMMAND_HANDLER() [12/14]

COMMAND_HANDLER ( jlink_handle_jlink_jtag_command  )

◆ COMMAND_HANDLER() [13/14]

COMMAND_HANDLER ( jlink_handle_target_power_command  )

◆ COMMAND_HANDLER() [14/14]

COMMAND_HANDLER ( jlink_usb_command  )

◆ config_trace()

static 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 
)
static

◆ cpy_ip()

static void cpy_ip ( uint8_t *  dst,
uint8_t *  src 
)
static

Definition at line 1565 of file jlink.c.

Referenced by COMMAND_HANDLER().

◆ detect_swo_freq_and_prescaler()

static bool detect_swo_freq_and_prescaler ( struct jaylink_swo_speed  speed,
unsigned int  traceclkin_freq,
unsigned int *  trace_freq,
uint16_t *  prescaler 
)
static

Definition at line 1270 of file jlink.c.

References SWO_MAX_FREQ_DEV, and TPIU_ACPR_MAX_SWOSCALER.

Referenced by config_trace().

◆ fill_buffer()

static void fill_buffer ( uint8_t *  buf,
uint32_t  val,
uint32_t  len 
)
static

Definition at line 2070 of file jlink.c.

References buf_set_u32(), and tap_length.

Referenced by jlink_queue_data_in(), and jlink_queue_data_out().

◆ jaylink_log_handler()

static int jaylink_log_handler ( const struct jaylink_context *  ctx,
enum jaylink_log_level  level,
const char *  format,
va_list  args,
void *  user_data 
)
static

Definition at line 486 of file jlink.c.

References LOG_LVL_DEBUG, LOG_LVL_DEBUG_IO, LOG_LVL_ERROR, LOG_LVL_WARNING, and log_vprintf_lf().

Referenced by jlink_init().

◆ jlink_clock_data()

static void jlink_clock_data ( const uint8_t *  out,
unsigned  out_offset,
const uint8_t *  tms_out,
unsigned  tms_offset,
uint8_t *  in,
unsigned  in_offset,
unsigned  length 
)
static

Queue data to go out and in, flushing the queue as many times as necessary.

Parameters
outA pointer to TDI data, if NULL, old stale data will be used.
out_offsetA bit offset for TDI data.
tms_outA pointer to TMS data, if NULL, zeroes will be emitted.
tms_offsetA bit offset for TMS data.
inA pointer to store TDO data to, if NULL the data will be discarded.
in_offsetA bit offset for TDO data.
lengthAmount of bits to transfer out and in.

Definition at line 1994 of file jlink.c.

References buf_set_buf(), pending_scan_result::buffer, pending_scan_result::buffer_offset, ERROR_OK, pending_scan_result::first, jlink_flush(), JLINK_TAP_BUFFER_SIZE, pending_scan_result::length, length, MAX_PENDING_SCAN_RESULTS, pending_scan_results_buffer, pending_scan_results_length, tap_length, tdi_buffer, and tms_buffer.

Referenced by jlink_execute_scan(), jlink_init(), jlink_path_move(), jlink_stableclocks(), and jlink_state_move().

◆ jlink_end_state()

static void jlink_end_state ( tap_state_t  state)
static

◆ jlink_execute_command()

◆ jlink_execute_pathmove()

static void jlink_execute_pathmove ( struct jtag_command cmd)
static

Definition at line 141 of file jlink.c.

References cmd, jlink_path_move(), and LOG_DEBUG_IO.

Referenced by jlink_execute_command().

◆ jlink_execute_queue()

static int jlink_execute_queue ( void  )
static

Definition at line 279 of file jlink.c.

References cmd, ERROR_OK, jlink_execute_command(), jlink_flush(), and jtag_command_queue.

◆ jlink_execute_runtest()

static void jlink_execute_runtest ( struct jtag_command cmd)
static

Definition at line 124 of file jlink.c.

References cmd, jlink_end_state(), jlink_runtest(), and LOG_DEBUG_IO.

Referenced by jlink_execute_command().

◆ jlink_execute_scan()

◆ jlink_execute_sleep()

static void jlink_execute_sleep ( struct jtag_command cmd)
static

Definition at line 243 of file jlink.c.

References cmd, jlink_flush(), jtag_sleep(), and LOG_DEBUG_IO.

Referenced by jlink_execute_command().

◆ jlink_execute_stableclocks()

static void jlink_execute_stableclocks ( struct jtag_command cmd)
static

Definition at line 118 of file jlink.c.

References cmd, jlink_stableclocks(), and LOG_DEBUG_IO.

Referenced by jlink_execute_command().

◆ jlink_execute_statemove()

static void jlink_execute_statemove ( struct jtag_command cmd)
static

Definition at line 133 of file jlink.c.

References cmd, jlink_end_state(), jlink_state_move(), and LOG_DEBUG_IO.

Referenced by jlink_execute_command().

◆ jlink_flush()

◆ jlink_init()

◆ jlink_khz()

static int jlink_khz ( int  khz,
int *  jtag_speed 
)
static

Definition at line 348 of file jlink.c.

References ERROR_OK.

◆ jlink_open_device()

static int jlink_open_device ( uint32_t  ifaces,
bool *  found_device 
)
static

◆ jlink_path_move()

static void jlink_path_move ( int  num_states,
tap_state_t path 
)
static

◆ jlink_queue_data_in()

static void jlink_queue_data_in ( uint32_t  len)
static

Definition at line 2097 of file jlink.c.

References fill_buffer(), tap_length, and tms_buffer.

◆ jlink_queue_data_out()

static void jlink_queue_data_out ( const uint8_t *  data,
uint32_t  len 
)
static

Definition at line 2084 of file jlink.c.

References bit_copy(), fill_buffer(), tap_length, tdi_buffer, and tms_buffer.

Referenced by jlink_swd_run_queue(), and jlink_swd_switch_seq().

◆ jlink_quit()

static int jlink_quit ( void  )
static

Definition at line 835 of file jlink.c.

References caps, conn, connlist, count, devh, ERROR_OK, jayctx, LOG_ERROR, and trace_enabled.

◆ jlink_register()

static int jlink_register ( void  )
static

Definition at line 414 of file jlink.c.

References caps, conn, connlist, count, devh, ERROR_FAIL, ERROR_OK, and LOG_ERROR.

Referenced by jlink_init().

◆ jlink_reset()

static void jlink_reset ( int  trst,
int  srst 
)
static

Definition at line 940 of file jlink.c.

References devh, and LOG_DEBUG.

Referenced by jlink_init(), and jlink_reset_safe().

◆ jlink_reset_safe()

static int jlink_reset_safe ( int  trst,
int  srst 
)
static

Definition at line 958 of file jlink.c.

References jlink_flush(), and jlink_reset().

◆ jlink_runtest()

static void jlink_runtest ( int  num_cycles)
static

◆ jlink_speed()

static int jlink_speed ( int  speed)
static

◆ jlink_speed_div()

static int jlink_speed_div ( int  speed,
int *  khz 
)
static

Definition at line 341 of file jlink.c.

References ERROR_OK.

◆ jlink_stableclocks()

static void jlink_stableclocks ( int  num_cycles)
static

Definition at line 910 of file jlink.c.

References jlink_clock_data(), NULL, tap_get_state(), and TAP_RESET.

Referenced by jlink_execute_stableclocks(), and jlink_runtest().

◆ jlink_state_move()

static void jlink_state_move ( void  )
static

◆ jlink_swd_init()

static int jlink_swd_init ( void  )
static

Definition at line 1942 of file jlink.c.

References ERROR_OK, and iface.

◆ jlink_swd_queue_cmd()

static void jlink_swd_queue_cmd ( uint8_t  cmd,
uint32_t *  dst,
uint32_t  data,
uint32_t  ap_delay_clk 
)
static

Definition at line 2212 of file jlink.c.

Referenced by jlink_swd_read_reg(), and jlink_swd_write_reg().

◆ jlink_swd_read_reg()

static void jlink_swd_read_reg ( uint8_t  cmd,
uint32_t *  value,
uint32_t  ap_delay_clk 
)
static

Definition at line 1955 of file jlink.c.

References cmd, jlink_swd_queue_cmd(), and SWD_CMD_RNW.

◆ jlink_swd_run_queue()

◆ jlink_swd_switch_seq()

◆ jlink_swd_write_reg()

static void jlink_swd_write_reg ( uint8_t  cmd,
uint32_t  value,
uint32_t  ap_delay_clk 
)
static

Definition at line 1949 of file jlink.c.

References cmd, jlink_swd_queue_cmd(), NULL, and SWD_CMD_RNW.

◆ jlink_tap_init()

static void jlink_tap_init ( void  )
static

Definition at line 1986 of file jlink.c.

References pending_scan_results_length, tap_length, tdi_buffer, and tms_buffer.

Referenced by jlink_flush(), jlink_init(), and jlink_swd_run_queue().

◆ jlink_usb_location_equal()

static bool jlink_usb_location_equal ( struct jaylink_device *  dev)
static

Definition at line 519 of file jlink.c.

References adapter_usb_location_equal(), and LOG_WARNING.

Referenced by jlink_open_device().

◆ poll_trace()

static int poll_trace ( uint8_t *  buf,
size_t *  size 
)
static

Definition at line 1209 of file jlink.c.

References devh, ERROR_FAIL, ERROR_OK, length, LOG_ERROR, and size.

◆ read_device_config()

static bool read_device_config ( struct device_config cfg)
static

Definition at line 355 of file jlink.c.

References devh, LOG_ERROR, device_config::target_power, and device_config::usb_address.

Referenced by COMMAND_HANDLER(), and jlink_init().

◆ select_interface()

static int select_interface ( void  )
static

Definition at line 376 of file jlink.c.

References caps, devh, ERROR_JTAG_INIT_FAILED, ERROR_OK, iface, LOG_ERROR, and NULL.

Referenced by jlink_init().

◆ show_config()

static void show_config ( struct command_invocation cmd)
static

◆ show_config_ip_address()

static void show_config_ip_address ( struct command_invocation cmd)
static

◆ show_config_mac_address()

static void show_config_mac_address ( struct command_invocation cmd)
static

Definition at line 1154 of file jlink.c.

References cmd, command_print(), config, device_config::mac_address, and tmp_config.

Referenced by COMMAND_HANDLER(), and show_config().

◆ show_config_target_power()

static void show_config_target_power ( struct command_invocation cmd)
static

Definition at line 1172 of file jlink.c.

References cmd, command_print(), config, target_power, device_config::target_power, and tmp_config.

Referenced by COMMAND_HANDLER(), and show_config().

◆ show_config_usb_address()

static void show_config_usb_address ( struct command_invocation cmd)
static

Definition at line 1120 of file jlink.c.

References cmd, command_print(), config, tmp_config, and device_config::usb_address.

Referenced by COMMAND_HANDLER(), and show_config().

◆ string_to_ip()

static bool string_to_ip ( const char *  s,
uint8_t *  ip,
int *  pos 
)
static

Definition at line 1540 of file jlink.c.

Referenced by COMMAND_HANDLER().

Variable Documentation

◆ __attribute__

struct pending_scan_result __attribute__

◆ caps

◆ config

◆ conn

◆ connlist

struct jaylink_connection connlist[JAYLINK_MAX_CONNECTIONS]
static

Definition at line 37 of file jlink.c.

Referenced by jlink_quit(), and jlink_register().

◆ devh

◆ iface

enum jaylink_target_interface iface = JAYLINK_TIF_JTAG
static

Definition at line 47 of file jlink.c.

Referenced by jlink_init(), jlink_swd_init(), and select_interface().

◆ ip_address

uint8_t ip_address[4]

Definition at line 7 of file jlink.c.

Referenced by COMMAND_HANDLER().

◆ jayctx

struct jaylink_context* jayctx
static

Definition at line 36 of file jlink.c.

Referenced by jlink_init(), jlink_open_device(), and jlink_quit().

◆ jlink_adapter_driver

struct adapter_driver jlink_adapter_driver
Initial value:
= {
.name = "jlink",
.transports = jlink_transports,
.init = &jlink_init,
.quit = &jlink_quit,
.reset = &jlink_reset_safe,
.speed = &jlink_speed,
.khz = &jlink_khz,
.speed_div = &jlink_speed_div,
.config_trace = &config_trace,
.poll_trace = &poll_trace,
.jtag_ops = &jlink_interface,
.swd_ops = &jlink_swd,
}

Definition at line 2262 of file jlink.c.

◆ jlink_command_handlers

const struct command_registration jlink_command_handlers[]
static
Initial value:
= {
{
.name = "jlink",
.mode = COMMAND_ANY,
.help = "perform jlink management",
.usage = "",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:247
@ COMMAND_ANY
Definition: command.h:42
const char * usage
a string listing the options and arguments, required or optional
Definition: command.h:235

Definition at line 1754 of file jlink.c.

◆ jlink_config_subcommand_handlers

const struct command_registration jlink_config_subcommand_handlers[]
static

Definition at line 1754 of file jlink.c.

◆ jlink_emucom_subcommand_handlers

const struct command_registration jlink_emucom_subcommand_handlers[]
static
Initial value:
= {
{
.name = "write",
.handler = &jlink_handle_emucom_write_command,
.mode = COMMAND_EXEC,
.help = "write to a channel",
.usage = "<channel> <data>",
},
{
.name = "read",
.handler = &jlink_handle_emucom_read_command,
.mode = COMMAND_EXEC,
.help = "read from a channel",
.usage = "<channel> <length>"
},
}
@ COMMAND_EXEC
Definition: command.h:40

Definition at line 1754 of file jlink.c.

◆ jlink_interface

struct jtag_interface jlink_interface
static
Initial value:
= {
.execute_queue = &jlink_execute_queue,
}

Definition at line 2262 of file jlink.c.

◆ jlink_last_state

enum tap_state jlink_last_state = TAP_RESET
static

Definition at line 107 of file jlink.c.

Referenced by jlink_flush().

◆ jlink_subcommand_handlers

const struct command_registration jlink_subcommand_handlers[]
static

Definition at line 1754 of file jlink.c.

◆ jlink_swd

const struct swd_driver jlink_swd
static
Initial value:
= {
.init = &jlink_swd_init,
.switch_seq = &jlink_swd_switch_seq,
.read_reg = &jlink_swd_read_reg,
.write_reg = &jlink_swd_write_reg,
}

Definition at line 2212 of file jlink.c.

◆ jlink_transports

const char* const jlink_transports[] = { "jtag", "swd", NULL }
static

Definition at line 2262 of file jlink.c.

◆ jtag_command_version

enum jaylink_jtag_version jtag_command_version
static

Definition at line 37 of file jlink.c.

Referenced by COMMAND_HANDLER(), jlink_flush(), and jlink_init().

◆ mac_address

uint8_t mac_address[6]

Definition at line 11 of file jlink.c.

◆ pending_scan_results_buffer

struct pending_scan_result pending_scan_results_buffer[MAX_PENDING_SCAN_RESULTS]
static

Definition at line 1983 of file jlink.c.

Referenced by jlink_clock_data(), jlink_flush(), and jlink_swd_run_queue().

◆ pending_scan_results_length

int pending_scan_results_length
static

Definition at line 1983 of file jlink.c.

Referenced by jlink_clock_data(), jlink_flush(), jlink_swd_run_queue(), and jlink_tap_init().

◆ queued_retval

int queued_retval
static

Definition at line 113 of file jlink.c.

Referenced by jlink_swd_run_queue().

◆ reserved_1

uint8_t reserved_1[3]

Definition at line 2 of file jlink.c.

◆ reserved_2

uint8_t reserved_2[24]

Definition at line 5 of file jlink.c.

◆ reserved_3

uint8_t reserved_3[8]

Definition at line 10 of file jlink.c.

◆ reserved_4

uint8_t reserved_4[202]

Definition at line 13 of file jlink.c.

◆ serial_number

uint32_t serial_number
static

Definition at line 43 of file jlink.c.

Referenced by jlink_init(), and jlink_open_device().

◆ subnet_mask

uint8_t subnet_mask[4]

Definition at line 8 of file jlink.c.

Referenced by COMMAND_HANDLER().

◆ swd_buffer_size

unsigned int swd_buffer_size = JLINK_TAP_BUFFER_SIZE
static

Definition at line 54 of file jlink.c.

Referenced by adjust_swd_buffer_size().

◆ tap_length

unsigned tap_length
static

◆ target_power

uint32_t target_power

Definition at line 3 of file jlink.c.

Referenced by show_config_target_power().

◆ tdi_buffer

uint8_t tdi_buffer[JLINK_TAP_BUFFER_SIZE]
static

◆ tdo_buffer

uint8_t tdo_buffer[JLINK_TAP_BUFFER_SIZE]
static

Definition at line 1968 of file jlink.c.

Referenced by jlink_flush(), and jlink_swd_run_queue().

◆ tmp_config

◆ tms_buffer

◆ trace_enabled

bool trace_enabled
static

Definition at line 49 of file jlink.c.

Referenced by cmsis_dap_config_trace(), config_trace(), and jlink_quit().

◆ usb_address

uint8_t usb_address
static

Definition at line 45 of file jlink.c.

Referenced by COMMAND_HANDLER(), and jlink_open_device().

◆ use_serial_number

bool use_serial_number
static

Definition at line 44 of file jlink.c.

Referenced by jlink_init(), and jlink_open_device().

◆ use_usb_address

bool use_usb_address
static

Definition at line 47 of file jlink.c.

Referenced by COMMAND_HANDLER(), jlink_init(), and jlink_open_device().

◆ use_usb_location

bool use_usb_location
static

Definition at line 45 of file jlink.c.

Referenced by jlink_open_device().