OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | dtc_reply_queue_entry |
Functions | |
static int | dtc_load_from_buffer (struct libusb_device_handle *hdev_param, const uint8_t *buffer, size_t length) |
static struct dtc_reply_queue_entry * | dtc_queue_enqueue_reply (enum scan_type type, uint8_t *buffer, int size, int offset, int length, struct jtag_command *cmd) |
static int | dtc_queue_init (void) |
static int | dtc_queue_run (void) |
static int | dtc_queue_run_if_full (int reserved_cmd, int reserved_reply) |
static int | dtc_run_download (struct libusb_device_handle *hdev_param, uint8_t *command_buffer, int command_buffer_size, uint8_t *reply_buffer, int reply_buffer_size) |
static int | dtc_start_download (void) |
static int | ep1_generic_commandl (struct libusb_device_handle *hdev_param, size_t length,...) |
static ssize_t | ep1_memory_write (struct libusb_device_handle *hdev_param, uint16_t addr, size_t length, uint8_t const *buffer) |
static void | rlink_end_state (enum tap_state state) |
static int | rlink_execute_queue (struct jtag_command *cmd_queue) |
static int | rlink_init (void) |
static int | rlink_khz (int khz, int *speed) |
static void | rlink_path_move (struct pathmove_command *cmd) |
static int | rlink_quit (void) |
static void | rlink_reset (int trst, int srst) |
static void | rlink_runtest (unsigned int num_cycles) |
static int | rlink_scan (struct jtag_command *cmd, enum scan_type type, uint8_t *buffer, int scan_size) |
static int | rlink_speed (int speed) |
static int | rlink_speed_div (int speed, int *khz) |
static void | rlink_state_move (void) |
static int | tap_state_queue_append (uint8_t tms) |
static int | tap_state_queue_init (void) |
static int | tap_state_queue_run (void) |
Variables | |
static uint8_t | dtc_entry_download |
struct { | |
uint8_t cmd_buffer [USB_EP2BANK_SIZE] | |
uint32_t cmd_index | |
uint32_t reply_index | |
struct dtc_reply_queue_entry * rq_head | |
struct dtc_reply_queue_entry * rq_tail | |
} | dtc_queue |
static struct libusb_device_handle * | hdev |
struct adapter_driver | rlink_adapter_driver |
static struct jtag_interface | rlink_interface |
struct { | |
uint32_t buffer | |
uint32_t length | |
} | tap_state_queue |
#define DTC_LOAD_BUFFER ST7_USB_BUF_EP2UIDO |
#define DTC_STATUS_POLL_BYTE (ST7_USB_BUF_EP0OUT + 0xff) |
#define ST7_PA_DBGACK ST7_PA_IO10 |
#define ST7_PA_DBGRQ ST7_PA_IO4 |
#define ST7_PA_NTRST ST7_PA_IO1 |
#define ST7_PB_NSRST ST7_PB_IO5 |
#define ST7_PC_TCK ST7_PC_IO7 |
#define ST7_PC_TDI ST7_PC_IO3 |
#define ST7_PC_TDO ST7_PC_IO9 |
#define ST7_PE_TMS ST7_PE_IO6 |
#define USB_EP1IN_ADDR (USB_EP1OUT_ADDR | 0x80) |
#define USB_EP1IN_SIZE (USB_EP1OUT_SIZE) |
#define USB_EP2IN_ADDR (USB_EP2OUT_ADDR | 0x80) |
#define USB_EP2IN_SIZE (USB_EP2OUT_SIZE) |
|
static |
Definition at line 286 of file rlink.c.
References buffer, dtc_entry_download, DTC_LOAD_BUFFER, DTCLOAD_COMMENT, DTCLOAD_ENTRY, DTCLOAD_LOAD, DTCLOAD_LUT, DTCLOAD_LUT_START, DTCLOAD_RUN, EP1_CMD_DTC_CALL, EP1_CMD_DTC_LOAD, EP1_CMD_DTC_STOP, EP1_CMD_DTC_WAIT, ep1_generic_commandl(), ep1_memory_write(), length, LOG_ERROR, ST7_USB_BUF_EP0OUT, and type.
Referenced by rlink_speed().
|
inlinestatic |
Definition at line 591 of file rlink.c.
References dtc_reply_queue_entry::buffer, buffer, dtc_reply_queue_entry::cmd, cmd, dtc_queue, dtc_reply_queue_entry::length, length, dtc_reply_queue_entry::next, NULL, dtc_reply_queue_entry::offset, offset, dtc_reply_queue_entry::scan, size, dtc_reply_queue_entry::size, type, and dtc_reply_queue_entry::type.
Referenced by rlink_scan().
|
static |
|
static |
Definition at line 624 of file rlink.c.
References dtc_reply_queue_entry::buffer, jtag_command::cmd, dtc_reply_queue_entry::cmd, DTC_CMD_STOP, dtc_queue, dtc_run_download(), ERROR_JTAG_QUEUE_FAILED, ERROR_OK, hdev, jtag_read_buffer(), dtc_reply_queue_entry::length, LOG_ERROR, dtc_reply_queue_entry::next, NULL, dtc_reply_queue_entry::offset, jtag_command_container::scan, dtc_reply_queue_entry::scan, SCAN_IN, dtc_reply_queue_entry::size, dtc_reply_queue_entry::type, USB_EP2BANK_SIZE, and USB_EP2IN_SIZE.
Referenced by dtc_queue_run_if_full(), and rlink_execute_queue().
|
static |
Definition at line 760 of file rlink.c.
References dtc_queue, dtc_queue_run(), ERROR_OK, USB_EP2BANK_SIZE, and USB_EP2IN_SIZE.
Referenced by rlink_scan(), and tap_state_queue_run().
|
static |
Definition at line 459 of file rlink.c.
References DTC_STATUS_POLL_BYTE, EP1_CMD_MEMORY_READ, ep1_generic_commandl(), ERROR_OK, jtag_libusb_bulk_read(), jtag_libusb_bulk_write(), LIBUSB_TIMEOUT_MS, LOG_DEBUG, LOG_ERROR, USB_EP1IN_ADDR, USB_EP2BANK_SIZE, USB_EP2IN_ADDR, and USB_EP2OUT_ADDR.
Referenced by dtc_queue_run().
|
static |
Definition at line 397 of file rlink.c.
References dtc_entry_download, DTC_STATUS_POLL_BYTE, EP1_CMD_DTC_CALL, EP1_CMD_DTC_GET_CACHED_STATUS, EP1_CMD_DTC_STOP, EP1_CMD_MEMORY_READ, EP1_CMD_MEMORY_WRITE, EP1_CMD_SET_DOWNLOAD, EP1_CMD_SET_UPLOAD, ep1_generic_commandl(), ERROR_OK, hdev, jtag_libusb_bulk_read(), LIBUSB_TIMEOUT_MS, ST7_EP2TXR, ST7_EP2TXR_DTOG_TX, ST7_EP2TXR_STAT_VALID, and USB_EP1IN_ADDR.
Referenced by rlink_speed().
|
static |
Definition at line 94 of file rlink.c.
References ERROR_OK, jtag_libusb_bulk_write(), length, LIBUSB_TIMEOUT_MS, USB_EP1OUT_ADDR, and USB_EP1OUT_SIZE.
Referenced by dtc_load_from_buffer(), dtc_run_download(), dtc_start_download(), rlink_execute_queue(), rlink_init(), and rlink_reset().
|
static |
Definition at line 193 of file rlink.c.
References addr, buffer, count, EP1_CMD_MEMORY_WRITE, ERROR_OK, jtag_libusb_bulk_write(), length, LIBUSB_TIMEOUT_MS, USB_EP1OUT_ADDR, and USB_EP1OUT_SIZE.
Referenced by dtc_load_from_buffer().
|
static |
Definition at line 845 of file rlink.c.
References LOG_ERROR, state, tap_is_state_stable(), and tap_set_end_state().
Referenced by rlink_execute_queue(), rlink_runtest(), and rlink_scan().
|
static |
Definition at line 1263 of file rlink.c.
References buffer, cmd, dtc_queue_run(), EP1_CMD_SET_PORTD_LEDS, ep1_generic_commandl(), ERROR_FAIL, ERROR_OK, hdev, jtag_build_buffer(), jtag_get_reset_config(), JTAG_PATHMOVE, JTAG_RESET, JTAG_RUNTEST, JTAG_SCAN, jtag_scan_type(), JTAG_SLEEP, jtag_sleep(), JTAG_TLR_RESET, LOG_DEBUG_IO, LOG_ERROR, RESET_SRST_PULLS_TRST, rlink_end_state(), rlink_path_move(), rlink_reset(), rlink_runtest(), rlink_scan(), rlink_state_move(), ST7_PD_NBUSY_LED, TAP_RESET, tap_set_state, tap_state_queue_run(), and type.
|
static |
Definition at line 1441 of file rlink.c.
References config, dtc_queue_init(), EP1_CMD_DTC_STOP, EP1_CMD_GET_FWREV, EP1_CMD_LEDUE_BUSY, EP1_CMD_LEDUE_NONE, EP1_CMD_MEMORY_READ, EP1_CMD_MEMORY_WRITE, EP1_CMD_SET_PORTD_LEDS, EP1_CMD_SET_PORTD_VPP, ep1_generic_commandl(), ERROR_FAIL, ERROR_OK, hdev, INTERFACE_NAME, jtag_libusb_bulk_read(), jtag_libusb_open(), LIBUSB_TIMEOUT_MS, LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, rlink_reset(), ST7_PA_NTRST, ST7_PADDR, ST7_PADR, ST7_PBDDR, ST7_PBDR, ST7_PD_VPP_SHDN, ST7_PE_ADAPTER_SENSE_IN, ST7_PE_ADAPTER_SENSE_OUT, ST7_PEDR, tap_state_queue_init(), USB_EP1IN_ADDR, USB_EP1IN_SIZE, USB_EP1OUT_SIZE, USB_IDPRODUCT, and USB_IDVENDOR.
|
static |
Definition at line 1420 of file rlink.c.
References ERROR_FAIL, ERROR_OK, LOG_ERROR, LOG_WARNING, rlink_speed_table::prescaler, and rlink_speed_table_size.
|
static |
Definition at line 870 of file rlink.c.
References cmd, LOG_ERROR, tap_get_state(), tap_set_end_state(), tap_set_state, tap_state_name(), tap_state_queue_append(), and tap_state_transition().
Referenced by rlink_execute_queue().
|
static |
Definition at line 920 of file rlink.c.
References EP1_CMD_DTC_GET_CACHED_STATUS, EP1_CMD_MEMORY_READ, EP1_CMD_MEMORY_WRITE, ep1_generic_commandl(), ERROR_OK, hdev, jtag_libusb_bulk_read(), LIBUSB_TIMEOUT_MS, LOG_ERROR, ST7_PA_NTRST, ST7_PADR, ST7_PB_NSRST, ST7_PBDDR, and USB_EP1IN_ADDR.
Referenced by rlink_execute_queue(), and rlink_init().
|
static |
Definition at line 899 of file rlink.c.
References rlink_end_state(), rlink_state_move(), tap_get_end_state(), tap_get_state(), TAP_IDLE, and tap_state_queue_append().
Referenced by rlink_execute_queue().
|
static |
Definition at line 1018 of file rlink.c.
References buffer, cmd, DTC_CMD_SHIFT_TDI_BYTES, DTC_CMD_SHIFT_TDIO_BITS, DTC_CMD_SHIFT_TDIO_BYTES, DTC_CMD_SHIFT_TDO_BYTES, DTC_CMD_SHIFT_TMS_TDI_BIT_PAIR, dtc_queue, dtc_queue_enqueue_reply(), dtc_queue_run_if_full(), LOG_ERROR, rlink_end_state(), rlink_state_move(), SCAN_IN, SCAN_OUT, TAP_DRPAUSE, TAP_DRSHIFT, tap_get_end_state(), tap_get_state(), TAP_IRPAUSE, TAP_IRSHIFT, tap_set_state, tap_state_queue_append(), tap_state_queue_run(), type, and USB_EP2IN_SIZE.
Referenced by rlink_execute_queue().
|
static |
Definition at line 1372 of file rlink.c.
References dtc_load_from_buffer(), dtc_start_download(), ERROR_FAIL, ERROR_OK, hdev, LOG_ERROR, rlink_speed_table::prescaler, and rlink_speed_table_size.
|
static |
Definition at line 1405 of file rlink.c.
References ERROR_FAIL, ERROR_OK, rlink_speed_table::khz, LOG_ERROR, and rlink_speed_table_size.
|
static |
Definition at line 855 of file rlink.c.
References tap_get_end_state(), tap_get_state(), tap_get_tms_path(), tap_get_tms_path_len(), tap_set_state, and tap_state_queue_append().
Referenced by rlink_execute_queue(), rlink_runtest(), and rlink_scan().
|
static |
Definition at line 828 of file rlink.c.
References tap_state_queue, and tap_state_queue_run().
Referenced by rlink_path_move(), rlink_runtest(), rlink_scan(), and rlink_state_move().
|
static |
Definition at line 772 of file rlink.c.
References tap_state_queue.
Referenced by rlink_init(), and tap_state_queue_run().
|
static |
Definition at line 779 of file rlink.c.
References bits, DTC_CMD_SHIFT_TMS_BITS, DTC_CMD_SHIFT_TMS_BYTES, dtc_queue, dtc_queue_run_if_full(), tap_state_queue, and tap_state_queue_init().
Referenced by rlink_execute_queue(), rlink_scan(), and tap_state_queue_append().
uint32_t buffer |
Definition at line 579 of file rlink.c.
Referenced by dtc_load_from_buffer(), dtc_queue_enqueue_reply(), ep1_memory_write(), rlink_execute_queue(), and rlink_scan().
uint8_t cmd_buffer[USB_EP2BANK_SIZE] |
uint32_t cmd_index |
Definition at line 566 of file rlink.c.
Referenced by stlink_usb_misc_rw_segment().
|
static |
Definition at line 283 of file rlink.c.
Referenced by dtc_load_from_buffer(), and dtc_start_download().
struct { ... } dtc_queue |
Referenced by dtc_queue_enqueue_reply(), dtc_queue_init(), dtc_queue_run(), dtc_queue_run_if_full(), rlink_scan(), and tap_state_queue_run().
|
static |
Definition at line 87 of file rlink.c.
Referenced by dtc_queue_run(), dtc_start_download(), rlink_execute_queue(), rlink_init(), rlink_reset(), and rlink_speed().
uint32_t length |
Definition at line 578 of file rlink.c.
Referenced by dtc_load_from_buffer(), dtc_queue_enqueue_reply(), ep1_generic_commandl(), and ep1_memory_write().
struct adapter_driver rlink_adapter_driver |
|
static |
struct dtc_reply_queue_entry* rq_head |
struct dtc_reply_queue_entry* rq_tail |
struct { ... } tap_state_queue |
Referenced by tap_state_queue_append(), tap_state_queue_init(), and tap_state_queue_run().