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

Fields

Field
Declared as
Description
bool
A flag reporting whether semihosting is active.
int
Semihosting STDIO file descriptors.
int stdin_fd,
Semihosting STDIO file descriptors.
Semihosting STDIO file descriptors.
redirection configuration, NONE by default.
struct connection *
Handle to redirect semihosting print via tcp.
bool
A flag reporting whether semihosting fileio is active.
bool
A flag reporting whether semihosting fileio operation is active.
bool
Most are resumable, except the two exit calls.
bool
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).
size_t
The Target (hart) word size; 8 for 64-bits targets.
int
The current semihosting operation (R0 on ARM).
uint64_t
The current semihosting parameter (R1 or ARM).
int64_t
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.
int
The value to be returned by semihosting SYS_ERRNO request.
char *
The semihosting command line to be passed to the target.
clock_t
The current time when 'execution starts'.
char *
Base directory for semihosting I/O operations.
int (*)(struct target *target)
Target's extension of semihosting user commands.
int (*)(struct target *target, int enable)
int (*)(struct target *target)

References

from examples