Getting Started with RTEMS (hello word )

I have proposed Idea in Google summer of code (gsoc) 2015 to develop Board support package(BSP) for x86_64 architecture .As a beginner I am going to create SPARC architecture hello word.

First of all, What RTEMS is ?

The Real-Time Executive for Multiprocessor Systems or RTEMS is an open source Real Time Operating System (RTOS).

For more information, you can always go to

Quickly I would like to show you how to start with the hello world.

I am using Ubuntu 13.10 version. We need to build some RTEMS tools for creating environment.

Install following packages in your Ubuntu :

$ sudo apt-get install build-essential

$ sudo apt-get build-dep binutils gcc g++ gdb unzip git python2.7-dev

$ sudo apt-get install git

After that we first need to suggest the path from where we will use commands for RTEMS.

$ export PATH=$HOME/development/rtems/4.11/bin:$PATH

This is very important step .So You must need to set this path carefully. After building hello word Every time this command have to be issued to use rtems in-built tools.

For setup of RETMS ,

Any where directory can be created in User space .But I would like to create in home directory .So open the terminal .change your directory to home directory

$ cd

$mkdir -p development/rtems/src

From Git repo ,It would better if we have latest RTEMS source builder .

$git clone git://

$ cd rtems-source-builder

If everything went good then check it whether it works or not .

$ source-builder/sb-check

RTEMS Source Builder environment is ok

This message should be issued in terminal.

Now we need tools like Gcc,Gdb etc for any kind of development in particular architecture

We can always check .Right now which architecture is supported by RTEMS

$ ./source-builder/sb-set-builder –list-bsets

Here I am going to setup environment to create hello word for sparc architecture.

$ ../source-builder/sb-set-builder –log=l-sparc.txt \ –prefix=$HOME/development/rtems/4.11 4.11/rtems-sparc

Check if environment is setup using

$ ls $HOME/development/rtems/4.11

Now environment for sparc is set up .We need to download rtems4.11 version .

$ cd

$ cd development

$ git clone git:// rtems4.11

check whether directory named rtems4.11  is listed under development directory or not.

$ ls

$ cd rtems4.11 

$ export PATH=$HOME/development/rtems/4.11/bin:$PATH

$ ./bootstrap

$ cd ..

$ mkdir b-sparc

$ cd b-sparc

$ ../rtems4.11/configure –target=sparc-rtems4.11 –enable-rtemsbsp=sis \ –enable-tests=samples –disable-posix

$ make

$ sudo PATH=$HOME/development/rtems/4.11/bin:${PATH} make install

Now you can go to b-sparc

$ cd b-sparc

$ sparc-rtems4.11-gdb `find . -name hello.exe`

Gdb debugger will open and It is a need to start the simulator to debug compiled program.

(gdb) tar sim

(gdb) load

(gdb) r

You will find your default hello word from RTEMS itself.

Now migrate to hello directory using following

$ cd /development/b-sparc/sparc-rtems4.11/c/sis/testsuites/samples/hello

list out the file under Hello directory.

$ ls

Edit that one with your name .Save your modification and again change the location .

$ cd b-sparc

$ make

$ sudo PATH=$HOME/development/rtems/4.11/bin:${PATH} make install

That it. How easy it is to make a hello word.

Any executable file can be debugged in only simulator after compiling.

For checking new hello word

$ cd

$ cd development/b-sparc

$ sparc-rtems4.11-gdb `find . -name hello.exe`

(gdb) tar sim

(gdb) load


My hello word is look like :

hello word


2 thoughts on “Getting Started with RTEMS (hello word )

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s