Version 2 (modified by Alanz, on Jun 4, 2008 at 3:09:54 AM) (diff)

Example Application Compiling

There are example applications in RTEMS CVS Repository?.

Check out Examples from CVS

cvs -d login
cvs -d -z 9 co -P examples

Compile the Examples

Assume you complete the steps in Quick Start which take SPARC as example, here are example steps for i386.

cd rtems
export PATH=/opt/rtems-4.9/bin:$PATH
cd ..
mkdir pc586
cd pc586
../rtems/configure --target=i386-rtems4.9 --enable-rtemsbsp=pc586 \
  --enable-tests=samples --disable-posix --disable-itron 

After the steps above, RTEMS code including sample applications in test suites are compiled, the sample applications are ready to run in directory such as: /home/zengreng/pc586/i386-rtems4.9/c/pc586/testsuites/samples

However, how to compile your own application? Here are the steps to compile examples in RTEMS CVS Repository?.

First, install RTEMS files into /opt/rtems-4.9/.

su -
cd rtems/../pc586/
make install

Second, compile examples.

cd examples
export RTEMS_MAKEFILE_PATH=/home/zengreng/pc586/i386-rtems4.9/c/pc586/make/

You complete it, the example applications are ready to run in directories, such as /home/zengreng/examples/hello_world_c/o-optimize. You can use QEMU? to run those example applications.