OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | esirisc_jtag |
Macros | |
#define | DEBUG_ASSERT_RESET 0xf4 |
#define | DEBUG_BREAK 0xf8 |
#define | DEBUG_CONTINUE 0xfa |
#define | DEBUG_DEASSERT_RESET 0xf6 |
#define | DEBUG_DISABLE_DEBUG 0xf2 |
#define | DEBUG_ENABLE_DEBUG 0xf0 |
#define | DEBUG_FLUSH_CACHES 0xfc |
#define | DEBUG_NOP 0x00 |
#define | DEBUG_READ_BYTE 0x10 |
#define | DEBUG_READ_CSR 0xd0 |
#define | DEBUG_READ_HWORD 0x20 |
#define | DEBUG_READ_REG 0xb0 |
#define | DEBUG_READ_WORD 0x30 |
#define | DEBUG_WRITE_BYTE 0x60 |
#define | DEBUG_WRITE_CSR 0xe0 |
#define | DEBUG_WRITE_HWORD 0x70 |
#define | DEBUG_WRITE_REG 0xc0 |
#define | DEBUG_WRITE_WORD 0x80 |
#define | EID_CANT_DEBUG 0x3e |
#define | EID_NONE 0x3f |
#define | EID_OVERFLOW 0x3d |
#define | INSTR_BYPASS 0xf |
#define | INSTR_DEBUG 0x9 |
#define | INSTR_IDCODE 0x8 |
#define | INSTR_LENGTH 4 |
#define | PAD_BYTE 0xaa |
#define | STUFF_MARKER 0x55 |
Functions | |
int | esirisc_jtag_assert_reset (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_break (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_continue (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_deassert_reset (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_disable_debug (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_enable_debug (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_flush_caches (struct esirisc_jtag *jtag_info) |
uint8_t | esirisc_jtag_get_eid (struct esirisc_jtag *jtag_info) |
bool | esirisc_jtag_is_debug_active (struct esirisc_jtag *jtag_info) |
bool | esirisc_jtag_is_stopped (struct esirisc_jtag *jtag_info) |
int | esirisc_jtag_read_byte (struct esirisc_jtag *jtag_info, uint32_t address, uint8_t *data) |
int | esirisc_jtag_read_csr (struct esirisc_jtag *jtag_info, uint8_t bank, uint8_t csr, uint32_t *data) |
int | esirisc_jtag_read_hword (struct esirisc_jtag *jtag_info, uint32_t address, uint16_t *data) |
int | esirisc_jtag_read_reg (struct esirisc_jtag *jtag_info, uint8_t reg, uint32_t *data) |
int | esirisc_jtag_read_word (struct esirisc_jtag *jtag_info, uint32_t address, uint32_t *data) |
int | esirisc_jtag_write_byte (struct esirisc_jtag *jtag_info, uint32_t address, uint8_t data) |
int | esirisc_jtag_write_csr (struct esirisc_jtag *jtag_info, uint8_t bank, uint8_t csr, uint32_t data) |
int | esirisc_jtag_write_hword (struct esirisc_jtag *jtag_info, uint32_t address, uint16_t data) |
int | esirisc_jtag_write_reg (struct esirisc_jtag *jtag_info, uint8_t reg, uint32_t data) |
int | esirisc_jtag_write_word (struct esirisc_jtag *jtag_info, uint32_t address, uint32_t data) |
#define DEBUG_ASSERT_RESET 0xf4 |
Definition at line 35 of file esirisc_jtag.h.
#define DEBUG_BREAK 0xf8 |
Definition at line 37 of file esirisc_jtag.h.
#define DEBUG_CONTINUE 0xfa |
Definition at line 38 of file esirisc_jtag.h.
#define DEBUG_DEASSERT_RESET 0xf6 |
Definition at line 36 of file esirisc_jtag.h.
#define DEBUG_DISABLE_DEBUG 0xf2 |
Definition at line 34 of file esirisc_jtag.h.
#define DEBUG_ENABLE_DEBUG 0xf0 |
Definition at line 33 of file esirisc_jtag.h.
#define DEBUG_FLUSH_CACHES 0xfc |
Definition at line 39 of file esirisc_jtag.h.
#define DEBUG_NOP 0x00 |
Definition at line 22 of file esirisc_jtag.h.
#define DEBUG_READ_BYTE 0x10 |
Definition at line 23 of file esirisc_jtag.h.
#define DEBUG_READ_CSR 0xd0 |
Definition at line 31 of file esirisc_jtag.h.
#define DEBUG_READ_HWORD 0x20 |
Definition at line 24 of file esirisc_jtag.h.
#define DEBUG_READ_REG 0xb0 |
Definition at line 29 of file esirisc_jtag.h.
#define DEBUG_READ_WORD 0x30 |
Definition at line 25 of file esirisc_jtag.h.
#define DEBUG_WRITE_BYTE 0x60 |
Definition at line 26 of file esirisc_jtag.h.
#define DEBUG_WRITE_CSR 0xe0 |
Definition at line 32 of file esirisc_jtag.h.
#define DEBUG_WRITE_HWORD 0x70 |
Definition at line 27 of file esirisc_jtag.h.
#define DEBUG_WRITE_REG 0xc0 |
Definition at line 30 of file esirisc_jtag.h.
#define DEBUG_WRITE_WORD 0x80 |
Definition at line 28 of file esirisc_jtag.h.
#define EID_CANT_DEBUG 0x3e |
Definition at line 43 of file esirisc_jtag.h.
#define EID_NONE 0x3f |
Definition at line 44 of file esirisc_jtag.h.
#define EID_OVERFLOW 0x3d |
Definition at line 42 of file esirisc_jtag.h.
#define INSTR_BYPASS 0xf |
Definition at line 18 of file esirisc_jtag.h.
#define INSTR_DEBUG 0x9 |
Definition at line 17 of file esirisc_jtag.h.
#define INSTR_IDCODE 0x8 |
Definition at line 16 of file esirisc_jtag.h.
#define INSTR_LENGTH 4 |
Definition at line 19 of file esirisc_jtag.h.
#define PAD_BYTE 0xaa |
Definition at line 48 of file esirisc_jtag.h.
#define STUFF_MARKER 0x55 |
Definition at line 47 of file esirisc_jtag.h.
int esirisc_jtag_assert_reset | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 498 of file esirisc_jtag.c.
References DEBUG_ASSERT_RESET, and esirisc_jtag_send_ctrl().
Referenced by esirisc_assert_reset(), and esirisc_debug_reset().
int esirisc_jtag_break | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 508 of file esirisc_jtag.c.
References DEBUG_BREAK, and esirisc_jtag_send_ctrl().
Referenced by esirisc_examine(), and esirisc_halt().
int esirisc_jtag_continue | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 513 of file esirisc_jtag.c.
References DEBUG_CONTINUE, and esirisc_jtag_send_ctrl().
Referenced by esirisc_deassert_reset(), esirisc_debug_step(), esirisc_examine(), and esirisc_resume_or_step().
int esirisc_jtag_deassert_reset | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 503 of file esirisc_jtag.c.
References DEBUG_DEASSERT_RESET, and esirisc_jtag_send_ctrl().
Referenced by esirisc_deassert_reset(), and esirisc_debug_reset().
int esirisc_jtag_disable_debug | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 493 of file esirisc_jtag.c.
References DEBUG_DISABLE_DEBUG, and esirisc_jtag_send_ctrl().
int esirisc_jtag_enable_debug | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 488 of file esirisc_jtag.c.
References DEBUG_ENABLE_DEBUG, and esirisc_jtag_send_ctrl().
Referenced by esirisc_debug_enable(), esirisc_poll(), and esirisc_wait_debug_active().
int esirisc_jtag_flush_caches | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 518 of file esirisc_jtag.c.
References DEBUG_FLUSH_CACHES, and esirisc_jtag_send_ctrl().
Referenced by esirisc_flush_caches().
uint8_t esirisc_jtag_get_eid | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 224 of file esirisc_jtag.c.
References esirisc_jtag::status.
Referenced by esirisc_jtag_check_status().
bool esirisc_jtag_is_debug_active | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 214 of file esirisc_jtag.c.
References esirisc_jtag::status.
Referenced by esirisc_examine(), esirisc_jtag_check_status(), esirisc_poll(), and esirisc_wait_debug_active().
bool esirisc_jtag_is_stopped | ( | struct esirisc_jtag * | jtag_info | ) |
Definition at line 219 of file esirisc_jtag.c.
References esirisc_jtag::status.
Referenced by esirisc_debug_enable(), esirisc_jtag_check_status(), and esirisc_poll().
int esirisc_jtag_read_byte | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint8_t * | data | ||
) |
Definition at line 237 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_READ_BYTE, ERROR_OK, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_read_memory().
int esirisc_jtag_read_csr | ( | struct esirisc_jtag * | jtag_info, |
uint8_t | bank, | ||
uint8_t | csr, | ||
uint32_t * | data | ||
) |
Definition at line 429 of file esirisc_jtag.c.
References ARRAY_SIZE, bank, csr, DEBUG_READ_CSR, ERROR_OK, esirisc_jtag_send_and_recv(), h_u16_to_be(), scan_field::in_value, le_to_h_u32(), LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_add_breakpoint(), esirisc_add_watchpoint(), esirisc_disable_interrupts(), esirisc_disable_step(), esirisc_enable_step(), esirisc_identify(), esirisc_read_csr(), esirisc_remove_breakpoint(), esirisc_remove_watchpoint(), esirisc_reset_entry(), esirisc_save_interrupts(), esirisc_trace_get_status(), esirisc_trace_read_buffer(), esirisc_trace_start(), and esirisc_trace_stop().
int esirisc_jtag_read_hword | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint16_t * | data | ||
) |
Definition at line 265 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_READ_HWORD, ERROR_OK, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, le_to_h_u16(), LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_read_memory().
int esirisc_jtag_read_reg | ( | struct esirisc_jtag * | jtag_info, |
uint8_t | reg, | ||
uint32_t * | data | ||
) |
Definition at line 383 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_READ_REG, ERROR_OK, esirisc_jtag_send_and_recv(), scan_field::in_value, le_to_h_u32(), LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_read_reg().
int esirisc_jtag_read_word | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint32_t * | data | ||
) |
Definition at line 293 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_READ_WORD, ERROR_OK, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, le_to_h_u32(), LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_read_memory(), and esirisc_reset_entry().
int esirisc_jtag_write_byte | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint8_t | data | ||
) |
Definition at line 321 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_WRITE_BYTE, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_write_memory().
int esirisc_jtag_write_csr | ( | struct esirisc_jtag * | jtag_info, |
uint8_t | bank, | ||
uint8_t | csr, | ||
uint32_t | data | ||
) |
Definition at line 457 of file esirisc_jtag.c.
References ARRAY_SIZE, bank, csr, DEBUG_WRITE_CSR, esirisc_jtag_send_and_recv(), h_u16_to_be(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_add_breakpoint(), esirisc_add_watchpoint(), esirisc_disable_interrupts(), esirisc_disable_step(), esirisc_enable_step(), esirisc_remove_breakpoint(), esirisc_remove_breakpoints(), esirisc_remove_watchpoint(), esirisc_remove_watchpoints(), esirisc_reset_entry(), esirisc_restore_hwdc(), esirisc_restore_interrupts(), esirisc_trace_clear_status(), esirisc_trace_init(), esirisc_trace_start(), esirisc_trace_stop(), and esirisc_write_csr().
int esirisc_jtag_write_hword | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint16_t | data | ||
) |
Definition at line 341 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_WRITE_HWORD, esirisc_jtag_send_and_recv(), h_u16_to_be(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_write_memory().
int esirisc_jtag_write_reg | ( | struct esirisc_jtag * | jtag_info, |
uint8_t | reg, | ||
uint32_t | data | ||
) |
Definition at line 409 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_WRITE_REG, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_write_reg().
int esirisc_jtag_write_word | ( | struct esirisc_jtag * | jtag_info, |
uint32_t | address, | ||
uint32_t | data | ||
) |
Definition at line 362 of file esirisc_jtag.c.
References ARRAY_SIZE, DEBUG_WRITE_WORD, esirisc_jtag_send_and_recv(), h_u32_to_be(), scan_field::in_value, LOG_DEBUG, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by esirisc_write_memory().