Version 4 (modified by Drakferion, on Sep 11, 2007 at 9:18:07 PM) (diff)

--target=sparc-rtems4.8 > --target=sparc-rtems

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 CVS. Either way, make sure you get the right toolset for your RTEMS version.
  • If you chose CVS, 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.8 CVS 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.8/bin:$PATH
cd ..
mkdir b-sis
cd b-sis
../rtems/configure --target=sparc-rtems --enable-rtemsbsp=sis \
  --enable-tests=samples --disable-posix --disable-itron 

( 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.8-gdb `find . -name ticker.exe`
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-redhat-linux-gnu --target=sparc-rtems4.8"...
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.8-work/build/build-sparc-sis-rtems/sparc-rtems4.8/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.8-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.