Zephyr API 3.6.99
Loading...
Searching...
No Matches
semihost.h File Reference

public Semihosting APIs based on ARM definitions. More...

Go to the source code of this file.

Enumerations

enum  semihost_instr {
  SEMIHOST_OPEN = 0x01 , SEMIHOST_ISTTY = 0x09 , SEMIHOST_WRITE = 0x05 , SEMIHOST_READ = 0x06 ,
  SEMIHOST_CLOSE = 0x02 , SEMIHOST_FLEN = 0x0C , SEMIHOST_SEEK = 0x0A , SEMIHOST_TMPNAM = 0x0D ,
  SEMIHOST_REMOVE = 0x0E , SEMIHOST_RENAME = 0x0F , SEMIHOST_WRITEC = 0x03 , SEMIHOST_WRITE0 = 0x04 ,
  SEMIHOST_READC = 0x07 , SEMIHOST_CLOCK = 0x10 , SEMIHOST_ELAPSED = 0x30 , SEMIHOST_TICKFREQ = 0x31 ,
  SEMIHOST_TIME = 0x11 , SEMIHOST_ERRNO = 0x13 , SEMIHOST_GET_CMDLINE = 0x15 , SEMIHOST_HEAPINFO = 0x16 ,
  SEMIHOST_ISERROR = 0x08 , SEMIHOST_SYSTEM = 0x12
}
 Semihosting instructions. More...
 
enum  semihost_open_mode {
  SEMIHOST_OPEN_R = 0 , SEMIHOST_OPEN_RB = 1 , SEMIHOST_OPEN_R_PLUS = 2 , SEMIHOST_OPEN_RB_PLUS = 3 ,
  SEMIHOST_OPEN_W = 4 , SEMIHOST_OPEN_WB = 5 , SEMIHOST_OPEN_W_PLUS = 6 , SEMIHOST_OPEN_WB_PLUS = 7 ,
  SEMIHOST_OPEN_A = 8 , SEMIHOST_OPEN_AB = 9 , SEMIHOST_OPEN_A_PLUS = 10 , SEMIHOST_OPEN_AB_PLUS = 11
}
 Modes to open a file with. More...
 

Functions

long semihost_exec (enum semihost_instr instr, void *args)
 Manually execute a semihosting instruction.
 
char semihost_poll_in (void)
 Read a byte from the console.
 
void semihost_poll_out (char c)
 Write a byte to the console.
 
long semihost_open (const char *path, long mode)
 Open a file on the host system.
 
long semihost_close (long fd)
 Close a file.
 
long semihost_flen (long fd)
 Query the size of a file.
 
long semihost_seek (long fd, long offset)
 Seeks to an absolute position in a file.
 
long semihost_read (long fd, void *buf, long len)
 Read the contents of a file into a buffer.
 
long semihost_write (long fd, const void *buf, long len)
 Write the contents of a buffer into a file.
 

Detailed Description

public Semihosting APIs based on ARM definitions.