NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
neorv32_newlib.c File Reference

NEORV32-specific Newlib system calls. More...

#include <neorv32.h>
#include <newlib.h>
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <errno.h>

Functions

void _exit (int status)
 
int _open (char *pathname, int flags)
 
int _close (int file)
 
int _fstat (int file, struct stat *st)
 
int _fork (void)
 
int _getpid ()
 
int _isatty (int file)
 
int _kill (int pid, int sig)
 
int _link (char *old_name, char *new_name)
 
int _lseek (int file, int ptr, int dir)
 
int _stat (char *file, struct stat *st)
 
int _wait (int status)
 
int _unlink (char *name)
 
int _read (int file, char *ptr, int len)
 
int _write (int file, char *ptr, int len)
 
void * _sbrk (int incr)
 
int _gettimeofday (struct timeval *tv)
 

Variables

int errno
 
char * __env [1] = { 0 }
 
char ** environ = __env
 

Detailed Description

Function Documentation

◆ _close()

int _close ( int file)

Close file handle.

◆ _exit()

void _exit ( int status)

Issue a warning when semihosting is enabled. Exit a program without cleaning up anything.

◆ _fork()

int _fork ( void )

Create new process.

◆ _fstat()

int _fstat ( int file,
struct stat * st )

Status of an open file. All files are regarded as character special devices.

◆ _getpid()

int _getpid ( )

Process-ID; this is sometimes used to generate strings unlikely to conflict with other processes.

◆ _gettimeofday()

int _gettimeofday ( struct timeval * tv)

Get Unix time. Used by "time", among others.

◆ _isatty()

int _isatty ( int file)

Query whether output stream is a terminal.

◆ _kill()

int _kill ( int pid,
int sig )

Send a signal.

◆ _link()

int _link ( char * old_name,
char * new_name )

Rename existing file.

◆ _lseek()

int _lseek ( int file,
int ptr,
int dir )

Set position in a file.

◆ _open()

int _open ( char * pathname,
int flags )

Open file handle.

◆ _read()

int _read ( int file,
char * ptr,
int len )

Read from a file. STDIN will read from UART0, all other input streams will read from UART1.

◆ _sbrk()

void * _sbrk ( int incr)

Dynamic memory management. Used by "malloc" and "free", among others.

◆ _stat()

int _stat ( char * file,
struct stat * st )

Status of a file.

◆ _unlink()

int _unlink ( char * name)

Remove a file's directory entry.

◆ _wait()

int _wait ( int status)

Wait for child process.

◆ _write()

int _write ( int file,
char * ptr,
int len )

Write to a file. STDOUT and STDERR will write to UART0, all other output streams will write to UART1.