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:
main()
.
main()
and shutting down RTEMS via exit()
without any other operations.
It uses the default configuration inside RTEMS which is only
intended to satisfy autoconf
probes and extremely simple
console-based applications.
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.
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.
Copyright © 1988-2007OAR Corporation