semihosting is only used within OpenOCD.
 
Symbols
loading...
Files
loading...

semihosting struct

Syntax

struct semihosting;
Implemented in semihosting_common.h:109

Fields

is_active

A flag reporting whether semihosting is active. Read more...

stdin_fd

Semihosting STDIO file descriptors. Read more...

stdout_fd

Semihosting STDIO file descriptors. Read more...

stderr_fd

Semihosting STDIO file descriptors. Read more...

redirect_cfg

redirection configuration, NONE by default. Read more...

tcp_connection

Handle to redirect semihosting print via tcp. Read more...

is_fileio

A flag reporting whether semihosting fileio is active. Read more...

hit_fileio

A flag reporting whether semihosting fileio operation is active. Read more...

is_resumable

Most are resumable, except the two exit calls. Read more...

has_resumable_exit

When SEMIHOSTING_SYS_EXIT is called outside a debug session, things are simple, the openocd process calls exit() and passes the value returned by the target. When SEMIHOSTING_SYS_EXIT is called during a debug session, by default execution returns to the debugger, leaving the debugger in a HALT state, similar to the state entered when encountering a break. In some use cases, it is useful to have SEMIHOSTING_SYS_EXIT return normally, as any semihosting call, and do not break to the debugger. The standard allows this to happen, but the condition to trigger it is a bit obscure ("by performing an RDI_Execute request or equivalent"). To make the SEMIHOSTING_SYS_EXIT call return normally, enable this variable via the dedicated command (default: disabled). Read more...

word_size_bytes

The Target (hart) word size; 8 for 64-bits targets. Read more...

op

The current semihosting operation (R0 on ARM). Read more...

param

The current semihosting parameter (R1 or ARM). Read more...

result

The current semihosting result to be returned to the application. Usually 0 for success, -1 for error, but sometimes a useful value, even a pointer. Read more...

sys_errno

The value to be returned by semihosting SYS_ERRNO request. Read more...

cmdline

The semihosting command line to be passed to the target. Read more...

setup_time

The current time when 'execution starts'. Read more...

basedir

Base directory for semihosting I/O operations. Read more...

user_command_extension

Target's extension of semihosting user commands. Read more...

setup

No summary provided. Read more...

post_result

No summary provided. Read more...

References

LocationReferrerScopeText
semihosting_common.h:109
struct semihosting {
target.h:215
struct semihosting *semihosting;
arm_semihosting.c:179arm_semihosting()
struct semihosting *semihosting = target->semihosting;
esp_semihosting.c:30esp_semihosting_sys_seek()
struct semihosting *semihosting = target->semihosting;
esp_semihosting.c:40esp_semihosting_common()
struct semihosting *semihosting = target->semihosting;
esp_semihosting.c:98esp_semihosting_basedir_command()
struct semihosting *semihosting = target->semihosting;
riscv_semihosting.c:58riscv_semihosting()
struct semihosting *semihosting = target->semihosting;
riscv_semihosting.c:173riscv_semihosting_setup()
struct semihosting *semihosting = target->semihosting;
riscv_semihosting.c:182riscv_semihosting_post_result()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:116semihosting_common_init()
struct semihosting *semihosting;
semihosting_common.c:117semihosting_common_init()
semihosting = malloc(sizeof(*target->semihosting));
semihosting_common.c:157semihosting_tcp_service::semihostingsemihosting_tcp_service
struct semihosting *semihosting;
semihosting_common.c:162semihosting_is_redirected()
static bool semihosting_is_redirected(struct semihosting *semihosting, int fd)
semihosting_common.c:202semihosting_redirect_write()
static ssize_t semihosting_redirect_write(struct semihosting *semihosting, void *buf, int size)
semihosting_common.c:220semihosting_write()
static ssize_t semihosting_write(struct semihosting *semihosting, int fd, void *buf, int size)
semihosting_common.c:232semihosting_redirect_read()
static ssize_t semihosting_redirect_read(struct semihosting *semihosting, void *buf, int size)
semihosting_common.c:258semihosting_putchar()
static inline int semihosting_putchar(struct semihosting *semihosting, int fd, int c)
semihosting_common.c:267semihosting_read()
static inline ssize_t semihosting_read(struct semihosting *semihosting, int fd, void *buf, int size)
semihosting_common.c:280semihosting_getchar()
static inline int semihosting_getchar(struct semihosting *semihosting, int fd)
semihosting_common.c:368semihosting_common()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:1652semihosting_common_fileio_info()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:1671semihosting_common_fileio_end()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:1723semihosting_read_fields()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:1735semihosting_write_fields()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:1747semihosting_get_field()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:1761semihosting_set_field()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:1811semihosting_tcp_close_cnx()
static void semihosting_tcp_close_cnx(struct semihosting *semihosting)
semihosting_common.c:1843handle_common_semihosting_command()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:1884handle_common_semihosting_redirect_command()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:1969handle_common_semihosting_fileio_command()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:2000handle_common_semihosting_cmdline()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:2032handle_common_semihosting_resumable_exit_command()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:2056handle_common_semihosting_read_user_param_command()
struct semihosting *semihosting = target->semihosting;
semihosting_common.c:2089handle_common_semihosting_basedir_command()
struct semihosting *semihosting = target->semihosting;
target.c:2202target_destroy()
target.h:215target::semihostingtarget
struct semihosting *semihosting;

Type Use

Variables of semihosting type
arm_semihosting()::semihosting
semihosting_common_init()::semihosting
semihosting_common()::semihosting
semihosting_common_fileio_info()::semihosting
semihosting_common_fileio_end()::semihosting
semihosting_read_fields()::semihosting
semihosting_write_fields()::semihosting
semihosting_get_field()::semihosting
semihosting_set_field()::semihosting
handle_common_semihosting_command()::semihosting
handle_common_semihosting_redirect_command()::semihosting
handle_common_semihosting_fileio_command()::semihosting
handle_common_semihosting_cmdline()::semihosting
handle_common_semihosting_resumable_exit_command()::semihosting
handle_common_semihosting_read_user_param_command()::semihosting
handle_common_semihosting_basedir_command()::semihosting
riscv_semihosting()::semihosting
riscv_semihosting_setup()::semihosting
riscv_semihosting_post_result()::semihosting
esp_semihosting_sys_seek()::semihosting
esp_semihosting_common()::semihosting
esp_semihosting_basedir_command()::semihosting
all items filtered out
semihosting
Allocators of semihosting
Deletors of semihosting
all items filtered out
semihosting
all items filtered out