Input/Output Functions - 2021.1 English

Xilinx Standalone Library Documentation OS and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2021-06-16
Version
2021.1 English

The embedded libraries contain standard C functions for Input/Output (I/O), such as printf and scanf. These functions are large and might not be suitable for embedded processors. The prototypes for these functions are available in the stdio.h file.

These I/O routines require that a newline is terminated with both a CR and LF. Ensure that your terminal CR/LF behavior corresponds to this requirement.

Note: The C standard I/O routines such as printf, scanf, vfprintf are, by default, line buffered. To change the buffering scheme to no buffering, you must call setvbuf appropriately. For example:
setvbuf (stdout, NULL, _IONBF, 0);

These I/O routines require that a newline is terminated with both a CR and LF. Ensure that your terminal CR/LF behavior corresponds to this requirement.

For more information on setting the standard input and standard output devices for a system, see Embedded System Tools Reference Manual (UG1043). In addition to the standard C functions, the Vitis IDE processors library provides the following smaller I/O functions:

Table 1. Quick Function Reference
Type Name Arguments
void print
  • void
void putnum
  • void
void xil_printf
  • void