Datasheet

Creating an Application
ARM DUI 0064D Copyright © 1999-2001 ARM Limited. All rights reserved. 3-23
You must re-implement functions that the C library uses to insulate itself from target
dependencies. For example, if you use
printf()
you must re-implement
fputc()
. If you
do not use the higher level input/output functions like
printf()
, you do not have to
re-implement the lower level functions like
fputc()
.
If you are building an application for a different execution environment, you can
re-implement the target-dependent functions (functions that use the semihosting SWI
or that depend on the target memory map). There are no target-dependent functions in
the C++ library. See the chapter on libraries in the ADS Compilers and Libraries Guide
for more information.
3.4.3 Building an application without the ARM libraries
Creating an application that has a
main()
function causes the C library initialization
functions to be included.
If your application does not have a
main()
function, the C library is not initialized and
the following features are not available to your application:
software stack checking
•low-level
stdio
signal-handling functions,
signal()
and
raise()
in
signal.h
atexit()
alloca()
.
You can create an application that consists of customized startup code, instead of the
library initialization 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.
These applications will not automatically use the full C run-time environment provided
by the C library. Even though you are creating an application without the library, some
helper functions from the library must be included. There are also many library
functions that can be made available with only minor re-implementations. See the
chapter on libraries in the ADS Compilers and Libraries Guide for more information.