OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | armjtagew |
struct | pending_scan_result |
Macros | |
#define | ARMJTAGEW_EPT_BULK_IN 0x82u |
#define | ARMJTAGEW_EPT_BULK_OUT 0x01u |
#define | ARMJTAGEW_IN_BUFFER_SIZE (4*1024) |
#define | ARMJTAGEW_OUT_BUFFER_SIZE (4*1024) |
#define | ARMJTAGEW_TAP_BUFFER_SIZE 2048 |
#define | ARMJTAGEW_USB_TIMEOUT 2000 |
#define | CMD_GET_TAPHW_STATE 0x21 |
#define | CMD_GET_TCK_FREQUENCY 0x12 |
#define | CMD_GET_VERSION 0x00 |
#define | CMD_MEASURE_MAX_TCK_FREQ 0x15 |
#define | CMD_MEASURE_RTCK_RESPONSE 0x16 |
#define | CMD_SELECT_DPIMPL 0x10 |
#define | CMD_SET_TAPHW_STATE 0x20 |
#define | CMD_SET_TCK_FREQUENCY 0x11 |
#define | CMD_TAP_SHIFT 0x17 |
#define | CMD_TGPWR_SETUP 0x22 |
#define | MAX_PENDING_SCAN_RESULTS 256 |
#define | USB_PID 0x001e |
#define | USB_VID 0x15ba |
Functions | |
static void | armjtagew_end_state (tap_state_t state) |
static int | armjtagew_execute_queue (void) |
static int | armjtagew_get_status (void) |
static int | armjtagew_get_version_info (void) |
static int | armjtagew_init (void) |
static int | armjtagew_khz (int khz, int *jtag_speed) |
static void | armjtagew_path_move (int num_states, tap_state_t *path) |
static int | armjtagew_quit (void) |
static void | armjtagew_reset (int trst, int srst) |
static void | armjtagew_runtest (int num_cycles) |
static void | armjtagew_scan (bool ir_scan, enum scan_type type, uint8_t *buffer, int scan_size, struct scan_command *command) |
static int | armjtagew_speed (int speed) |
static int | armjtagew_speed_div (int speed, int *khz) |
static void | armjtagew_state_move (void) |
static void | armjtagew_tap_append_scan (int length, uint8_t *buffer, struct scan_command *command) |
static void | armjtagew_tap_append_step (int tms, int tdi) |
static void | armjtagew_tap_ensure_space (int scans, int bits) |
static int | armjtagew_tap_execute (void) |
static void | armjtagew_tap_init (void) |
static void | armjtagew_usb_close (struct armjtagew *armjtagew) |
static int | armjtagew_usb_message (struct armjtagew *armjtagew, int out_length, int in_length) |
static struct armjtagew * | armjtagew_usb_open (void) |
static int | armjtagew_usb_read (struct armjtagew *armjtagew, int exp_in_length) |
static int | armjtagew_usb_write (struct armjtagew *armjtagew, int out_length) |
COMMAND_HANDLER (armjtagew_handle_armjtagew_info_command) | |
Variables | |
struct adapter_driver | armjtagew_adapter_driver |
static const struct command_registration | armjtagew_command_handlers [] |
static struct armjtagew * | armjtagew_handle |
static struct jtag_interface | armjtagew_interface |
static int | last_tms |
static struct pending_scan_result | pending_scan_results_buffer [MAX_PENDING_SCAN_RESULTS] |
static int | pending_scan_results_length |
static int | tap_length |
static uint8_t | tdi_buffer [ARMJTAGEW_TAP_BUFFER_SIZE] |
static uint8_t | tdo_buffer [ARMJTAGEW_TAP_BUFFER_SIZE] |
static uint8_t | tms_buffer [ARMJTAGEW_TAP_BUFFER_SIZE] |
static uint8_t | usb_in_buffer [ARMJTAGEW_IN_BUFFER_SIZE] |
static uint8_t | usb_out_buffer [ARMJTAGEW_OUT_BUFFER_SIZE] |
#define ARMJTAGEW_EPT_BULK_IN 0x82u |
Definition at line 21 of file arm-jtag-ew.c.
#define ARMJTAGEW_EPT_BULK_OUT 0x01u |
Definition at line 20 of file arm-jtag-ew.c.
#define ARMJTAGEW_IN_BUFFER_SIZE (4*1024) |
Definition at line 25 of file arm-jtag-ew.c.
#define ARMJTAGEW_OUT_BUFFER_SIZE (4*1024) |
Definition at line 26 of file arm-jtag-ew.c.
#define ARMJTAGEW_TAP_BUFFER_SIZE 2048 |
Definition at line 509 of file arm-jtag-ew.c.
#define ARMJTAGEW_USB_TIMEOUT 2000 |
Definition at line 23 of file arm-jtag-ew.c.
#define CMD_GET_TAPHW_STATE 0x21 |
Definition at line 37 of file arm-jtag-ew.c.
#define CMD_GET_TCK_FREQUENCY 0x12 |
Definition at line 32 of file arm-jtag-ew.c.
#define CMD_GET_VERSION 0x00 |
Definition at line 29 of file arm-jtag-ew.c.
#define CMD_MEASURE_MAX_TCK_FREQ 0x15 |
Definition at line 33 of file arm-jtag-ew.c.
#define CMD_MEASURE_RTCK_RESPONSE 0x16 |
Definition at line 34 of file arm-jtag-ew.c.
#define CMD_SELECT_DPIMPL 0x10 |
Definition at line 30 of file arm-jtag-ew.c.
#define CMD_SET_TAPHW_STATE 0x20 |
Definition at line 36 of file arm-jtag-ew.c.
#define CMD_SET_TCK_FREQUENCY 0x11 |
Definition at line 31 of file arm-jtag-ew.c.
#define CMD_TAP_SHIFT 0x17 |
Definition at line 35 of file arm-jtag-ew.c.
#define CMD_TGPWR_SETUP 0x22 |
Definition at line 38 of file arm-jtag-ew.c.
#define MAX_PENDING_SCAN_RESULTS 256 |
Definition at line 523 of file arm-jtag-ew.c.
#define USB_PID 0x001e |
Definition at line 18 of file arm-jtag-ew.c.
#define USB_VID 0x15ba |
Definition at line 17 of file arm-jtag-ew.c.
|
static |
Definition at line 256 of file arm-jtag-ew.c.
References LOG_ERROR, state, tap_is_state_stable(), and tap_set_end_state().
Referenced by armjtagew_execute_queue(), armjtagew_runtest(), and armjtagew_scan().
|
static |
Definition at line 88 of file arm-jtag-ew.c.
References armjtagew_end_state(), armjtagew_path_move(), armjtagew_reset(), armjtagew_runtest(), armjtagew_scan(), armjtagew_state_move(), armjtagew_tap_execute(), buffer, cmd, jtag_build_buffer(), jtag_command_queue, JTAG_PATHMOVE, JTAG_RESET, JTAG_RUNTEST, JTAG_SCAN, jtag_scan_type(), JTAG_SLEEP, jtag_sleep(), JTAG_TLR_RESET, LOG_DEBUG_IO, LOG_ERROR, TAP_RESET, tap_set_state, and type.
|
static |
Definition at line 403 of file arm-jtag-ew.c.
References armjtagew_handle, armjtagew_usb_message(), buf_get_u32(), CMD_GET_TAPHW_STATE, ERROR_OK, LOG_ERROR, LOG_INFO, usb_in_buffer, and usb_out_buffer.
Referenced by armjtagew_init().
|
static |
Definition at line 430 of file arm-jtag-ew.c.
References armjtagew_handle, armjtagew_usb_message(), CMD_GET_VERSION, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, LOG_ERROR, LOG_INFO, LOG_WARNING, usb_in_buffer, and usb_out_buffer.
Referenced by armjtagew_init().
|
static |
Definition at line 210 of file arm-jtag-ew.c.
References armjtagew_get_status(), armjtagew_get_version_info(), armjtagew_handle, armjtagew_reset(), armjtagew_speed(), armjtagew_tap_init(), armjtagew_usb_open(), ERROR_JTAG_INIT_FAILED, ERROR_OK, LOG_ERROR, and LOG_INFO.
|
static |
Definition at line 196 of file arm-jtag-ew.c.
References ERROR_OK.
|
static |
Definition at line 282 of file arm-jtag-ew.c.
References armjtagew_tap_append_step(), LOG_ERROR, tap_get_state(), tap_set_end_state(), tap_set_state, tap_state_name(), and tap_state_transition().
Referenced by armjtagew_execute_queue().
|
static |
Definition at line 247 of file arm-jtag-ew.c.
References armjtagew_handle, armjtagew_usb_close(), and ERROR_OK.
|
static |
Definition at line 363 of file arm-jtag-ew.c.
References armjtagew_handle, armjtagew_usb_write(), CMD_SET_TAPHW_STATE, LOG_DEBUG, LOG_ERROR, and usb_out_buffer.
Referenced by armjtagew_execute_queue(), and armjtagew_init().
|
static |
Definition at line 308 of file arm-jtag-ew.c.
References armjtagew_end_state(), armjtagew_state_move(), armjtagew_tap_append_step(), tap_get_end_state(), tap_get_state(), and TAP_IDLE.
Referenced by armjtagew_execute_queue().
|
static |
Definition at line 330 of file arm-jtag-ew.c.
References armjtagew_end_state(), armjtagew_state_move(), armjtagew_tap_append_scan(), armjtagew_tap_append_step(), armjtagew_tap_ensure_space(), buffer, TAP_DRPAUSE, TAP_DRSHIFT, tap_get_end_state(), tap_get_state(), TAP_IRPAUSE, TAP_IRSHIFT, and tap_set_state.
Referenced by armjtagew_execute_queue().
|
static |
Definition at line 168 of file arm-jtag-ew.c.
References armjtagew_handle, armjtagew_usb_message(), buf_get_u32(), buf_set_u32(), CMD_GET_TCK_FREQUENCY, CMD_SET_TCK_FREQUENCY, ERROR_JTAG_DEVICE_ERROR, ERROR_OK, LOG_ERROR, LOG_INFO, usb_in_buffer, and usb_out_buffer.
Referenced by armjtagew_init().
|
static |
Definition at line 203 of file arm-jtag-ew.c.
References ERROR_OK.
|
static |
Definition at line 267 of file arm-jtag-ew.c.
References armjtagew_tap_append_step(), tap_get_end_state(), tap_get_state(), tap_get_tms_path(), tap_get_tms_path_len(), and tap_set_state.
Referenced by armjtagew_execute_queue(), armjtagew_runtest(), and armjtagew_scan().
|
static |
Definition at line 569 of file arm-jtag-ew.c.
References armjtagew_tap_append_step(), pending_scan_result::buffer, buffer, pending_scan_result::command, pending_scan_result::first, pending_scan_result::length, length, pending_scan_results_buffer, pending_scan_results_length, and tap_length.
Referenced by armjtagew_scan().
|
static |
Definition at line 545 of file arm-jtag-ew.c.
References ARMJTAGEW_TAP_BUFFER_SIZE, bit(), last_tms, LOG_ERROR, tap_length, tdi_buffer, and tms_buffer.
Referenced by armjtagew_path_move(), armjtagew_runtest(), armjtagew_scan(), armjtagew_state_move(), armjtagew_tap_append_scan(), and armjtagew_tap_execute().
|
static |
Definition at line 536 of file arm-jtag-ew.c.
References ARMJTAGEW_TAP_BUFFER_SIZE, armjtagew_tap_execute(), bits, MAX_PENDING_SCAN_RESULTS, pending_scan_results_length, and tap_length.
Referenced by armjtagew_scan().
|
static |
Definition at line 587 of file arm-jtag-ew.c.
References armjtagew_handle, armjtagew_tap_append_step(), armjtagew_tap_init(), armjtagew_usb_message(), buf_get_u32(), buf_set_buf(), buf_set_u32(), pending_scan_result::buffer, buffer, CMD_TAP_SHIFT, pending_scan_result::command, ERROR_JTAG_QUEUE_FAILED, ERROR_OK, pending_scan_result::first, flip_u32(), jtag_read_buffer(), last_tms, pending_scan_result::length, length, LOG_DEBUG_IO, LOG_ERROR, pending_scan_results_buffer, pending_scan_results_length, tap_length, tdi_buffer, tdo_buffer, tms_buffer, usb_in_buffer, and usb_out_buffer.
Referenced by armjtagew_execute_queue(), and armjtagew_tap_ensure_space().
|
static |
Definition at line 530 of file arm-jtag-ew.c.
References pending_scan_results_length, and tap_length.
Referenced by armjtagew_init(), and armjtagew_tap_execute().
|
static |
Definition at line 704 of file arm-jtag-ew.c.
References armjtagew::usb_handle.
Referenced by armjtagew_quit().
|
static |
Definition at line 711 of file arm-jtag-ew.c.
References armjtagew_usb_read(), armjtagew_usb_write(), and LOG_ERROR.
Referenced by armjtagew_get_status(), armjtagew_get_version_info(), armjtagew_speed(), and armjtagew_tap_execute().
|
static |
Definition at line 674 of file arm-jtag-ew.c.
References config, ERROR_OK, jtag_libusb_open(), NULL, armjtagew::usb_handle, USB_PID, and USB_VID.
Referenced by armjtagew_init().
|
static |
Definition at line 758 of file arm-jtag-ew.c.
References ARMJTAGEW_EPT_BULK_IN, ARMJTAGEW_USB_TIMEOUT, ERROR_OK, jtag_libusb_bulk_read(), LOG_DEBUG_IO, armjtagew::usb_handle, and usb_in_buffer.
Referenced by armjtagew_usb_message().
|
static |
Definition at line 732 of file arm-jtag-ew.c.
References ARMJTAGEW_EPT_BULK_OUT, ARMJTAGEW_OUT_BUFFER_SIZE, ARMJTAGEW_USB_TIMEOUT, ERROR_OK, jtag_libusb_bulk_write(), LOG_DEBUG_IO, LOG_ERROR, armjtagew::usb_handle, and usb_out_buffer.
Referenced by armjtagew_reset(), and armjtagew_usb_message().
COMMAND_HANDLER | ( | armjtagew_handle_armjtagew_info_command | ) |
Definition at line 466 of file arm-jtag-ew.c.
struct adapter_driver armjtagew_adapter_driver |
Definition at line 466 of file arm-jtag-ew.c.
|
static |
Definition at line 466 of file arm-jtag-ew.c.
|
static |
Definition at line 83 of file arm-jtag-ew.c.
Referenced by armjtagew_get_status(), armjtagew_get_version_info(), armjtagew_init(), armjtagew_quit(), armjtagew_reset(), armjtagew_speed(), and armjtagew_tap_execute().
|
static |
Definition at line 466 of file arm-jtag-ew.c.
|
static |
Definition at line 528 of file arm-jtag-ew.c.
Referenced by armjtagew_tap_append_step(), armjtagew_tap_execute(), linuxgpiod_write(), and sysfsgpio_write().
|
static |
Definition at line 525 of file arm-jtag-ew.c.
Referenced by armjtagew_tap_append_scan(), and armjtagew_tap_execute().
|
static |
Definition at line 525 of file arm-jtag-ew.c.
Referenced by armjtagew_tap_append_scan(), armjtagew_tap_ensure_space(), armjtagew_tap_execute(), and armjtagew_tap_init().
|
static |
Definition at line 511 of file arm-jtag-ew.c.
Referenced by armjtagew_tap_append_scan(), armjtagew_tap_append_step(), armjtagew_tap_ensure_space(), armjtagew_tap_execute(), and armjtagew_tap_init().
|
static |
Definition at line 513 of file arm-jtag-ew.c.
Referenced by armjtagew_tap_append_step(), armjtagew_tap_execute(), jtag_debug_state_machine_(), and ulink_queue_scan().
|
static |
Definition at line 514 of file arm-jtag-ew.c.
Referenced by armjtagew_tap_execute(), cmsis_dap_add_jtag_sequence(), and ulink_queue_scan().
|
static |
Definition at line 512 of file arm-jtag-ew.c.
Referenced by armjtagew_tap_append_step(), armjtagew_tap_execute(), and jtag_debug_state_machine_().
|
static |
Definition at line 41 of file arm-jtag-ew.c.
Referenced by armjtagew_get_status(), armjtagew_get_version_info(), armjtagew_speed(), armjtagew_tap_execute(), and armjtagew_usb_read().
|
static |
Definition at line 42 of file arm-jtag-ew.c.
Referenced by armjtagew_get_status(), armjtagew_get_version_info(), armjtagew_reset(), armjtagew_speed(), armjtagew_tap_execute(), and armjtagew_usb_write().