1.3 C and C++ library features

The C library uses the standard ARM® semihosted environment to provide facilities such as file input/output. This environment is supported by the ARM DSTREAM debug and trace unit, the ARM RVI debug unit, and the Fixed Virtual Platform (FVP) models.

You can re-implement any of the target-dependent functions of the C library as part of your application. This enables you to tailor the C library and, therefore, the C++ library, to your own execution environment.

You can also tailor many of the target-independent functions to your own application-specific requirements. For example:

  • The malloc family.

  • The ctype family.

  • All the locale-specific functions.

Many of the C library functions are independent of any other function and contain no target dependencies. You can easily exploit these functions from assembler code.

Functions in the C library are responsible for:

  • Creating an environment in which a C or C++ program can execute. This includes:

    • Creating a stack.

    • Creating a heap, if required.

    • Initializing the parts of the library the program uses.

  • Starting execution by calling main().

  • Supporting use of ISO-defined functions by the program.

  • Catching runtime errors and signals and, if required, terminating execution on error or program exit.

Non-ConfidentialPDF file icon PDF versionARM DUI0475M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.