OpenOCD
|
Go to the source code of this file.
Macros | |
#define | XTENSA_APPTRACE_BLOCK_ID(_id_) (((_id_) & XTENSA_APPTRACE_BLOCK_ID_MSK) << 15) |
#define | XTENSA_APPTRACE_BLOCK_ID_GET(_v_) (((_v_) >> 15) & XTENSA_APPTRACE_BLOCK_ID_MSK) |
#define | XTENSA_APPTRACE_BLOCK_ID_MAX XTENSA_APPTRACE_BLOCK_ID_MSK |
#define | XTENSA_APPTRACE_BLOCK_ID_MSK 0x7FUL |
#define | XTENSA_APPTRACE_BLOCK_LEN(_l_) ((_l_) & XTENSA_APPTRACE_BLOCK_LEN_MSK) |
#define | XTENSA_APPTRACE_BLOCK_LEN_GET(_v_) ((_v_) & XTENSA_APPTRACE_BLOCK_LEN_MSK) |
#define | XTENSA_APPTRACE_BLOCK_LEN_MSK 0x7FFFUL |
#define | XTENSA_APPTRACE_CTRL_REG XDMREG_DELAYCNT |
#define | XTENSA_APPTRACE_HOST_CONNECT BIT(23) |
#define | XTENSA_APPTRACE_HOST_DATA BIT(22) |
#define | XTENSA_APPTRACE_STAT_REG XDMREG_TRIGGERPC |
Functions | |
uint32_t | esp_xtensa_apptrace_block_max_size_get (struct target *target) |
static int | esp_xtensa_apptrace_buffs_write (struct target *target, uint32_t bufs_num, uint32_t buf_sz[], const uint8_t *bufs[], uint32_t block_id, bool ack, bool data) |
int | esp_xtensa_apptrace_ctrl_reg_read (struct target *target, uint32_t *block_id, uint32_t *len, bool *conn) |
int | esp_xtensa_apptrace_ctrl_reg_write (struct target *target, uint32_t block_id, uint32_t len, bool conn, bool data) |
int | esp_xtensa_apptrace_data_len_read (struct target *target, uint32_t *block_id, uint32_t *len) |
static int | esp_xtensa_apptrace_data_normal_read (struct xtensa *xtensa, uint32_t size, uint8_t *buffer, uint8_t *unal_bytes) |
int | esp_xtensa_apptrace_data_read (struct target *target, uint32_t size, uint8_t *buffer, uint32_t block_id, bool ack) |
static int | esp_xtensa_apptrace_data_reverse_read (struct xtensa *xtensa, uint32_t size, uint8_t *buffer, uint8_t *unal_bytes) |
static int | esp_xtensa_apptrace_leave_crit_section_start (struct target *target) |
static int | esp_xtensa_apptrace_leave_crit_section_stop (struct target *target) |
static int | esp_xtensa_apptrace_queue_normal_write (struct target *target, uint32_t bufs_num, uint32_t buf_sz[], const uint8_t *bufs[]) |
static int | esp_xtensa_apptrace_queue_reverse_write (struct target *target, uint32_t bufs_num, uint32_t buf_sz[], const uint8_t *bufs[]) |
int | esp_xtensa_apptrace_status_reg_read (struct target *target, uint32_t *stat) |
int | esp_xtensa_apptrace_status_reg_write (struct target *target, uint32_t stat) |
uint32_t | esp_xtensa_apptrace_usr_block_max_size_get (struct target *target) |
int | esp_xtensa_apptrace_usr_block_write (struct target *target, uint32_t block_id, const uint8_t *data, uint32_t size) |
static int | esp_xtensa_swdbg_activate (struct target *target, int enab) |
Variables | |
struct esp32_apptrace_hw | esp_xtensa_apptrace_hw |
#define XTENSA_APPTRACE_BLOCK_ID | ( | _id_ | ) | (((_id_) & XTENSA_APPTRACE_BLOCK_ID_MSK) << 15) |
Definition at line 35 of file esp_xtensa_apptrace.c.
#define XTENSA_APPTRACE_BLOCK_ID_GET | ( | _v_ | ) | (((_v_) >> 15) & XTENSA_APPTRACE_BLOCK_ID_MSK) |
Definition at line 36 of file esp_xtensa_apptrace.c.
#define XTENSA_APPTRACE_BLOCK_ID_MAX XTENSA_APPTRACE_BLOCK_ID_MSK |
Definition at line 27 of file esp_xtensa_apptrace.c.
#define XTENSA_APPTRACE_BLOCK_ID_MSK 0x7FUL |
Definition at line 26 of file esp_xtensa_apptrace.c.
#define XTENSA_APPTRACE_BLOCK_LEN | ( | _l_ | ) | ((_l_) & XTENSA_APPTRACE_BLOCK_LEN_MSK) |
Definition at line 33 of file esp_xtensa_apptrace.c.
#define XTENSA_APPTRACE_BLOCK_LEN_GET | ( | _v_ | ) | ((_v_) & XTENSA_APPTRACE_BLOCK_LEN_MSK) |
Definition at line 34 of file esp_xtensa_apptrace.c.
#define XTENSA_APPTRACE_BLOCK_LEN_MSK 0x7FFFUL |
Definition at line 32 of file esp_xtensa_apptrace.c.
#define XTENSA_APPTRACE_CTRL_REG XDMREG_DELAYCNT |
Definition at line 25 of file esp_xtensa_apptrace.c.
#define XTENSA_APPTRACE_HOST_CONNECT BIT(23) |
Definition at line 38 of file esp_xtensa_apptrace.c.
#define XTENSA_APPTRACE_HOST_DATA BIT(22) |
Definition at line 37 of file esp_xtensa_apptrace.c.
#define XTENSA_APPTRACE_STAT_REG XDMREG_TRIGGERPC |
Definition at line 30 of file esp_xtensa_apptrace.c.
uint32_t esp_xtensa_apptrace_block_max_size_get | ( | struct target * | target | ) |
Definition at line 64 of file esp_xtensa_apptrace.c.
References xtensa_trace_config::addr, BIT, xtensa_trace_config::ctrl, xtensa::dbg_mod, ERROR_OK, LOG_DEBUG, LOG_ERROR, xtensa_trace_config::memaddr_end, xtensa_trace_config::memaddr_start, target_to_xtensa(), xtensa_dm_trace_config_read(), and xtensa_dm_trace_status_read().
Referenced by esp_xtensa_apptrace_usr_block_max_size_get().
|
static |
Definition at line 466 of file esp_xtensa_apptrace.c.
References xtensa::core_config, xtensa::dbg_mod, ERROR_OK, esp_xtensa_apptrace_queue_normal_write(), esp_xtensa_apptrace_queue_reverse_write(), LOG_DEBUG, LOG_ERROR, xtensa_tracing_config::reversed_mem_access, target_name(), target_to_xtensa(), xtensa_config::trace, XTENSA_APPTRACE_BLOCK_ID, XTENSA_APPTRACE_BLOCK_LEN, XTENSA_APPTRACE_CTRL_REG, XTENSA_APPTRACE_HOST_CONNECT, XTENSA_APPTRACE_HOST_DATA, xtensa_dm_queue_execute(), xtensa_dm_queue_tdi_idle(), and xtensa_queue_dbg_reg_write().
int esp_xtensa_apptrace_ctrl_reg_read | ( | struct target * | target, |
uint32_t * | block_id, | ||
uint32_t * | len, | ||
bool * | conn | ||
) |
Definition at line 217 of file esp_xtensa_apptrace.c.
References conn, xtensa::dbg_mod, ERROR_OK, target_buffer_get_u32(), target_to_xtensa(), XTENSA_APPTRACE_BLOCK_ID_GET, XTENSA_APPTRACE_BLOCK_LEN_GET, XTENSA_APPTRACE_CTRL_REG, XTENSA_APPTRACE_HOST_CONNECT, xtensa_dm_queue_execute(), xtensa_dm_queue_tdi_idle(), and xtensa_queue_dbg_reg_read().
Referenced by esp_xtensa_apptrace_data_len_read().
int esp_xtensa_apptrace_ctrl_reg_write | ( | struct target * | target, |
uint32_t | block_id, | ||
uint32_t | len, | ||
bool | conn, | ||
bool | data | ||
) |
Definition at line 195 of file esp_xtensa_apptrace.c.
References conn, xtensa::dbg_mod, ERROR_OK, LOG_ERROR, target_to_xtensa(), XTENSA_APPTRACE_BLOCK_ID, XTENSA_APPTRACE_BLOCK_LEN, XTENSA_APPTRACE_CTRL_REG, XTENSA_APPTRACE_HOST_CONNECT, XTENSA_APPTRACE_HOST_DATA, xtensa_dm_queue_execute(), xtensa_dm_queue_tdi_idle(), and xtensa_queue_dbg_reg_write().
int esp_xtensa_apptrace_data_len_read | ( | struct target * | target, |
uint32_t * | block_id, | ||
uint32_t * | len | ||
) |
Definition at line 97 of file esp_xtensa_apptrace.c.
References esp_xtensa_apptrace_ctrl_reg_read(), and NULL.
|
static |
Definition at line 136 of file esp_xtensa_apptrace.c.
References buffer, ERROR_OK, IS_ALIGNED, size, XDMREG_TRAXADDR, XDMREG_TRAXDATA, xtensa_queue_dbg_reg_read(), and xtensa_queue_dbg_reg_write().
Referenced by esp_xtensa_apptrace_data_read().
int esp_xtensa_apptrace_data_read | ( | struct target * | target, |
uint32_t | size, | ||
uint8_t * | buffer, | ||
uint32_t | block_id, | ||
bool | ack | ||
) |
Definition at line 157 of file esp_xtensa_apptrace.c.
References ALIGN_DOWN, buffer, xtensa::core_config, xtensa::dbg_mod, ERROR_OK, esp_xtensa_apptrace_data_normal_read(), esp_xtensa_apptrace_data_reverse_read(), IS_ALIGNED, LOG_DEBUG, LOG_ERROR, xtensa_tracing_config::reversed_mem_access, size, target_name(), target_to_xtensa(), xtensa_config::trace, XTENSA_APPTRACE_BLOCK_ID, XTENSA_APPTRACE_BLOCK_LEN, XTENSA_APPTRACE_CTRL_REG, XTENSA_APPTRACE_HOST_CONNECT, xtensa_dm_queue_execute(), xtensa_dm_queue_tdi_idle(), and xtensa_queue_dbg_reg_write().
|
static |
Definition at line 112 of file esp_xtensa_apptrace.c.
References ALIGN_UP, buffer, xtensa::core_config, ERROR_OK, IS_ALIGNED, xtensa_tracing_config::mem_sz, size, xtensa_config::trace, XDMREG_TRAXADDR, XDMREG_TRAXDATA, xtensa_queue_dbg_reg_read(), and xtensa_queue_dbg_reg_write().
Referenced by esp_xtensa_apptrace_data_read().
|
static |
Definition at line 287 of file esp_xtensa_apptrace.c.
References ERROR_OK, esp_xtensa_swdbg_activate(), and LOG_ERROR.
|
static |
Definition at line 299 of file esp_xtensa_apptrace.c.
References ERROR_OK, esp_xtensa_swdbg_activate(), and LOG_ERROR.
|
static |
Definition at line 390 of file esp_xtensa_apptrace.c.
References ERROR_OK, target_buffer_get_u32(), target_to_xtensa(), XDMREG_TRAXADDR, XDMREG_TRAXDATA, and xtensa_queue_dbg_reg_write().
Referenced by esp_xtensa_apptrace_buffs_write().
|
static |
Definition at line 309 of file esp_xtensa_apptrace.c.
References ALIGN_UP, xtensa::core_config, ERROR_OK, IS_ALIGNED, xtensa_tracing_config::mem_sz, target_buffer_get_u32(), target_to_xtensa(), xtensa_config::trace, XDMREG_TRAXADDR, XDMREG_TRAXDATA, and xtensa_queue_dbg_reg_write().
Referenced by esp_xtensa_apptrace_buffs_write().
int esp_xtensa_apptrace_status_reg_read | ( | struct target * | target, |
uint32_t * | stat | ||
) |
Definition at line 240 of file esp_xtensa_apptrace.c.
References buf_get_u32(), xtensa::dbg_mod, ERROR_OK, LOG_ERROR, target_to_xtensa(), XTENSA_APPTRACE_STAT_REG, xtensa_dm_queue_execute(), xtensa_dm_queue_tdi_idle(), and xtensa_queue_dbg_reg_read().
Referenced by esp_xtensa_dbgstubs_addr_check().
int esp_xtensa_apptrace_status_reg_write | ( | struct target * | target, |
uint32_t | stat | ||
) |
Definition at line 258 of file esp_xtensa_apptrace.c.
References xtensa::dbg_mod, ERROR_OK, LOG_ERROR, target_to_xtensa(), XTENSA_APPTRACE_STAT_REG, xtensa_dm_queue_execute(), xtensa_dm_queue_tdi_idle(), and xtensa_queue_dbg_reg_write().
Referenced by esp_xtensa_dbgstubs_addr_check(), and esp_xtensa_dbgstubs_restore().
uint32_t esp_xtensa_apptrace_usr_block_max_size_get | ( | struct target * | target | ) |
Definition at line 92 of file esp_xtensa_apptrace.c.
References esp_xtensa_apptrace_block_max_size_get().
int esp_xtensa_apptrace_usr_block_write | ( | struct target * | target, |
uint32_t | block_id, | ||
const uint8_t * | data, | ||
uint32_t | size | ||
) |
Definition at line 104 of file esp_xtensa_apptrace.c.
References esp_apptrace_usr_block_write(), esp_xtensa_apptrace_hw, and size.
|
static |
Definition at line 272 of file esp_xtensa_apptrace.c.
References target::cmd_name, xtensa::dbg_mod, ERROR_OK, LOG_ERROR, OCDDCR_DEBUGSWACTIVE, target_to_xtensa(), XDMREG_DCRCLR, XDMREG_DCRSET, xtensa_dm_queue_execute(), xtensa_dm_queue_tdi_idle(), and xtensa_queue_dbg_reg_write().
Referenced by esp_xtensa_apptrace_leave_crit_section_start(), and esp_xtensa_apptrace_leave_crit_section_stop().
struct esp32_apptrace_hw esp_xtensa_apptrace_hw |
Definition at line 42 of file esp_xtensa_apptrace.c.
Referenced by esp_xtensa_apptrace_usr_block_write(), and esp_xtensa_init_arch_info().