Datasheet

The C and C++ Libraries
4-14 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
Ensure that your initialization veneer is executed by, for example, placing it in
your reset handler.
Build your application using
-fpu none
and link it normally. The linker will use
the appropriate C library variant to find any needed compiler helper functions.
Many library facilities require
__user_libspace()
for static data. Even without the
initialization code activated by having a
main()
function,
__user_libspace()
is created
automatically and uses 96 bytes in the ZI segment.
4.3.3 Bare machine C with floating-point
If you want to use floating-point processing in your application you must:
perform the steps necessary for integer C as described above in Bare machine
integer C on page 4-13
use the appropriate FPU option when you build your application
call
_fp_init()
to initialize the floating-point status register before performing
any floating-point operations.
If you are using software floating-point, you can also define the function
__rt_fp_status_addr()
to return the address of a writable data word to be used instead
of the floating-point status register. If you do not do this, the
user_libspace
area is
created which occupies over 90 bytes.
4.3.4 Exploiting the C library
If you create an application that includes a
main()
function, the linker automatically
includes the initialization code necessary for the execution environment. See Building
an application with the C library on page 4-6 for instructions. There are situations
though where this is not desirable or possible.
You can create an application that consists of customized startup code and still use many
of the library functions. You must either:
avoid functions that require initialization
provide the initialization and low-level support functions.