RTEMS Environment Setup




First of all you have to see RTEMS open Projects. Then you have to build RTEMS tools and kernels for your project. The tools which I am building is used to create executables which can run on your desired target machine.
Prequisites:-
First you have to make sure that you are having python 2.7 development version on your PC. Otherwise it will show errors.
Step 1 :- $ sudo apt-get install build essentials
Step 2:- $ sudo apt-get build-dep binutils gcc g++ gdp unzip git python 2.7-dev
Step 3:- $ sudo apt-get install git
To get and use all RTEMS Commands we have to set up a Path. In this Path all the GCC executables will be stored. The tools are installed into a build prefix which will be the root of the tree and all the other files are below it which will be used to create a RTEMS applications. Building an RTEMS build will build all autoconf, automake, assemblers, linkers, compilers, debuggers and all the standard RTEMS libraries.
How to set up a Path :-
$ export PATH=/home/salil/development/rtems/5/bin:$PATH
Step 4:- RTEMS setup:-
$ mkdir development/rtems/src
$ cd development/rtems/src
Now we will clone RTEMS source builder git repository into src folder :-
$ git clone git://git.rtems.org/rtems-source-builder.git
$ cd rtems-source-builder
Step 5:- Now we will check whether RTEMS setup is correct or not.
$ source-builder/sb-check
If message "RTEMS source builder environment is ok" then it means that we have correctly setup the RTEMS environment. Otherwise you have to see log files and deduce what went wrong.
Step 6:- To see what all architectures are supported by RTEMS :-
$./source-builder/sb-set-builder -list-bsets
Here you can which all architectures are supported by RTEMS.
Step 7:- Now for my project I have to build tool chain for SPARC architecture. For doing that command is :-
$../source-builder/sb-set-builder -log=l-sparc.txt\-prefix=/home/salil/development/rtems/5 5/rtems-sparc
If building process is failed then go to then go to the directory /development/rtems/src/rtems-source-builder/rtems see the log file for what went wrong in sparc.txt file.
Step 8 :- After this SPARC environment is setup now we have to download rtems5.
$ cd development
$ git clone git://git.rtems.org/rtems rtems5
Step 9:- To see the installed tools we can use this command:-
$ ls/home/salil/development/rtems/5/bin
Step 10:- Now for compiling and configuring RTEMS5
$ cd rtems5
$ export PATH=/home/salil/development/rtems/5/bin:$PATH
$ ./bootstrap
$ cd ..
$ mkdir b-sparc
$ cd b-sparc
configuring step:-
$ ../rtems5/configure -target=sparc-rtems5 -enable-rtemsbsp=erc32 \
-enable-tests=samples -enable-posix
$ make
$ sudo PATH=/home/salil/development/rtems/5/bin:$PATH make install
Step 11:- To see whether helloworld.exe is generated one needs to go to the samples directory located at /home/salil/development/rtems5/testsuites/samples/
After adding or modifying any file or code one need to run make and make install and also adding PATH commands.
Step 12:- After finding hello.exe we need to run these commands
$ tar sim
$ load
$ r
All the changes will then be reflected.

Comments

Popular posts from this blog

Introduction to RTEMS