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 _close (int file)
 
int _fstat (int file, struct stat *st)
 
int _getpid ()
 
int _isatty (int file)
 
int _kill (int pid, int sig)
 
int _lseek (int file, int ptr, int dir)
 
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
 

Detailed Description

Function Documentation

◆ _close()

int _close ( int file)

Close file handle.

◆ _exit()

void _exit ( int status)

Exit a program without cleaning up anything.

◆ _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. We only support terminal outputs here.

◆ _kill()

int _kill ( int pid,
int sig )

Send a signal.

◆ _lseek()

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

Set position in a file.

◆ _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.

◆ _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.