RTEMS Logo

RTEMS 4.8.0 On-Line Library


C/C++ Sample Applications

PREV UP NEXT Bookshelf Getting Started with RTEMS

6.3: C/C++ Sample Applications

The C/C++ sample application set includes a number of simple applications. Some demonstrate some basic functionality in RTEMS such as writing a file, closing it, and reading it back while others can serve as starting points for RTEMS applications or libraries. Start by unarchiving them so you can peruse them. Use a command similar to the following to unarchive the sample applications:

cd tools
tar xjf ../archive/examples-VERSION.tgz

The sample applications most likely to be of interest to you are:

Each tests is found in a separate subdirectory and built using the same command sequence. The hello_world_c sample will be used as an example.

Build the C Hello World Application

Use the following command to start the build of the sample hello world application:

cd hello_world_c
make

If the sample application has successfully been built, then the application executable is placed in the following directory:

hello_world_c/o-optimize/<filename>.exe

The other C/C++ sample applications are built using a similar procedure.


PREV UP NEXT Bookshelf Getting Started with RTEMS

Copyright © 1988-2007OAR Corporation