OpenOCD
|
Go to the source code of this file.
Macros | |
#define | ESP_XTENSA_SYSCALL 0x41E0 /* XT_INS_BREAK(1, 14) */ |
#define | ESP_XTENSA_SYSCALL_SZ 3 |
#define | XTENSA_SYSCALL_ERRNO_REG XT_REG_IDX_A3 |
#define | XTENSA_SYSCALL_OP_REG XT_REG_IDX_A2 |
#define | XTENSA_SYSCALL_RETVAL_REG XT_REG_IDX_A2 |
Functions | |
int | esp_xtensa_semihosting (struct target *target, int *retval) |
Checks and processes an ESP Xtensa semihosting request. More... | |
int | esp_xtensa_semihosting_init (struct target *target) |
static int | esp_xtensa_semihosting_post_result (struct target *target) |
static int | esp_xtensa_semihosting_setup (struct target *target, int enable) |
static int | xtensa_semihosting_init (struct target *target) |
#define ESP_XTENSA_SYSCALL 0x41E0 /* XT_INS_BREAK(1, 14) */ |
Definition at line 17 of file esp_xtensa_semihosting.c.
#define ESP_XTENSA_SYSCALL_SZ 3 |
Definition at line 18 of file esp_xtensa_semihosting.c.
#define XTENSA_SYSCALL_ERRNO_REG XT_REG_IDX_A3 |
Definition at line 22 of file esp_xtensa_semihosting.c.
#define XTENSA_SYSCALL_OP_REG XT_REG_IDX_A2 |
Definition at line 20 of file esp_xtensa_semihosting.c.
#define XTENSA_SYSCALL_RETVAL_REG XT_REG_IDX_A2 |
Definition at line 21 of file esp_xtensa_semihosting.c.
int esp_xtensa_semihosting | ( | struct target * | target, |
int * | retval | ||
) |
Checks and processes an ESP Xtensa semihosting request.
This is meant to be called when the target is stopped due to a debug mode entry. If the value 0 is returned then there was nothing to process. A non-zero return value signifies that a request was processed and the target resumed, or an error was encountered, in which case the caller must return immediately.
target | Pointer to the ESP Xtensa target to process. |
retval | Pointer to a location where the return code will be stored |
Definition at line 50 of file esp_xtensa_semihosting.c.
References semihosting::basedir, buf_get_u32(), DEBUGCAUSE_BI, DEBUGCAUSE_BN, ERROR_OK, ESP_XTENSA_SYSCALL, ESP_XTENSA_SYSCALL_SZ, semihosting::hit_fileio, semihosting::is_resumable, LOG_TARGET_DEBUG, LOG_TARGET_ERROR, esp_semihost_data::need_resume, semihosting::op, esp_semihost_data::ops, semihosting::param, esp_semihost_ops::prepare, esp_xtensa_common::semihost, target::semihosting, semihosting_common(), SEMIHOSTING_HANDLED, SEMIHOSTING_NONE, target_read_memory(), target_to_esp_xtensa(), XT_REG_IDX_A2, XT_REG_IDX_A3, XT_REG_IDX_DEBUGCAUSE, XT_REG_IDX_PC, and xtensa_reg_get().
Referenced by esp32s2_poll(), and esp_xtensa_smp_poll().
int esp_xtensa_semihosting_init | ( | struct target * | target | ) |
Definition at line 106 of file esp_xtensa_semihosting.c.
References ERROR_OK, esp_semihosting_common(), target::semihosting, semihosting::user_command_extension, semihosting::word_size_bytes, and xtensa_semihosting_init().
Referenced by esp_xtensa_smp_target_init().
|
static |
Definition at line 31 of file esp_xtensa_semihosting.c.
References ERROR_OK, semihosting::result, target::semihosting, semihosting::sys_errno, xtensa_reg_set(), XTENSA_SYSCALL_ERRNO_REG, and XTENSA_SYSCALL_RETVAL_REG.
Referenced by xtensa_semihosting_init().
|
static |
Definition at line 24 of file esp_xtensa_semihosting.c.
References ERROR_OK, and LOG_TARGET_DEBUG.
Referenced by xtensa_semihosting_init().
|
static |
Definition at line 101 of file esp_xtensa_semihosting.c.
References esp_xtensa_semihosting_post_result(), esp_xtensa_semihosting_setup(), and semihosting_common_init().
Referenced by esp_xtensa_semihosting_init().