K-FSW v1.2.1-59-gcaca356
KFSW: modular flight software on Zephyr, for small satellites
Loading...
Searching...
No Matches
Semihost output

Macros

#define KFSW_SEMIHOST_MAX_WRITE   256U
 

Functions

int kfsw_semihost_write (const char *text, size_t size)
 

Description

Function Documentation

◆ kfsw_semihost_write()

int kfsw_semihost_write ( const char *  text,
size_t  size 
)

#include <semihost.h>

Write one bounded text record to the debugger, without waiting for access.

Requires KFSW_SEMIHOST and deliberate debugger semihost enablement before execution. An attached probe does not establish handler readiness. The debugger must remain attached throughout the call; detach can race the guard. No ISR, interrupt-masked or unprivileged calls are accepted. Concurrent calls are skipped. Host latency is unbounded. Does not log failures or retry writes.

Parameters
textRecord bytes, owned by the caller until return.
sizeNumber of bytes, from 1 through KFSW_SEMIHOST_MAX_WRITE.
Returns
0 on complete write, -EINVAL for invalid input, -ENOTSUP on unsupported targets, -ENODEV when detached, -EWOULDBLOCK for unsafe context, -EBUSY for concurrent access, or -EIO for failed, partial or invalid host write results.