22 #define ESP_XTENSA_DBGSTUBS_UPDATE_DATA_ENTRY(_e_) \
24 uint32_t __internal_val = (_e_); \
25 if (!xtensa_data_addr_valid(target, __internal_val)) { \
26 LOG_ERROR("No valid stub data entry found (0x%" PRIx32 ")!", __internal_val); \
31 #define ESP_XTENSA_DBGSTUBS_UPDATE_CODE_ENTRY(_e_) \
33 uint32_t __internal_val = (_e_); \
34 if (__internal_val == 0) { \
35 LOG_ERROR("No valid stub code entry found (0x%" PRIx32 ")!", __internal_val); \
53 LOG_ERROR(
"Failed to write trace status (%d)!", res);
124 uint32_t vec_addr = 0;
131 LOG_ERROR(
"Failed to read debug stubs address location (%d)!", res);
138 LOG_ERROR(
"Failed to clear debug stubs address location (%d)!", res);
162 LOG_ERROR(
"Failed to read debug stubs descriptor (%d)!", res);
int esp_dbgstubs_table_read(struct target *target, struct esp_dbg_stubs *dbg_stubs)
int esp_common_init(struct esp_common *esp, const struct esp_algorithm_hw *algo_hw)
#define ESP_XTENSA_DBGSTUBS_UPDATE_CODE_ENTRY(_e_)
static void esp_xtensa_dbgstubs_info_update(struct target *target)
static void esp_xtensa_dbgstubs_addr_check(struct target *target)
int esp_xtensa_init_arch_info(struct target *target, struct esp_xtensa_common *esp_xtensa, struct xtensa_debug_module_config *dm_cfg, const struct esp_semihost_ops *semihost_ops)
int esp_xtensa_poll(struct target *target)
#define ESP_XTENSA_DBGSTUBS_UPDATE_DATA_ENTRY(_e_)
int esp_xtensa_arch_state(struct target *target)
void esp_xtensa_target_deinit(struct target *target)
int esp_xtensa_target_init(struct command_context *cmd_ctx, struct target *target)
int esp_xtensa_breakpoint_remove(struct target *target, struct breakpoint *breakpoint)
static int esp_xtensa_dbgstubs_restore(struct target *target)
int esp_xtensa_breakpoint_add(struct target *target, struct breakpoint *breakpoint)
int esp_xtensa_on_halt(struct target *target)
static struct esp_xtensa_common * target_to_esp_xtensa(struct target *target)
const struct esp_algorithm_hw xtensa_algo_hw
int esp_xtensa_apptrace_status_reg_write(struct target *target, uint32_t stat)
int esp_xtensa_apptrace_status_reg_read(struct target *target, uint32_t *stat)
struct esp32_apptrace_hw esp_xtensa_apptrace_hw
#define LOG_TARGET_INFO(target, fmt_str,...)
#define LOG_TARGET_DEBUG(target, fmt_str,...)
#define LOG_ERROR(expr ...)
#define LOG_DEBUG(expr ...)
struct esp_dbg_stubs dbg_stubs
uint32_t min_stack_addr
Pre-compiled target buffer's addr for stack.
uint32_t data_free
Address of free-like function to free buffer allocated with data_alloc.
uint32_t tramp_addr
Address of pre-compiled target buffer for stub trampoline.
uint32_t data_alloc
Address of malloc-like function to allocate buffer on target.
uint32_t entries[ESP_DBG_STUB_ENTRY_MAX]
Table contents.
struct esp_dbg_stubs_desc desc
Debug stubs decsriptor.
uint32_t entries_count
Number of table entries.
struct esp_semihost_ops * ops
Semihost calls handling operations.
const struct esp32_apptrace_hw * hw
struct esp_semihost_data semihost
struct esp_xtensa_apptrace_info apptrace
Represents a generic Xtensa core.
struct xtensa_debug_module dbg_mod
int target_read_buffer(struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer)
static bool target_was_examined(const struct target *target)
int xtensa_breakpoint_add(struct target *target, struct breakpoint *breakpoint)
void xtensa_target_deinit(struct target *target)
int xtensa_poll(struct target *target)
int xtensa_breakpoint_remove(struct target *target, struct breakpoint *breakpoint)
int xtensa_target_init(struct command_context *cmd_ctx, struct target *target)
int xtensa_init_arch_info(struct target *target, struct xtensa *xtensa, const struct xtensa_debug_module_config *dm_cfg)
static struct xtensa * target_to_xtensa(struct target *target)
static bool xtensa_data_addr_valid(struct target *target, uint32_t addr)
static xtensa_pwrstat_t xtensa_dm_power_status_get(struct xtensa_debug_module *dm)
#define PWRSTAT_COREWASRESET(x)