Keil™, An ARM® Company

RealView Libraries and Floating Point Support Guide

Tailoring the microlib input/output functions

3.4. Tailoring the microlib input/output functions

Microlib provides a limited stdio subsystem that supports unbuffered stdin, stdout and stderr only. This enables you to use printf() for displaying diagnostic messages from your application.

In order to use high level I/O functions you must provide your own implementation of the following base functions so that they work with your own I/O device.

fputc()

Implement this base function for all output functions. For example, fprintf(), printf(), fwrite(), fputs(), puts(), putc() and putchar().

fgetc()

Implement this base function for all input functions. For example, fscanf(), scanf(), fread(), read(), fgets(), gets(), getc() and getchar().

__backspace()

Implement this base function if your input functions use scanf() or fscanf().

Note

Conversions that are not supported in microlib are %lc, %ls and %a.

See Tailoring the input/output functions for more information.

Copyright © 2007 ARM Limited. All rights reserved.ARM DUI 0378A