Version 11 (modified by Gedare, on Feb 4, 2012 at 10:42:26 PM) (diff)

Quick Start

This page is intended to be a very quick overview of installing an RTEMS Development Environment on a host for which prebuilt tools? are available and and building RTEMS for a sample BSP. While this guide will be enough to get you started, it makes no attempt to detail every configuration option, CPU and BSP supported, or how to download and run on an arbitrary BSP.

  • Download and install tools. For some hosts, prebuilt tools? are available. Select the sparc CPU toolset since that is the sample BSP we will be building. Don't worry, you can easily remove the tools later if you decide you don't want a simulator environment to play with.
  • Download RTEMS. Use either a release image or checkout from Git. Either way, make sure you get the right toolset for your RTEMS version.
  • If you chose Git, then make sure you installed the RTEMS autoconf and automake RPMs. Then run bootstrap from the top level of the RTEMS source tree. It may take a few minutes to complete.
  • RTEMS is designed to be compiled outside the source tree. Assuming you used the 4.10 head, you would need to do something like the following to configure and compile RTEMS. Be sure to watch versions and install points:
cd rtems
export PATH=/opt/rtems-4.10/bin:$PATH
cd ..
mkdir b-sis
cd b-sis
../rtems/configure --target=sparc-rtems4.10 --enable-rtemsbsp=sis \
  --enable-tests=samples --disable-posix --disable-itron 

WARNING: It is absolutely critical that the target name provided to the RTEMS configure command be that same as that used to build binutils, gcc, newlib, and gdb. The binaries provided by the RTEMS Project will use a target name of the form CPU-rtemsVERSION where CPU is sparc in the above example and VERSION is 4.10.

( Getting a "C compiler cannot create executables" error ?{{ref|abc}} )

When this completes, you should have a few sample test executables in the build tree. This shows how to run the ticker.exe example in gdb:

bash-3.1$ sparc-rtems4.10-gdb `find . -name ticker.exe`
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=sparc-rtems4.9"...
GDB can't read core files on this machine.
(gdb) tar sim
Connected to the simulator.
(gdb) load
(gdb) r
Starting program: /home2/work/joel/rtems-4.10-work/build/build-sparc-sis-rtems/sparc-rtems4.10/c/sis/testsuites/samples/ticker/ticker.exe

TA1  - rtems_clock_get - 09:00:00   12/31/1988
TA2  - rtems_clock_get - 09:00:00   12/31/1988
TA3  - rtems_clock_get - 09:00:00   12/31/1988
TA1  - rtems_clock_get - 09:00:05   12/31/1988
TA2  - rtems_clock_get - 09:00:10   12/31/1988
TA1  - rtems_clock_get - 09:00:10   12/31/1988
TA3  - rtems_clock_get - 09:00:15   12/31/1988
TA1  - rtems_clock_get - 09:00:15   12/31/1988
TA2  - rtems_clock_get - 09:00:20   12/31/1988
TA1  - rtems_clock_get - 09:00:20   12/31/1988
TA1  - rtems_clock_get - 09:00:25   12/31/1988
TA3  - rtems_clock_get - 09:00:30   12/31/1988
TA1  - rtems_clock_get - 09:00:30   12/31/1988
TA2  - rtems_clock_get - 09:00:30   12/31/1988

Program exited normally.
(gdb) quit

If you don't want to debug the application, then use sparc-rtems4.10-run in the above example.

{{note|abc}}If you experience a "C compiler cannot create executables" error, try fixing your compiler by getting libc-dev: apt-get install libc-dev This has happened on Debian and Debian-based (like Ubuntu) systems.

Example Application Compiling

There are example applications in RTEMS GIT Repository. Example Application Compiling provides the steps to compile them.