Datasheet
The C and C++ Libraries
4-16 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
Using high-level functions
High-level I/O functions,
fprintf()
for example, can be used if the low-level functions,
fputc()
for example, are re-implemented. Most of the formatted output functions also
require a call to
setlocale()
. See Tailoring the input/output functions on page 4-75 for
instructions.
Anything that uses locale must not be called before first calling
setlocale()
to initialize
it, for example call
setlocale(LC_ALL, "C")
. Locale-using functions are described in The
standalone C library functions. These include the functions in
ctype.h
and
locale.h
, the
printf()
family, the
scanf()
family,
ato*
,
strto*
,
strcoll/strxfrm
, and much of
time.h
.
Using malloc()
If heap support is required for bare machine C,
_init_alloc()
must be called first to
supply initial heap bounds, and
__rt_heap_extend()
must be provided even if it only
returns failure. Prototypes for both functions are in
rt_heap.h
.
4.3.5 The standalone C library functions
The following sections list the include files and the functions in them that are available
with an uninitialized library. Some otherwise unavailable functions can be used if the
library functions they depend on are re-implemented.
alloca.h
Functions listed in this file are not available without library initialization. See Building
an application with the C library on page 4-6 for instructions.
assert.h
Functions listed in this file require high-level stdio,
__rt_raise()
, and
_sys_exit()
. See
Tailoring error signaling, error handling, and program exit on page 4-51 for
instructions.
ctype.h
Functions listed in this file require the
locale
functions.
errno.h
Functions in this file work without the requirement for any library initialization or
function re-implementation.