Example Application Compiling
From RTEMSWiki
There are example applications in RTEMS CVS Repository.
Check out Examples from CVS
cvs -d :pserver:anoncvs@www.rtems.com:/usr1/CVS login cvs -d :pserver:anoncvs@www.rtems.com:/usr1/CVS -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 assuming you check out the CVS head which is (as of July 2009) referred to as 4.10.
cd rtems export PATH=/opt/rtems-4.10/bin:$PATH ./bootstrap cd .. mkdir pc586 cd pc586 ../rtems/configure --target=i386-rtems4.10 --enable-rtemsbsp=pc586 \ --enable-tests=samples --disable-posix --disable-itron \ --prefix=INSTALL_POINT make
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}/WHERE_AM_I_BUILDING/pc586/i386-rtems4.10/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 the INSTALL_POINT specified to the --prefix option above. By de
# If the INSTALL_POINT requires root access, you will have to perform this step. # NOTE: If the install as root fails due to not having RTEMS tools in your PATH, # you will have to "export PATH=/opt/rtems-4.10/bin:$PATH" as well. su - cd rtems/../pc586/ make install # If the INSTALL_POINT requires root access, you will have to perform this step. exit
Second, compile the examples.
cd examples export RTEMS_MAKEFILE_PATH=INSTALL_POINT/i386-rtems4.10/pc586 make
You complete it, the example applications are ready to run in directories, such as ${HOME}/WHERE_AM_I_BUILDING/examples/hello_world_c/o-optimize. You can use QEMU to run those example applications.
