Version 29 (modified by Chris Johns, on Feb 8, 2017 at 11:34:23 PM) (diff)

Add a link to the user User Manual. Change SIS to ERC32.

Quick Start

Note: There is new User Manual. Please read it's Quick Start section

Creating an RTEMS Development Environment consists of building tools, i.e. the C/C++ compiler and debugger, and an RTEMS kernel for the Board Support Package (BSP) you are interested in. If you are new to RTEMS we suggest starting on the SPARC ERC32 BSP. It is easy to set up and use with this guide.

  • Installing the Tools. You can get the tools from RTEMS Source Builder (RSB). 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. The RSB will help you here.
  • If you chose Git, then make sure you installed the RTEMS autoconf and automake and that they are found before any installed local tools in your PATH environment variable. Then run the bootstrap script 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.11 head, you would need to do something like the following to configure and compile RTEMS. Be sure to watch versions and install points:

Note, the following is for RTEMS 4.11, and assumes you have a valid sparc-rtems4.11-toolchain in your PATH.

WARNING: Replace 4.11 with the proper version. Also for 4.11 and older, use the erc32 BSP. For 4.12 and newer, use the erc32 BSP.

cd rtems
./bootstrap # or ../rtems-source-builder/source-builder/sb-bootstrap
cd ..
mkdir b-erc32
cd b-erc32
../rtems/configure --target=sparc-rtems4.11 --enable-rtemsbsp=erc32 \
  --enable-tests=samples --prefix=${HOME}/install_path
make install

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.11.

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.11-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.11"...
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.11-work/build/build-sparc-erc32-rtems/sparc-rtems4.11/c/erc32/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.11-run in the above example.

Example Application Compiling

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

Example Library Compiling

Below is a link to how to build libraries for use with more complex packages

Where to get RTEMS Application Makefile documentation

Additional RTEMS Application Makefile documentation can be found in /opt/rtems-4.11/share/rtems-4.11/make/README