OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | pending_request_block |
struct | pending_scan_result |
struct | pending_transfer_result |
Functions | |
static bool | calculate_swo_prescaler (unsigned int traceclkin_freq, uint32_t trace_freq, uint16_t *prescaler) |
static void | cmsis_dap_add_jtag_sequence (int s_len, const uint8_t *sequence, int s_offset, bool tms, uint8_t *tdo_buffer, int tdo_buffer_offset) |
static void | cmsis_dap_add_tms_sequence (const uint8_t *sequence, int s_len) |
static void | cmsis_dap_close (struct cmsis_dap *dap) |
static int | cmsis_dap_cmd_dap_connect (uint8_t mode) |
static int | cmsis_dap_cmd_dap_disconnect (void) |
static int | cmsis_dap_cmd_dap_info (uint8_t info, uint8_t **data) |
static int | cmsis_dap_cmd_dap_led (uint8_t led, uint8_t state) |
static int | cmsis_dap_cmd_dap_swd_configure (uint8_t cfg) |
static int | cmsis_dap_cmd_dap_swj_clock (uint32_t swj_clock) |
static int | cmsis_dap_cmd_dap_swj_pins (uint8_t pins, uint8_t mask, uint32_t delay, uint8_t *input) |
static int | cmsis_dap_cmd_dap_swj_sequence (uint8_t s_len, const uint8_t *sequence) |
static int | cmsis_dap_cmd_dap_swo_baudrate (uint32_t in_baudrate, uint32_t *dev_baudrate) |
Sets the baudrate for capturing SWO trace data. More... | |
static int | cmsis_dap_cmd_dap_swo_control (uint8_t control) |
Controls the SWO trace data capture. More... | |
static int | cmsis_dap_cmd_dap_swo_data (size_t max_trace_count, uint8_t *trace_status, size_t *trace_count, uint8_t *data) |
Reads the captured SWO trace data from Trace Buffer. More... | |
static int | cmsis_dap_cmd_dap_swo_mode (uint8_t mode) |
Sets the SWO trace capture mode. More... | |
static int | cmsis_dap_cmd_dap_swo_status (uint8_t *trace_status, size_t *trace_count) |
Reads the SWO trace status. More... | |
static int | cmsis_dap_cmd_dap_swo_transport (uint8_t transport) |
Sets the SWO transport mode. More... | |
static int | cmsis_dap_cmd_dap_tfer_configure (uint8_t idle, uint16_t retry_count, uint16_t match_retry) |
static int | cmsis_dap_config_trace (bool trace_enabled, enum tpiu_pin_protocol pin_protocol, uint32_t port_size, unsigned int *swo_freq, unsigned int traceclkin_hz, uint16_t *swo_prescaler) |
static void | cmsis_dap_end_state (tap_state_t state) |
static void | cmsis_dap_execute_command (struct jtag_command *cmd) |
static void | cmsis_dap_execute_pathmove (struct jtag_command *cmd) |
static int | cmsis_dap_execute_queue (void) |
static void | cmsis_dap_execute_runtest (struct jtag_command *cmd) |
static void | cmsis_dap_execute_scan (struct jtag_command *cmd) |
static void | cmsis_dap_execute_sleep (struct jtag_command *cmd) |
static void | cmsis_dap_execute_stableclocks (struct jtag_command *cmd) |
static int | cmsis_dap_execute_tlr_reset (struct jtag_command *cmd) |
static void | cmsis_dap_execute_tms (struct jtag_command *cmd) |
static void | cmsis_dap_flush (void) |
static void | cmsis_dap_flush_read (struct cmsis_dap *dap) |
static int | cmsis_dap_get_caps_info (void) |
static int | cmsis_dap_get_serial_info (void) |
static int | cmsis_dap_get_status (void) |
static int | cmsis_dap_get_swo_buf_sz (uint32_t *swo_buf_sz) |
static int | cmsis_dap_get_version_info (void) |
static int | cmsis_dap_init (void) |
static int | cmsis_dap_khz (int khz, int *jtag_speed) |
static int | cmsis_dap_metacmd_targetsel (uint32_t instance_id) |
static int | cmsis_dap_open (void) |
static void | cmsis_dap_pathmove (int num_states, tap_state_t *path) |
static int | cmsis_dap_poll_trace (uint8_t *buf, size_t *size) |
static int | cmsis_dap_quit (void) |
static int | cmsis_dap_reset (int trst, int srst) |
static void | cmsis_dap_runtest (int num_cycles) |
static int | cmsis_dap_speed (int speed) |
static int | cmsis_dap_speed_div (int speed, int *khz) |
static void | cmsis_dap_stableclocks (int num_cycles) |
static void | cmsis_dap_state_move (void) |
static int | cmsis_dap_swd_init (void) |
static int | cmsis_dap_swd_open (void) |
static void | cmsis_dap_swd_queue_cmd (uint8_t cmd, uint32_t *dst, uint32_t data) |
static void | cmsis_dap_swd_read_process (struct cmsis_dap *dap, int timeout_ms) |
static void | cmsis_dap_swd_read_reg (uint8_t cmd, uint32_t *value, uint32_t ap_delay_clk) |
static int | cmsis_dap_swd_run_queue (void) |
static int | cmsis_dap_swd_switch_seq (enum swd_special_seq seq) |
static void | cmsis_dap_swd_write_from_queue (struct cmsis_dap *dap) |
static void | cmsis_dap_swd_write_reg (uint8_t cmd, uint32_t value, uint32_t ap_delay_clk) |
static int | cmsis_dap_xfer (struct cmsis_dap *dap, int txlen) |
COMMAND_HANDLER (cmsis_dap_handle_backend_command) | |
COMMAND_HANDLER (cmsis_dap_handle_cmd_command) | |
COMMAND_HANDLER (cmsis_dap_handle_info_command) | |
COMMAND_HANDLER (cmsis_dap_handle_vid_pid_command) | |
#define CMD_DAP_CONNECT 0x02 |
Definition at line 75 of file cmsis_dap.c.
#define CMD_DAP_DELAY 0x09 |
Definition at line 117 of file cmsis_dap.c.
#define CMD_DAP_DELAY 0x09 |
Definition at line 117 of file cmsis_dap.c.
#define CMD_DAP_DISCONNECT 0x03 |
Definition at line 76 of file cmsis_dap.c.
#define CMD_DAP_INFO 0x00 |
Definition at line 73 of file cmsis_dap.c.
#define CMD_DAP_JTAG_CONFIGURE 0x15 |
Definition at line 145 of file cmsis_dap.c.
#define CMD_DAP_JTAG_IDCODE 0x16 |
Definition at line 146 of file cmsis_dap.c.
#define CMD_DAP_JTAG_SEQ 0x14 |
Definition at line 144 of file cmsis_dap.c.
#define CMD_DAP_LED 0x01 |
Definition at line 74 of file cmsis_dap.c.
#define CMD_DAP_RESET_TARGET 0x0A |
Definition at line 79 of file cmsis_dap.c.
#define CMD_DAP_SWD_CONFIGURE 0x13 |
Definition at line 140 of file cmsis_dap.c.
#define CMD_DAP_SWD_SEQUENCE 0x1D |
Definition at line 141 of file cmsis_dap.c.
#define CMD_DAP_SWJ_CLOCK 0x11 |
Definition at line 119 of file cmsis_dap.c.
#define CMD_DAP_SWJ_PINS 0x10 |
Definition at line 118 of file cmsis_dap.c.
#define CMD_DAP_SWJ_SEQ 0x12 |
Definition at line 120 of file cmsis_dap.c.
#define CMD_DAP_SWO_BAUDRATE 0x19 |
Definition at line 170 of file cmsis_dap.c.
#define CMD_DAP_SWO_CONTROL 0x1A |
Definition at line 171 of file cmsis_dap.c.
#define CMD_DAP_SWO_DATA 0x1C |
Definition at line 173 of file cmsis_dap.c.
#define CMD_DAP_SWO_EX_STATUS 0x1E |
Definition at line 174 of file cmsis_dap.c.
#define CMD_DAP_SWO_MODE 0x18 |
Definition at line 169 of file cmsis_dap.c.
#define CMD_DAP_SWO_STATUS 0x1B |
Definition at line 172 of file cmsis_dap.c.
#define CMD_DAP_SWO_TRANSPORT 0x17 |
Definition at line 168 of file cmsis_dap.c.
#define CMD_DAP_TFER 0x05 |
Definition at line 159 of file cmsis_dap.c.
#define CMD_DAP_TFER_ABORT 0x07 |
Definition at line 161 of file cmsis_dap.c.
#define CMD_DAP_TFER_BLOCK 0x06 |
Definition at line 160 of file cmsis_dap.c.
#define CMD_DAP_TFER_CONFIGURE 0x04 |
Definition at line 158 of file cmsis_dap.c.
#define CMD_DAP_WRITE_ABORT 0x08 |
Definition at line 77 of file cmsis_dap.c.
#define CONNECT_DEFAULT 0x00 |
Definition at line 112 of file cmsis_dap.c.
#define CONNECT_JTAG 0x02 |
Definition at line 114 of file cmsis_dap.c.
#define CONNECT_SWD 0x01 |
Definition at line 113 of file cmsis_dap.c.
#define DAP_ERROR 0xFF |
Definition at line 165 of file cmsis_dap.c.
#define DAP_JTAG_SEQ_TCK 0x3F |
Definition at line 150 of file cmsis_dap.c.
#define DAP_JTAG_SEQ_TDO 0x80 |
Definition at line 154 of file cmsis_dap.c.
#define DAP_JTAG_SEQ_TMS 0x40 |
Definition at line 152 of file cmsis_dap.c.
#define DAP_OK 0 |
Definition at line 164 of file cmsis_dap.c.
#define DAP_SWO_CONTROL_START 1 |
Definition at line 188 of file cmsis_dap.c.
#define DAP_SWO_CONTROL_STOP 0 |
Definition at line 187 of file cmsis_dap.c.
#define DAP_SWO_MODE_MANCHESTER 2 |
Definition at line 184 of file cmsis_dap.c.
#define DAP_SWO_MODE_OFF 0 |
Definition at line 182 of file cmsis_dap.c.
#define DAP_SWO_MODE_UART 1 |
Definition at line 183 of file cmsis_dap.c.
#define DAP_SWO_STATUS_BUFFER_OVERRUN_MASK BIT(7) |
Definition at line 195 of file cmsis_dap.c.
#define DAP_SWO_STATUS_CAPTURE_ACTIVE 1 |
Definition at line 192 of file cmsis_dap.c.
#define DAP_SWO_STATUS_CAPTURE_INACTIVE 0 |
Definition at line 191 of file cmsis_dap.c.
#define DAP_SWO_STATUS_CAPTURE_MASK BIT(0) |
Definition at line 193 of file cmsis_dap.c.
#define DAP_SWO_STATUS_STREAM_ERROR_MASK BIT(6) |
Definition at line 194 of file cmsis_dap.c.
#define DAP_SWO_TRANSPORT_DATA 1 |
Definition at line 178 of file cmsis_dap.c.
#define DAP_SWO_TRANSPORT_NONE 0 |
Definition at line 177 of file cmsis_dap.c.
#define DAP_SWO_TRANSPORT_WINUSB 2 |
Definition at line 179 of file cmsis_dap.c.
#define INFO_CAPS__NUM_CAPS 9 |
Definition at line 102 of file cmsis_dap.c.
#define INFO_CAPS_ATOMIC_CMDS BIT(4) |
Definition at line 97 of file cmsis_dap.c.
#define INFO_CAPS_JTAG BIT(1) |
Definition at line 94 of file cmsis_dap.c.
#define INFO_CAPS_SWD BIT(0) |
Definition at line 93 of file cmsis_dap.c.
#define INFO_CAPS_SWO_MANCHESTER BIT(3) |
Definition at line 96 of file cmsis_dap.c.
#define INFO_CAPS_SWO_STREAMING_TRACE BIT(6) |
Definition at line 99 of file cmsis_dap.c.
#define INFO_CAPS_SWO_UART BIT(2) |
Definition at line 95 of file cmsis_dap.c.
#define INFO_CAPS_TEST_DOMAIN_TIMER BIT(5) |
Definition at line 98 of file cmsis_dap.c.
#define INFO_CAPS_UART_PORT BIT(7) |
Definition at line 100 of file cmsis_dap.c.
#define INFO_CAPS_USB_COM_PORT BIT(8) |
Definition at line 101 of file cmsis_dap.c.
#define INFO_ID_CAPS 0xf0 /* byte */ |
Definition at line 88 of file cmsis_dap.c.
#define INFO_ID_FW_VER 0x04 /* string */ |
Definition at line 85 of file cmsis_dap.c.
#define INFO_ID_PKT_CNT 0xfe /* byte */ |
Definition at line 89 of file cmsis_dap.c.
#define INFO_ID_PKT_SZ 0xff /* short */ |
Definition at line 90 of file cmsis_dap.c.
#define INFO_ID_PRODUCT 0x02 /* string */ |
Definition at line 83 of file cmsis_dap.c.
#define INFO_ID_SERNUM 0x03 /* string */ |
Definition at line 84 of file cmsis_dap.c.
#define INFO_ID_SWO_BUF_SZ 0xfd /* word */ |
Definition at line 91 of file cmsis_dap.c.
#define INFO_ID_TD_NAME 0x06 /* string */ |
Definition at line 87 of file cmsis_dap.c.
#define INFO_ID_TD_VEND 0x05 /* string */ |
Definition at line 86 of file cmsis_dap.c.
#define INFO_ID_VENDOR 0x01 /* string */ |
Definition at line 82 of file cmsis_dap.c.
#define LED_ID_CONNECT 0x00 |
Definition at line 105 of file cmsis_dap.c.
#define LED_ID_RUN 0x01 |
Definition at line 106 of file cmsis_dap.c.
#define LED_OFF 0x00 |
Definition at line 108 of file cmsis_dap.c.
#define LED_ON 0x01 |
Definition at line 109 of file cmsis_dap.c.
#define MAX_PENDING_REQUESTS 3 |
Definition at line 236 of file cmsis_dap.c.
#define MAX_PENDING_SCAN_RESULTS 256 |
Definition at line 246 of file cmsis_dap.c.
#define MAX_USB_IDS 8 |
Definition at line 65 of file cmsis_dap.c.
#define QUEUED_SEQ_BUF_LEN (cmsis_dap_handle->packet_size - 3) |
Definition at line 251 of file cmsis_dap.c.
#define SWJ_PIN_SRST (1<<7) |
Definition at line 137 of file cmsis_dap.c.
#define SWJ_PIN_TCK (1<<0) |
Definition at line 132 of file cmsis_dap.c.
#define SWJ_PIN_TDI (1<<2) |
Definition at line 134 of file cmsis_dap.c.
#define SWJ_PIN_TDO (1<<3) |
Definition at line 135 of file cmsis_dap.c.
#define SWJ_PIN_TMS (1<<1) |
Definition at line 133 of file cmsis_dap.c.
#define SWJ_PIN_TRST (1<<5) |
Definition at line 136 of file cmsis_dap.c.
|
static |
Definition at line 1836 of file cmsis_dap.c.
References TPIU_ACPR_MAX_SWOSCALER.
Referenced by cmsis_dap_config_trace().
|
static |
Definition at line 1495 of file cmsis_dap.c.
References bit_copy(), cmsis_dap_flush(), DAP_JTAG_SEQ_TDO, DAP_JTAG_SEQ_TMS, DIV_ROUND_UP, LOG_DEBUG_IO, offset, pending_scan_result_count, pending_scan_results, queued_seq_buf, queued_seq_buf_end, QUEUED_SEQ_BUF_LEN, queued_seq_count, queued_seq_tdo_ptr, scan, and tdo_buffer.
Referenced by cmsis_dap_add_tms_sequence(), and cmsis_dap_execute_scan().
|
static |
Definition at line 1556 of file cmsis_dap.c.
References bit(), cmsis_dap_add_jtag_sequence(), LOG_DEBUG_IO, and NULL.
Referenced by cmsis_dap_pathmove(), cmsis_dap_stableclocks(), and cmsis_dap_state_move().
|
static |
Definition at line 305 of file cmsis_dap.c.
References cmsis_dap::backend, cmsis_dap_backend::close, cmsis_dap_handle, MAX_PENDING_REQUESTS, NULL, cmsis_dap::packet_buffer, pending_fifo, and pending_request_block::transfers.
Referenced by cmsis_dap_quit().
|
static |
Definition at line 476 of file cmsis_dap.c.
References CMD_DAP_CONNECT, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, LOG_ERROR, mode, and cmsis_dap::response.
Referenced by cmsis_dap_init(), cmsis_dap_swd_open(), and cmsis_dap_swd_switch_seq().
|
static |
Definition at line 497 of file cmsis_dap.c.
References CMD_DAP_DISCONNECT, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, LOG_ERROR, and cmsis_dap::response.
Referenced by cmsis_dap_quit(), and cmsis_dap_swd_switch_seq().
|
static |
Definition at line 441 of file cmsis_dap.c.
References CMD_DAP_INFO, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, info, LOG_ERROR, and cmsis_dap::response.
Referenced by cmsis_dap_get_caps_info(), cmsis_dap_get_serial_info(), cmsis_dap_get_swo_buf_sz(), cmsis_dap_get_version_info(), and cmsis_dap_init().
|
static |
Definition at line 459 of file cmsis_dap.c.
References CMD_DAP_LED, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, LOG_ERROR, cmsis_dap::response, and state.
Referenced by cmsis_dap_init(), and cmsis_dap_quit().
|
static |
Definition at line 530 of file cmsis_dap.c.
References CMD_DAP_SWD_CONFIGURE, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, LOG_ERROR, and cmsis_dap::response.
Referenced by cmsis_dap_init().
|
static |
Definition at line 398 of file cmsis_dap.c.
References CMD_DAP_SWJ_CLOCK, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, h_u32_to_le(), LOG_ERROR, and cmsis_dap::response.
Referenced by cmsis_dap_init(), cmsis_dap_speed(), and cmsis_dap_swd_switch_seq().
|
static |
Definition at line 377 of file cmsis_dap.c.
References CMD_DAP_SWJ_PINS, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, h_u32_to_le(), LOG_ERROR, mask, and cmsis_dap::response.
Referenced by cmsis_dap_get_status(), cmsis_dap_init(), and cmsis_dap_reset().
|
static |
Definition at line 418 of file cmsis_dap.c.
References bit_copy(), CMD_DAP_SWJ_SEQ, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, LOG_DEBUG, and cmsis_dap::response.
Referenced by cmsis_dap_execute_tlr_reset(), cmsis_dap_execute_tms(), and cmsis_dap_swd_switch_seq().
|
static |
Sets the baudrate for capturing SWO trace data.
Can be called iteratively to determine supported baudrates.
[in] | in_baudrate | Requested baudrate. |
[out] | dev_baudrate | Actual baudrate or 0 (baudrate not configured). When requested baudrate is not achievable the closest configured baudrate can be returned or 0 which indicates that baudrate was not configured. |
Definition at line 654 of file cmsis_dap.c.
References CMD_DAP_SWO_BAUDRATE, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, h_u32_to_le(), le_to_h_u32(), LOG_ERROR, and cmsis_dap::response.
Referenced by cmsis_dap_config_trace().
|
static |
Controls the SWO trace data capture.
[in] | control | Start or stop a trace. Starting capture automatically flushes any existing trace data in buffers which has not yet been read. |
Definition at line 684 of file cmsis_dap.c.
References CMD_DAP_SWO_CONTROL, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, LOG_ERROR, and cmsis_dap::response.
Referenced by cmsis_dap_config_trace().
|
static |
Reads the captured SWO trace data from Trace Buffer.
[in] | max_trace_count | Maximum number of Trace Data bytes to read. |
[out] | trace_status | The trace's status. |
[out] | trace_count | Number of Trace Data bytes read. |
[out] | data | Trace Data bytes read. |
Definition at line 737 of file cmsis_dap.c.
References CMD_DAP_SWO_DATA, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, h_u16_to_le(), le_to_h_u16(), LOG_ERROR, and cmsis_dap::response.
Referenced by cmsis_dap_poll_trace().
|
static |
Sets the SWO trace capture mode.
[in] | mode | Trace capture mode. Can be UART or MANCHESTER. |
Definition at line 629 of file cmsis_dap.c.
References CMD_DAP_SWO_MODE, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, LOG_ERROR, mode, and cmsis_dap::response.
Referenced by cmsis_dap_config_trace().
|
static |
Reads the SWO trace status.
[out] | trace_status | The trace's status. Bit0: Trace Capture (1 - active, 0 - inactive). Bit6: Trace Stream Error. Bit7: Trace Buffer Overrun. |
[out] | trace_count | Number of bytes in Trace Buffer (not yet read). |
Definition at line 708 of file cmsis_dap.c.
References CMD_DAP_SWO_STATUS, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, le_to_h_u32(), LOG_ERROR, and cmsis_dap::response.
Referenced by cmsis_dap_poll_trace().
|
static |
Sets the SWO transport mode.
[in] | transport | The transport mode. Can be None, SWO_Data or WinUSB (requires CMSIS-DAP v2). |
Definition at line 609 of file cmsis_dap.c.
References CMD_DAP_SWO_TRANSPORT, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, LOG_ERROR, and cmsis_dap::response.
Referenced by cmsis_dap_config_trace().
|
static |
Definition at line 512 of file cmsis_dap.c.
References CMD_DAP_TFER_CONFIGURE, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, h_u16_to_le(), LOG_ERROR, and cmsis_dap::response.
Referenced by cmsis_dap_init().
|
static |
Definition at line 1857 of file cmsis_dap.c.
References calculate_swo_prescaler(), cmsis_dap::caps, cmsis_dap_cmd_dap_swo_baudrate(), cmsis_dap_cmd_dap_swo_control(), cmsis_dap_cmd_dap_swo_mode(), cmsis_dap_cmd_dap_swo_transport(), cmsis_dap_get_swo_buf_sz(), cmsis_dap_handle, DAP_SWO_CONTROL_START, DAP_SWO_CONTROL_STOP, DAP_SWO_MODE_MANCHESTER, DAP_SWO_MODE_UART, DAP_SWO_TRANSPORT_DATA, ERROR_FAIL, ERROR_OK, INFO_CAPS_SWO_MANCHESTER, INFO_CAPS_SWO_UART, LOG_ERROR, LOG_INFO, cmsis_dap::swo_buf_sz, TPIU_PIN_PROTOCOL_ASYNC_MANCHESTER, TPIU_PIN_PROTOCOL_ASYNC_UART, cmsis_dap::trace_enabled, and trace_enabled.
|
static |
Definition at line 1359 of file cmsis_dap.c.
References LOG_ERROR, state, tap_is_state_stable(), and tap_set_end_state().
Referenced by cmsis_dap_execute_runtest(), cmsis_dap_execute_scan(), cmsis_dap_pathmove(), and cmsis_dap_runtest().
|
static |
Definition at line 1768 of file cmsis_dap.c.
References cmd, cmsis_dap_execute_pathmove(), cmsis_dap_execute_runtest(), cmsis_dap_execute_scan(), cmsis_dap_execute_sleep(), cmsis_dap_execute_stableclocks(), cmsis_dap_execute_tlr_reset(), cmsis_dap_execute_tms(), cmsis_dap_flush(), JTAG_PATHMOVE, JTAG_RUNTEST, JTAG_SCAN, JTAG_SLEEP, JTAG_STABLECLOCKS, JTAG_TLR_RESET, JTAG_TMS, and LOG_ERROR.
Referenced by cmsis_dap_execute_queue().
|
static |
Definition at line 1709 of file cmsis_dap.c.
References cmd, cmsis_dap_pathmove(), and LOG_DEBUG_IO.
Referenced by cmsis_dap_execute_command().
|
static |
Definition at line 1800 of file cmsis_dap.c.
References cmd, cmsis_dap_execute_command(), cmsis_dap_flush(), ERROR_OK, and jtag_command_queue.
|
static |
Definition at line 1745 of file cmsis_dap.c.
References cmd, cmsis_dap_end_state(), cmsis_dap_runtest(), and LOG_DEBUG_IO.
Referenced by cmsis_dap_execute_command().
|
static |
Definition at line 1586 of file cmsis_dap.c.
References bit_copy(), cmd, cmsis_dap_add_jtag_sequence(), cmsis_dap_end_state(), cmsis_dap_state_move(), scan_field::in_value, jtag_scan_type(), LOG_DEBUG, LOG_DEBUG_IO, NULL, scan_field::num_bits, scan_field::out_value, TAP_DRSHIFT, tap_get_end_state(), tap_get_state(), TAP_IRSHIFT, tap_set_state, tap_state_name(), and tap_state_transition().
Referenced by cmsis_dap_execute_command().
|
static |
Definition at line 1337 of file cmsis_dap.c.
References cmd, ERROR_OK, and jtag_sleep().
Referenced by cmsis_dap_execute_command().
|
static |
Definition at line 1754 of file cmsis_dap.c.
References cmd, cmsis_dap_stableclocks(), and LOG_DEBUG_IO.
Referenced by cmsis_dap_execute_command().
|
static |
Definition at line 1347 of file cmsis_dap.c.
References cmsis_dap_cmd_dap_swj_sequence(), ERROR_OK, LOG_INFO, TAP_RESET, and tap_set_state.
Referenced by cmsis_dap_execute_command().
|
static |
Definition at line 1760 of file cmsis_dap.c.
References cmd, cmsis_dap_cmd_dap_swj_sequence(), and LOG_DEBUG_IO.
Referenced by cmsis_dap_execute_command().
|
static |
Definition at line 1436 of file cmsis_dap.c.
References bit_copy(), CMD_DAP_JTAG_SEQ, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, DIV_ROUND_UP, ERROR_OK, LOG_DEBUG_IO, LOG_ERROR, pending_scan_result_count, pending_scan_results, queued_seq_buf, queued_seq_buf_end, queued_seq_count, queued_seq_tdo_ptr, cmsis_dap::response, and scan.
Referenced by cmsis_dap_add_jtag_sequence(), cmsis_dap_execute_command(), and cmsis_dap_execute_queue().
|
static |
Definition at line 322 of file cmsis_dap.c.
References cmsis_dap::backend, ERROR_TIMEOUT_REACHED, LOG_DEBUG, and cmsis_dap_backend::read.
Referenced by cmsis_dap_init(), and cmsis_dap_xfer().
|
static |
Definition at line 1009 of file cmsis_dap.c.
References BIT, cmsis_dap::caps, caps, cmsis_dap_cmd_dap_info(), cmsis_dap_handle, pending_transfer_result::data, ERROR_OK, INFO_CAPS__NUM_CAPS, info_caps_str, INFO_ID_CAPS, and LOG_INFO.
Referenced by cmsis_dap_init().
|
static |
Definition at line 980 of file cmsis_dap.c.
References cmsis_dap_cmd_dap_info(), pending_transfer_result::data, ERROR_OK, INFO_ID_SERNUM, and LOG_INFO.
Referenced by cmsis_dap_init().
|
static |
Definition at line 1053 of file cmsis_dap.c.
References cmsis_dap_cmd_dap_swj_pins(), ERROR_OK, LOG_INFO, SWJ_PIN_SRST, SWJ_PIN_TCK, SWJ_PIN_TDI, SWJ_PIN_TDO, SWJ_PIN_TMS, and SWJ_PIN_TRST.
Referenced by cmsis_dap_init(), and COMMAND_HANDLER().
|
static |
Definition at line 1034 of file cmsis_dap.c.
References cmsis_dap_cmd_dap_info(), pending_transfer_result::data, ERROR_FAIL, ERROR_OK, INFO_ID_SWO_BUF_SZ, le_to_h_u32(), and LOG_INFO.
Referenced by cmsis_dap_config_trace().
|
static |
Definition at line 994 of file cmsis_dap.c.
References cmsis_dap_cmd_dap_info(), pending_transfer_result::data, ERROR_OK, INFO_ID_FW_VER, and LOG_INFO.
Referenced by cmsis_dap_init(), and COMMAND_HANDLER().
|
static |
Definition at line 1160 of file cmsis_dap.c.
References adapter_get_speed_khz(), cmsis_dap::backend, cmsis_dap::caps, cmsis_dap_cmd_dap_connect(), cmsis_dap_cmd_dap_info(), cmsis_dap_cmd_dap_led(), cmsis_dap_cmd_dap_swd_configure(), cmsis_dap_cmd_dap_swj_clock(), cmsis_dap_cmd_dap_swj_pins(), cmsis_dap_cmd_dap_tfer_configure(), cmsis_dap_flush_read(), cmsis_dap_get_caps_info(), cmsis_dap_get_serial_info(), cmsis_dap_get_status(), cmsis_dap_get_version_info(), cmsis_dap_handle, cmsis_dap_open(), cmsis_dap_quit(), cmsis_dap_swd_open(), CONNECT_JTAG, pending_transfer_result::data, ERROR_FAIL, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, INFO_CAPS_JTAG, INFO_ID_PKT_CNT, INFO_ID_PKT_SZ, jtag_get_reset_config(), jtag_reset_config, LED_ID_CONNECT, LED_ID_RUN, LED_ON, LOG_DEBUG, LOG_ERROR, LOG_INFO, MAX_PENDING_REQUESTS, MIN, NULL, cmsis_dap::packet_buffer, cmsis_dap_backend::packet_buffer_alloc, cmsis_dap::packet_count, cmsis_dap::packet_size, pending_fifo, pending_queue_len, RESET_CNCT_UNDER_SRST, RESET_SRST_NO_GATING, swd_mode, SWJ_PIN_SRST, and pending_request_block::transfers.
|
static |
Definition at line 1830 of file cmsis_dap.c.
References ERROR_OK.
|
static |
Definition at line 564 of file cmsis_dap.c.
References CMD_DAP_SWD_SEQUENCE, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, DAP_OK, DP_TARGETSEL, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, h_u32_to_le(), LOG_DEBUG_IO, LOG_ERROR, parity_u32(), cmsis_dap::response, swd_cmd(), SWD_CMD_PARK, SWD_CMD_START, and SWD_CMD_STOP.
Referenced by cmsis_dap_swd_queue_cmd().
|
static |
Definition at line 266 of file cmsis_dap.c.
References adapter_get_required_serial(), ARRAY_SIZE, cmsis_dap::backend, cmsis_dap_backend, cmsis_dap_backends, cmsis_dap_handle, cmsis_dap_pid, cmsis_dap_vid, ERROR_FAIL, ERROR_OK, LOG_ERROR, NULL, and cmsis_dap_backend::open.
Referenced by cmsis_dap_init().
|
static |
Definition at line 1687 of file cmsis_dap.c.
References cmsis_dap_add_tms_sequence(), cmsis_dap_end_state(), LOG_ERROR, tap_get_state(), tap_set_state, tap_state_name(), and tap_state_transition().
Referenced by cmsis_dap_execute_pathmove().
|
static |
Definition at line 1947 of file cmsis_dap.c.
References cmsis_dap_cmd_dap_swo_data(), cmsis_dap_cmd_dap_swo_status(), cmsis_dap_handle, DAP_SWO_STATUS_CAPTURE_ACTIVE, DAP_SWO_STATUS_CAPTURE_MASK, ERROR_FAIL, ERROR_OK, cmsis_dap::packet_size, size, and cmsis_dap::trace_enabled.
|
static |
Definition at line 1306 of file cmsis_dap.c.
References cmsis_dap_close(), cmsis_dap_cmd_dap_disconnect(), cmsis_dap_cmd_dap_led(), cmsis_dap_handle, ERROR_OK, LED_ID_CONNECT, LED_ID_RUN, and LED_OFF.
Referenced by cmsis_dap_init().
|
static |
Definition at line 1319 of file cmsis_dap.c.
References cmsis_dap_cmd_dap_swj_pins(), ERROR_OK, LOG_ERROR, NULL, output_pins, SWJ_PIN_SRST, and SWJ_PIN_TRST.
|
static |
Definition at line 1727 of file cmsis_dap.c.
References cmsis_dap_end_state(), cmsis_dap_stableclocks(), cmsis_dap_state_move(), tap_get_end_state(), tap_get_state(), and TAP_IDLE.
Referenced by cmsis_dap_execute_runtest().
|
static |
Definition at line 1814 of file cmsis_dap.c.
References cmsis_dap_cmd_dap_swj_clock(), ERROR_JTAG_NOT_IMPLEMENTED, and LOG_ERROR.
|
static |
Definition at line 1824 of file cmsis_dap.c.
References ERROR_OK.
|
static |
Definition at line 1718 of file cmsis_dap.c.
References cmsis_dap_add_tms_sequence(), tap_get_state(), and TAP_RESET.
Referenced by cmsis_dap_execute_stableclocks(), and cmsis_dap_runtest().
|
static |
Definition at line 1571 of file cmsis_dap.c.
References cmsis_dap_add_tms_sequence(), LOG_DEBUG_IO, tap_get_end_state(), tap_get_state(), tap_get_tms_path(), tap_get_tms_path_len(), tap_set_state, and tap_state_name().
Referenced by cmsis_dap_execute_scan(), and cmsis_dap_runtest().
|
static |
Definition at line 1300 of file cmsis_dap.c.
|
static |
Definition at line 1143 of file cmsis_dap.c.
References cmsis_dap::caps, cmsis_dap_cmd_dap_connect(), cmsis_dap_handle, CONNECT_SWD, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, INFO_CAPS_SWD, LOG_ERROR, and LOG_INFO.
Referenced by cmsis_dap_init().
|
static |
Definition at line 933 of file cmsis_dap.c.
References pending_transfer_result::buffer, pending_transfer_result::cmd, cmd, cmsis_dap_handle, cmsis_dap_metacmd_targetsel(), cmsis_dap_swd_read_process(), cmsis_dap_swd_write_from_queue(), pending_transfer_result::data, DP_TARGETSEL, ERROR_OK, LIBUSB_TIMEOUT_MS, cmsis_dap::packet_count, pending_fifo, pending_fifo_block_count, pending_fifo_put_idx, pending_queue_len, queued_retval, swd_cmd(), SWD_CMD_RNW, pending_request_block::transfer_count, and pending_request_block::transfers.
Referenced by cmsis_dap_swd_read_reg(), and cmsis_dap_swd_write_reg().
|
static |
Definition at line 838 of file cmsis_dap.c.
References cmsis_dap::backend, pending_transfer_result::buffer, pending_transfer_result::cmd, CMD_DAP_TFER, pending_transfer_result::data, DP_RDBUFF, ERROR_FAIL, ERROR_TIMEOUT_REACHED, ERROR_WAIT, le_to_h_u32(), LIBUSB_TIMEOUT_MS, LOG_DEBUG, LOG_DEBUG_IO, LOG_ERROR, cmsis_dap::packet_count, pending_fifo, pending_fifo_block_count, pending_fifo_get_idx, queued_retval, cmsis_dap_backend::read, cmsis_dap::response, SWD_ACK_FAULT, SWD_ACK_OK, SWD_ACK_WAIT, SWD_CMD_A32, SWD_CMD_APNDP, SWD_CMD_RNW, pending_request_block::transfer_count, and pending_request_block::transfers.
Referenced by cmsis_dap_swd_queue_cmd(), and cmsis_dap_swd_run_queue().
|
static |
Definition at line 974 of file cmsis_dap.c.
References cmd, cmsis_dap_swd_queue_cmd(), and SWD_CMD_RNW.
|
static |
Definition at line 914 of file cmsis_dap.c.
References cmsis_dap_handle, cmsis_dap_swd_read_process(), cmsis_dap_swd_write_from_queue(), ERROR_OK, LIBUSB_TIMEOUT_MS, pending_fifo_block_count, pending_fifo_get_idx, pending_fifo_put_idx, and queued_retval.
|
static |
Definition at line 1072 of file cmsis_dap.c.
References adapter_get_speed_khz(), cmsis_dap_cmd_dap_connect(), cmsis_dap_cmd_dap_disconnect(), cmsis_dap_cmd_dap_swj_clock(), cmsis_dap_cmd_dap_swj_sequence(), CONNECT_SWD, DORMANT_TO_JTAG, DORMANT_TO_SWD, ERROR_FAIL, ERROR_OK, JTAG_TO_DORMANT, JTAG_TO_SWD, LINE_RESET, LOG_DEBUG, LOG_DEBUG_IO, LOG_ERROR, output_pins, swd_seq_dormant_to_jtag, swd_seq_dormant_to_jtag_len, swd_seq_dormant_to_swd, swd_seq_dormant_to_swd_len, swd_seq_jtag_to_dormant, swd_seq_jtag_to_dormant_len, swd_seq_jtag_to_swd, swd_seq_jtag_to_swd_len, swd_seq_line_reset, swd_seq_line_reset_len, swd_seq_swd_to_dormant, swd_seq_swd_to_dormant_len, swd_seq_swd_to_jtag, swd_seq_swd_to_jtag_len, SWD_TO_DORMANT, SWD_TO_JTAG, SWJ_PIN_SRST, and SWJ_PIN_TRST.
|
static |
Definition at line 763 of file cmsis_dap.c.
References cmsis_dap::backend, pending_transfer_result::cmd, cmd, CMD_DAP_TFER, cmsis_dap_handle, cmsis_dap::command, CORUNDETECT, pending_transfer_result::data, DP_CTRL_STAT, ERROR_OK, h_u32_to_le(), LIBUSB_TIMEOUT_MS, LOG_DEBUG, LOG_DEBUG_IO, LOG_ERROR, cmsis_dap::packet_count, pending_fifo, pending_fifo_block_count, pending_fifo_put_idx, queued_retval, SWD_CMD_A32, SWD_CMD_APNDP, SWD_CMD_RNW, pending_request_block::transfer_count, pending_request_block::transfers, and cmsis_dap_backend::write.
Referenced by cmsis_dap_swd_queue_cmd(), and cmsis_dap_swd_run_queue().
|
static |
Definition at line 968 of file cmsis_dap.c.
References cmd, cmsis_dap_swd_queue_cmd(), NULL, and SWD_CMD_RNW.
|
static |
Definition at line 338 of file cmsis_dap.c.
References cmsis_dap::backend, cmsis_dap_flush_read(), cmsis_dap_handle, cmsis_dap::command, DAP_ERROR, ERROR_FAIL, ERROR_NOT_IMPLEMENTED, ERROR_OK, LIBUSB_TIMEOUT_MS, LOG_ERROR, pending_fifo_block_count, pending_fifo_get_idx, pending_fifo_put_idx, cmsis_dap_backend::read, cmsis_dap::response, and cmsis_dap_backend::write.
Referenced by cmsis_dap_cmd_dap_connect(), cmsis_dap_cmd_dap_disconnect(), cmsis_dap_cmd_dap_info(), cmsis_dap_cmd_dap_led(), cmsis_dap_cmd_dap_swd_configure(), cmsis_dap_cmd_dap_swj_clock(), cmsis_dap_cmd_dap_swj_pins(), cmsis_dap_cmd_dap_swj_sequence(), cmsis_dap_cmd_dap_swo_baudrate(), cmsis_dap_cmd_dap_swo_control(), cmsis_dap_cmd_dap_swo_data(), cmsis_dap_cmd_dap_swo_mode(), cmsis_dap_cmd_dap_swo_status(), cmsis_dap_cmd_dap_swo_transport(), cmsis_dap_cmd_dap_tfer_configure(), cmsis_dap_flush(), cmsis_dap_metacmd_targetsel(), and COMMAND_HANDLER().
COMMAND_HANDLER | ( | cmsis_dap_handle_backend_command | ) |
Definition at line 2046 of file cmsis_dap.c.
COMMAND_HANDLER | ( | cmsis_dap_handle_cmd_command | ) |
Definition at line 1995 of file cmsis_dap.c.
References CMD_ARGC, CMD_ARGV, cmsis_dap_handle, cmsis_dap_xfer(), cmsis_dap::command, COMMAND_PARSE_NUMBER, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, LOG_ERROR, LOG_INFO, and cmsis_dap::response.
COMMAND_HANDLER | ( | cmsis_dap_handle_info_command | ) |
Definition at line 1987 of file cmsis_dap.c.
References cmsis_dap_get_status(), cmsis_dap_get_version_info(), and ERROR_OK.
COMMAND_HANDLER | ( | cmsis_dap_handle_vid_pid_command | ) |
Definition at line 2016 of file cmsis_dap.c.
References CMD_ARGC, CMD_ARGV, cmsis_dap_pid, cmsis_dap_vid, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_WARNING, and MAX_USB_IDS.
struct adapter_driver cmsis_dap_adapter_driver |
Definition at line 2129 of file cmsis_dap.c.
|
static |
Definition at line 69 of file cmsis_dap.c.
Referenced by cmsis_dap_open().
|
static |
|
static |
Definition at line 2046 of file cmsis_dap.c.
|
static |
Definition at line 261 of file cmsis_dap.c.
Referenced by cmsis_dap_close(), cmsis_dap_cmd_dap_connect(), cmsis_dap_cmd_dap_disconnect(), cmsis_dap_cmd_dap_info(), cmsis_dap_cmd_dap_led(), cmsis_dap_cmd_dap_swd_configure(), cmsis_dap_cmd_dap_swj_clock(), cmsis_dap_cmd_dap_swj_pins(), cmsis_dap_cmd_dap_swj_sequence(), cmsis_dap_cmd_dap_swo_baudrate(), cmsis_dap_cmd_dap_swo_control(), cmsis_dap_cmd_dap_swo_data(), cmsis_dap_cmd_dap_swo_mode(), cmsis_dap_cmd_dap_swo_status(), cmsis_dap_cmd_dap_swo_transport(), cmsis_dap_cmd_dap_tfer_configure(), cmsis_dap_config_trace(), cmsis_dap_flush(), cmsis_dap_get_caps_info(), cmsis_dap_init(), cmsis_dap_metacmd_targetsel(), cmsis_dap_open(), cmsis_dap_poll_trace(), cmsis_dap_quit(), cmsis_dap_swd_open(), cmsis_dap_swd_queue_cmd(), cmsis_dap_swd_run_queue(), cmsis_dap_swd_write_from_queue(), cmsis_dap_xfer(), and COMMAND_HANDLER().
|
static |
Definition at line 2129 of file cmsis_dap.c.
|
static |
Definition at line 68 of file cmsis_dap.c.
Referenced by cmsis_dap_open(), and COMMAND_HANDLER().
|
static |
Definition at line 2046 of file cmsis_dap.c.
|
static |
Definition at line 2046 of file cmsis_dap.c.
|
static |
Definition at line 2129 of file cmsis_dap.c.
|
static |
Definition at line 67 of file cmsis_dap.c.
Referenced by cmsis_dap_open(), and COMMAND_HANDLER().
|
static |
Definition at line 200 of file cmsis_dap.c.
Referenced by cmsis_dap_get_caps_info().
|
static |
Definition at line 259 of file cmsis_dap.c.
Referenced by cmsis_dap_reset(), and cmsis_dap_swd_switch_seq().
|
static |
Definition at line 240 of file cmsis_dap.c.
Referenced by cmsis_dap_close(), cmsis_dap_init(), cmsis_dap_swd_queue_cmd(), cmsis_dap_swd_read_process(), and cmsis_dap_swd_write_from_queue().
|
static |
Definition at line 243 of file cmsis_dap.c.
Referenced by cmsis_dap_swd_queue_cmd(), cmsis_dap_swd_read_process(), cmsis_dap_swd_run_queue(), cmsis_dap_swd_write_from_queue(), and cmsis_dap_xfer().
|
static |
Definition at line 242 of file cmsis_dap.c.
Referenced by cmsis_dap_swd_read_process(), cmsis_dap_swd_run_queue(), and cmsis_dap_xfer().
|
static |
Definition at line 242 of file cmsis_dap.c.
Referenced by cmsis_dap_swd_queue_cmd(), cmsis_dap_swd_run_queue(), cmsis_dap_swd_write_from_queue(), and cmsis_dap_xfer().
|
static |
Definition at line 240 of file cmsis_dap.c.
Referenced by cmsis_dap_init(), and cmsis_dap_swd_queue_cmd().
|
static |
Definition at line 247 of file cmsis_dap.c.
Referenced by cmsis_dap_add_jtag_sequence(), and cmsis_dap_flush().
|
static |
Definition at line 247 of file cmsis_dap.c.
Referenced by cmsis_dap_add_jtag_sequence(), and cmsis_dap_flush().
|
static |
Definition at line 257 of file cmsis_dap.c.
Referenced by cmsis_dap_swd_queue_cmd(), cmsis_dap_swd_read_process(), cmsis_dap_swd_run_queue(), and cmsis_dap_swd_write_from_queue().
|
static |
Definition at line 255 of file cmsis_dap.c.
Referenced by cmsis_dap_add_jtag_sequence(), and cmsis_dap_flush().
|
static |
Definition at line 253 of file cmsis_dap.c.
Referenced by cmsis_dap_add_jtag_sequence(), and cmsis_dap_flush().
|
static |
Definition at line 252 of file cmsis_dap.c.
Referenced by cmsis_dap_add_jtag_sequence(), and cmsis_dap_flush().
|
static |
Definition at line 254 of file cmsis_dap.c.
Referenced by cmsis_dap_add_jtag_sequence(), and cmsis_dap_flush().
|
static |
Definition at line 70 of file cmsis_dap.c.
Referenced by cmsis_dap_init(), and cmsis_dap_swd_init().