OpenOCD
esp_xtensa_semihosting.h File Reference
Include dependency graph for esp_xtensa_semihosting.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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)
 

Function Documentation

◆ esp_xtensa_semihosting()

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.

Parameters
targetPointer to the ESP Xtensa target to process.
retvalPointer to a location where the return code will be stored
Returns
SEMIHOSTING_HANDLED if a request was processed or SEMIHOSTING_NONE with the proper retval

Definition at line 50 of file esp_xtensa_semihosting.c.

References a2, a3, 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().

◆ esp_xtensa_semihosting_init()