1.2. Scope of this document

This application note gives an introduction to building a Linux application or library, linked with the GNU C and C++ libraries, using the compilation tools provided as part of the RealView Development Suite (RVDS) 3.0. These are referred to in the rest of this application note as RVCT.

RVCT is primarily aimed at building static images for a standalone embedded system, rather than dynamically-linked images such as Linux applications. However, with RVCT 3.0 it is possible to create dynamic images that can run under Linux using the GNU C library.

This application note covers the command-line options used to build a Linux-compatible executable, and describes how to use header files and libraries from the GNU C library (glibc).

Expected use

This application note is intended to cover most expected use cases. It is specifically aimed at developing Linux applications and libraries in the following situations:

  • Building a standalone Linux application with RVCT

  • Building static and shared libraries with RVCT, and linking these to an application built with RVCT

  • Building a static or shared library with RVCT, and linking this to an application built with the GNU toolchain.

Example code

The following examples are supplied, with complete code and makefiles:

  • A "hello world" example, which is suitable as a template for your own application builds

  • The Dhrystone benchmark, as an example of a simple yet non-trivial application

  • A simple example of a C++ application

  • An example demonstrating how to build and use static and dynamic libraries with C and assembly code

  • An example demonstrating how to build and use static and dynamic libraries with C++ using a combination of GNU and RVCT tools.

For further details of the examples, please see Chapter 4.

Copyright © 2005-2006. All rights reserved.DAI0150B