OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | pending_scan_result |
struct | vsllink |
Macros | |
#define | BYTES_PER_LINE 16 |
#define | MAX_PENDING_SCAN_RESULTS 256 |
Functions | |
COMMAND_HANDLER (vsllink_handle_usb_bulkin_command) | |
COMMAND_HANDLER (vsllink_handle_usb_bulkout_command) | |
COMMAND_HANDLER (vsllink_handle_usb_interface_command) | |
COMMAND_HANDLER (vsllink_handle_usb_pid_command) | |
COMMAND_HANDLER (vsllink_handle_usb_vid_command) | |
static int | vsllink_check_usb_strings (struct libusb_device_handle *usb_device_handle, struct libusb_device_descriptor *usb_desc) |
static void | vsllink_debug_buffer (uint8_t *buffer, int length) |
static void | vsllink_end_state (tap_state_t state) |
static int | vsllink_execute_queue (struct jtag_command *cmd_queue) |
static void | vsllink_free_buffer (void) |
static int | vsllink_init (void) |
static int | vsllink_interface_init (void) |
static int | vsllink_jtag_execute (void) |
static int | vsllink_khz (int khz, int *jtag_speed) |
static void | vsllink_path_move (unsigned int num_states, tap_state_t *path) |
static int | vsllink_quit (void) |
static int | vsllink_reset (int trst, int srst) |
static void | vsllink_runtest (unsigned int num_cycles) |
static void | vsllink_scan (bool ir_scan, enum scan_type type, uint8_t *buffer, int scan_size, struct scan_command *command) |
static int | vsllink_speed (int speed) |
static int | vsllink_speed_div (int jtag_speed, int *khz) |
static void | vsllink_stableclocks (unsigned int num_cycles, int tms) |
static void | vsllink_state_move (void) |
static int_least32_t | vsllink_swd_frequency (int_least32_t hz) |
static int | vsllink_swd_init (void) |
static void | vsllink_swd_read_reg (uint8_t cmd, uint32_t *value, uint32_t ap_delay_clk) |
static int | vsllink_swd_run_queue (void) |
static int | vsllink_swd_switch_seq (enum swd_special_seq seq) |
static void | vsllink_swd_write_reg (uint8_t cmd, uint32_t value, uint32_t ap_delay_clk) |
static void | vsllink_tap_append_scan (int length, uint8_t *buffer, struct scan_command *command) |
static void | vsllink_tap_append_step (int tms, int tdi) |
static void | vsllink_tap_ensure_pending (int scans) |
static int | vsllink_tap_execute (void) |
static void | vsllink_tap_init (void) |
static void | vsllink_tms (int num_bits, const uint8_t *bits) |
static void | vsllink_usb_close (struct vsllink *vsllink) |
static int | vsllink_usb_open (struct vsllink *vsllink) |
Variables | |
static struct pending_scan_result | pending_scan_results_buffer [MAX_PENDING_SCAN_RESULTS] |
static int | pending_scan_results_length |
static bool | swd_mode |
static int | tap_buffer_size |
static int | tap_length |
static uint8_t * | tdi_buffer |
static uint8_t * | tdo_buffer |
static uint8_t * | tms_buffer |
struct adapter_driver | vsllink_adapter_driver |
static const struct command_registration | vsllink_command_handlers [] |
static struct vsllink * | vsllink_handle |
static struct jtag_interface | vsllink_interface |
static const struct command_registration | vsllink_subcommand_handlers [] |
static const struct swd_driver | vsllink_swd_driver |
static int | vsllink_tms_offset |
static const char *const | vsllink_transports [] = {"jtag", "swd", NULL} |
COMMAND_HANDLER | ( | vsllink_handle_usb_bulkin_command | ) |
Definition at line 492 of file vsllink.c.
References CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, versaloon_usb_setting_t::ep_in, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, versaloon_interface_t::usb_setting, and versaloon_interface.
COMMAND_HANDLER | ( | vsllink_handle_usb_bulkout_command | ) |
Definition at line 505 of file vsllink.c.
References CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, versaloon_usb_setting_t::ep_out, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, versaloon_interface_t::usb_setting, and versaloon_interface.
COMMAND_HANDLER | ( | vsllink_handle_usb_interface_command | ) |
Definition at line 518 of file vsllink.c.
References CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, versaloon_usb_setting_t::interface, versaloon_interface_t::usb_setting, and versaloon_interface.
COMMAND_HANDLER | ( | vsllink_handle_usb_pid_command | ) |
Definition at line 483 of file vsllink.c.
References CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, versaloon_usb_setting_t::pid, versaloon_interface_t::usb_setting, and versaloon_interface.
COMMAND_HANDLER | ( | vsllink_handle_usb_vid_command | ) |
Definition at line 473 of file vsllink.c.
References CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, versaloon_interface_t::usb_setting, versaloon_interface, and versaloon_usb_setting_t::vid.
|
static |
Definition at line 757 of file vsllink.c.
References adapter_get_required_serial(), ERROR_FAIL, and ERROR_OK.
Referenced by vsllink_usb_open().
|
static |
Definition at line 849 of file vsllink.c.
Referenced by vsllink_execute_queue(), and vsllink_jtag_execute().
|
static |
Definition at line 349 of file vsllink.c.
References LOG_ERROR, state, tap_is_state_stable(), and tap_set_end_state().
Referenced by vsllink_execute_queue(), vsllink_runtest(), and vsllink_scan().
|
static |
Definition at line 87 of file vsllink.c.
References buffer, cmd, DIV_ROUND_UP, jtag_build_buffer(), JTAG_PATHMOVE, JTAG_RUNTEST, JTAG_SCAN, jtag_scan_type(), JTAG_SLEEP, jtag_sleep(), JTAG_STABLECLOCKS, JTAG_TLR_RESET, JTAG_TMS, LOG_DEBUG_IO, LOG_ERROR, LOG_LEVEL_IS, LOG_LVL_DEBUG_IO, TAP_DRPAUSE, TAP_DRSHIFT, tap_get_state(), TAP_IDLE, TAP_IRPAUSE, TAP_IRSHIFT, TAP_RESET, tap_state_name(), type, vsllink_debug_buffer(), vsllink_end_state(), vsllink_path_move(), vsllink_runtest(), vsllink_scan(), vsllink_stableclocks(), vsllink_state_move(), vsllink_tap_execute(), and vsllink_tms().
|
static |
Definition at line 236 of file vsllink.c.
References NULL, tdi_buffer, tdo_buffer, and tms_buffer.
Referenced by vsllink_init(), and vsllink_quit().
|
static |
Definition at line 301 of file vsllink.c.
References adapter_get_speed_khz(), versaloon_interface_t::adaptors, versaloon_usb_setting_t::buf_size, interface_jtag_raw_t::config, interface_gpio_t::config, versaloon_adaptors_t::delay, interface_delay_t::delayms, ERROR_FAIL, ERROR_OK, versaloon_adaptors_t::gpio, GPIO_SRST, GPIO_TRST, interface_gpio_t::init, interface_swd_t::init, interface_jtag_raw_t::init, versaloon_adaptors_t::jtag_raw, JTAG_TO_SWD, versaloon_adaptors_t::peripheral_commit, versaloon_adaptors_t::swd, swd_mode, tap_buffer_size, tdi_buffer, tdo_buffer, tms_buffer, versaloon_interface_t::usb_setting, versaloon_interface, vsllink_free_buffer(), vsllink_interface_init(), vsllink_quit(), vsllink_reset(), vsllink_swd_frequency(), vsllink_swd_switch_seq(), and vsllink_tap_init().
|
static |
Definition at line 271 of file vsllink.c.
References versaloon_usb_setting_t::buf_size, ERROR_FAIL, ERROR_JTAG_INIT_FAILED, ERROR_OK, versaloon_interface_t::fini, versaloon_interface_t::init, vsllink::libusb_ctx, LOG_DEBUG, LOG_ERROR, versaloon_usb_setting_t::pid, vsllink::usb_device_handle, versaloon_interface_t::usb_setting, versaloon_interface, versaloon_usb_device_handle, versaloon_usb_setting_t::vid, vsllink_handle, and vsllink_usb_open().
Referenced by vsllink_init().
|
static |
Definition at line 610 of file vsllink.c.
References versaloon_interface_t::adaptors, buf_set_buf(), pending_scan_result::buffer, buffer, pending_scan_result::command, pending_scan_result::dest_offset, DIV_ROUND_UP, ERROR_JTAG_QUEUE_FAILED, ERROR_OK, interface_jtag_raw_t::execute, versaloon_adaptors_t::jtag_raw, jtag_read_buffer(), pending_scan_result::last, pending_scan_result::length, length, LOG_DEBUG_IO, LOG_ERROR, LOG_LEVEL_IS, LOG_LVL_DEBUG_IO, pending_scan_results_buffer, pending_scan_results_length, versaloon_adaptors_t::peripheral_commit, pending_scan_result::src_offset, tap_length, tdi_buffer, tdo_buffer, tms_buffer, versaloon_interface, vsllink_debug_buffer(), and vsllink_tap_init().
Referenced by vsllink_tap_execute().
|
static |
|
static |
Definition at line 374 of file vsllink.c.
References LOG_ERROR, tap_get_state(), tap_set_end_state(), tap_set_state, tap_state_name(), tap_state_transition(), and vsllink_tap_append_step().
Referenced by vsllink_execute_queue().
|
static |
Definition at line 248 of file vsllink.c.
References versaloon_interface_t::adaptors, interface_gpio_t::config, ERROR_OK, interface_gpio_t::fini, interface_swd_t::fini, interface_jtag_raw_t::fini, versaloon_interface_t::fini, versaloon_adaptors_t::gpio, GPIO_SRST, GPIO_TRST, versaloon_adaptors_t::jtag_raw, vsllink::libusb_ctx, versaloon_adaptors_t::peripheral_commit, versaloon_adaptors_t::swd, swd_mode, versaloon_interface, vsllink_free_buffer(), vsllink_handle, and vsllink_usb_close().
Referenced by vsllink_init().
|
static |
Definition at line 454 of file vsllink.c.
References versaloon_interface_t::adaptors, interface_gpio_t::config, versaloon_adaptors_t::gpio, GPIO_SRST, GPIO_TRST, LOG_DEBUG, interface_gpio_t::out, versaloon_adaptors_t::peripheral_commit, swd_mode, and versaloon_interface.
Referenced by vsllink_init().
|
static |
Definition at line 408 of file vsllink.c.
References tap_get_end_state(), tap_get_state(), TAP_IDLE, vsllink_end_state(), vsllink_stableclocks(), and vsllink_state_move().
Referenced by vsllink_execute_queue().
|
static |
Definition at line 427 of file vsllink.c.
References buffer, TAP_DRPAUSE, TAP_DRSHIFT, tap_get_end_state(), tap_get_state(), TAP_IRPAUSE, TAP_IRSHIFT, tap_length, tap_set_state, vsllink_end_state(), vsllink_state_move(), vsllink_tap_append_scan(), vsllink_tap_append_step(), and vsllink_tms_offset.
Referenced by vsllink_execute_queue().
|
static |
Definition at line 211 of file vsllink.c.
References versaloon_interface_t::adaptors, interface_jtag_raw_t::config, ERROR_OK, versaloon_adaptors_t::jtag_raw, versaloon_adaptors_t::peripheral_commit, swd_mode, versaloon_interface, and vsllink_swd_frequency().
|
static |
|
static |
Definition at line 400 of file vsllink.c.
References vsllink_tap_append_step().
Referenced by vsllink_execute_queue(), and vsllink_runtest().
|
static |
Definition at line 360 of file vsllink.c.
References tap_get_end_state(), tap_get_state(), tap_get_tms_path(), tap_get_tms_path_len(), tap_set_state, and vsllink_tap_append_step().
Referenced by vsllink_execute_queue(), vsllink_runtest(), and vsllink_scan().
|
static |
Definition at line 680 of file vsllink.c.
References versaloon_interface_t::adaptors, ARRAY_SIZE, interface_swd_t::config, LOG_DEBUG, versaloon_adaptors_t::swd, and versaloon_interface.
Referenced by vsllink_init(), and vsllink_speed().
|
static |
|
static |
Definition at line 739 of file vsllink.c.
References versaloon_interface_t::adaptors, cmd, NULL, versaloon_adaptors_t::swd, interface_swd_t::transact, and versaloon_interface.
|
static |
Definition at line 749 of file vsllink.c.
References versaloon_interface_t::adaptors, versaloon_adaptors_t::peripheral_commit, and versaloon_interface.
|
static |
Definition at line 713 of file vsllink.c.
References versaloon_interface_t::adaptors, ERROR_FAIL, ERROR_OK, JTAG_TO_SWD, LINE_RESET, LOG_DEBUG, LOG_ERROR, interface_swd_t::seqout, versaloon_adaptors_t::swd, swd_seq_jtag_to_swd, swd_seq_jtag_to_swd_len, swd_seq_line_reset, swd_seq_line_reset_len, swd_seq_swd_to_jtag, swd_seq_swd_to_jtag_len, SWD_TO_JTAG, and versaloon_interface.
Referenced by vsllink_init().
|
static |
Definition at line 744 of file vsllink.c.
References versaloon_interface_t::adaptors, cmd, NULL, versaloon_adaptors_t::swd, interface_swd_t::transact, and versaloon_interface.
|
static |
Definition at line 570 of file vsllink.c.
References pending_scan_result::buffer, buffer, pending_scan_result::command, pending_scan_result::dest_offset, pending_scan_result::last, pending_scan_result::length, length, pending_scan_results_buffer, pending_scan_results_length, pending_scan_result::src_offset, tap_buffer_size, tap_length, vsllink_tap_append_step(), and vsllink_tap_ensure_pending().
Referenced by vsllink_scan().
|
static |
Definition at line 547 of file vsllink.c.
References bit(), tap_buffer_size, tap_length, tdi_buffer, tms_buffer, and vsllink_tap_execute().
Referenced by vsllink_path_move(), vsllink_scan(), vsllink_stableclocks(), vsllink_state_move(), vsllink_tap_append_scan(), and vsllink_tms().
|
static |
Definition at line 538 of file vsllink.c.
References MAX_PENDING_SCAN_RESULTS, pending_scan_results_length, and vsllink_tap_execute().
Referenced by vsllink_tap_append_scan().
|
static |
Definition at line 664 of file vsllink.c.
References ERROR_OK, swd_mode, and vsllink_jtag_execute().
Referenced by vsllink_execute_queue(), vsllink_tap_append_step(), and vsllink_tap_ensure_pending().
|
static |
Definition at line 531 of file vsllink.c.
References pending_scan_results_length, tap_length, and vsllink_tms_offset.
Referenced by vsllink_init(), and vsllink_jtag_execute().
|
static |
Definition at line 394 of file vsllink.c.
References bits, and vsllink_tap_append_step().
Referenced by vsllink_execute_queue().
|
static |
Definition at line 840 of file vsllink.c.
References versaloon_usb_setting_t::interface, vsllink::usb_device_handle, versaloon_interface_t::usb_setting, and versaloon_interface.
Referenced by vsllink_quit().
|
static |
Definition at line 788 of file vsllink.c.
References device, ERROR_FAIL, ERROR_OK, versaloon_usb_setting_t::interface, vsllink::libusb_ctx, LOG_ERROR, versaloon_usb_setting_t::pid, vsllink::usb_device_handle, versaloon_interface_t::usb_setting, versaloon_interface, versaloon_usb_setting_t::vid, and vsllink_check_usb_strings().
Referenced by vsllink_interface_init().
|
static |
Definition at line 39 of file vsllink.c.
Referenced by vsllink_jtag_execute(), and vsllink_tap_append_scan().
|
static |
Definition at line 39 of file vsllink.c.
Referenced by vsllink_jtag_execute(), vsllink_tap_append_scan(), vsllink_tap_ensure_pending(), and vsllink_tap_init().
|
static |
Definition at line 83 of file vsllink.c.
Referenced by vsllink_init(), vsllink_quit(), vsllink_reset(), vsllink_speed(), vsllink_swd_init(), and vsllink_tap_execute().
|
static |
Definition at line 78 of file vsllink.c.
Referenced by vsllink_init(), vsllink_tap_append_scan(), and vsllink_tap_append_step().
|
static |
Definition at line 77 of file vsllink.c.
Referenced by vsllink_jtag_execute(), vsllink_scan(), vsllink_tap_append_scan(), vsllink_tap_append_step(), and vsllink_tap_init().
|
static |
Definition at line 80 of file vsllink.c.
Referenced by vsllink_free_buffer(), vsllink_init(), vsllink_jtag_execute(), and vsllink_tap_append_step().
|
static |
Definition at line 81 of file vsllink.c.
Referenced by vsllink_free_buffer(), vsllink_init(), and vsllink_jtag_execute().
|
static |
Definition at line 79 of file vsllink.c.
Referenced by vsllink_free_buffer(), vsllink_init(), vsllink_jtag_execute(), and vsllink_tap_append_step().
struct adapter_driver vsllink_adapter_driver |
|
static |
|
static |
Definition at line 85 of file vsllink.c.
Referenced by vsllink_interface_init(), and vsllink_quit().
|
static |
|
static |
|
static |
|
static |
Definition at line 25 of file vsllink.c.
Referenced by vsllink_scan(), and vsllink_tap_init().