[ESA summer of code]: Seeking guidance for jumpstart

Kumar Amit Mehta gmate.amit at gmail.com
Sun May 11 13:21:46 UTC 2014

On Fri, May 09, 2014 at 09:19:05AM -0400, Gedare Bloom wrote:
> On Thu, May 8, 2014 at 7:40 PM, Kumar Amit Mehta <gmate.amit at gmail.com> wrote:
> > On Thu, May 08, 2014 at 06:25:03PM -0500, Joel Sherrill wrote:
> >>
> >> On May 8, 2014 6:12 PM, Kumar Amit Mehta <gmate.amit at gmail.com> wrote:
> >> >
> >> > Hi All,
> >> >
> >> > I already asked this question on the RTEMS IRC, but unfortunately, did
> >> > not get any reply. Therefore to reach wider users, using this mailing
> >> > list.
> >> >
> >> > I recently saw a mail regarding the possibility of student's
> >> > participation in the ESA summer of code. I'm currently pursuing my
> >> > Masters program in Computer science in one of the European university
> >> > and have some background on software testing. I've interest in Embedded
> >> > Systems [1] and Linux [2]. I think that this is a great opportunity to
> >> > learn RTEMS. I also think that testing is a good place to start, when
> >> > you do have no or very little knowledge about the project. Therefore,
> >> > I'd like to participate in the ESA summer of code for RTEMS, however
> >> > I'm n00b to rtems and hence seeking a mentor for guidance which can
> >> > help me jumpstart.
> >>
> >> There is a hello world getting started wiki page that we created  for Google Summer of Code. At the end or that, you will have working tools and be able to run RTEMS executables on a simulator.
> >>
> >> Try starting with that. Ask questions and jump in on the testing thread on RTEMS devel mailing list. It has multiple facets and a lot to do.
> >
> > Thank you so much for the blazingly fast reply. I'll definitely
> > try that and hopefully will come back with more questions :)
> >
> Also you may have more luck using the RTEMS Source Builder to create
> your tools. I've been meaning to update the GSoC Getting Started guide
> to give that instruction. You can see some information at the GCI page
> [1].
> -gedare
> [1] http://www.rtems.org/wiki/index.php/GCI#Run_and_Modify_GSOC_Hello_World_Procedure

Thank you for the pointers. I was able to build the RTEMS source builder
and modify and run the hello world program. To keep track and for future
reference, I prepared a small step by step document(Not the most optimal
one at the moment), which might be useful for beginners like me.

Below set of instructions assume that these commands would be invoked
on the pre-configured VM[1] for RTEMS.

1: Create a directory for tools(necessary tools for cross compilation etc.)
bash-4.1$ mkdir -p development/rtems/src

2: Clone the rtems source builder using git
bash-4.1$ git clone git://git.rtems.org/rtems-source-builder.git
bash-4.1$ cd /home/rtems/development/rtems/src/rtems-source-builder

3: Install one mising package 
bash-4.1$ yum install texinfo

4: Check dependencies
bash-4.1$ pwd
bash-4.1$ ./source-builder/sb-check
RTEMS Source Builder - Check, v0.2.0
Environment is ok

5: Build the tools
bash-4.1$ cd rtems
6: bash-4.1$ ../source-builder/sb-set-builder --log=l-sparc.txt --prefix=/home/rtems/development/rtems/4.11 4.11/rtems-sparc
RTEMS Source Builder - Set Builder, v0.2.0
Build Set: 4.11/rtems-sparc

6: Export the path, so that these new tools can now be used on shell prompt
bash-4.1$ export PATH=$HOME/development/rtems/4.11/bin/:$PATH

7: Now download RTEMS itself and build it
bash-4.1$ pwd

bash-4.1$ mkdir rtems-4.11-devel
bash-4.1$ cd rtems-4.11-devel

bash-4.1$ git clone git://git.rtems.org/rtems.git

bash-4.1$ cd rtems

bash-4.1$ ./bootstrap

bash-4.1$ cd ..
bash-4.1$ mkdir b-sis
bash-4.1$ cd b-sis
bash-4.1$ ../rtems/configure --target=sparc-rtems4.11 --enable-rtemsbsp=sis \
  --enable-tests=samples --disable-posix
bash-4.1$ make

8: Need root priviledges for installation
bash-4.1$ su -
[root at localhost ~]# whoami

[root at localhost ~]# export PATH=/home/rtems/development/rtems/4.11/bin/:$PATH

[root at localhost ~]# cd /home/rtems/rtems-4.11-devel/b-sis

[root at localhost b-sis]# make install

[root at localhost b-sis]# exit

9: Modify the hello world file
bash-4.1$ vim /home/rtems/rtems-4.11-devel/rtems/testsuites/samples/hello/init.c 

bash-4.1$ git diff /home/rtems/rtems-4.11-devel/rtems/testsuites/samples/hello/init.c 
diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c
index d8fe450..46e974f 100644
--- a/testsuites/samples/hello/init.c
+++ b/testsuites/samples/hello/init.c
@@ -29,6 +29,7 @@ rtems_task Init(
   printf( "Hello World\n" );
+  printf( "rtems is fun\n" );
   exit( 0 );

10: Re-build hello world sample test

bash-4.1$ cd /home/rtems/rtems-4.11-devel/b-sis

bash-4.1$ make

bash-4.1$ su -
[root at localhost ~]# whoami

[root at localhost ~]# export PATH=/home/rtems/development/rtems/4.11/bin/:$PATH

[root at localhost ~]# cd /home/rtems/rtems-4.11-devel/b-sis

[root at localhost b-sis]# make install

root at localhost b-sis]# exit

bash-4.1$ pwd

bash-4.1$ sparc-rtems4.11-gdb `find . -name hello.exe`
Reading symbols from ./sparc-rtems4.11/c/sis/testsuites/samples/hello/hello.exe...done.
(gdb) tar sim
Connected to the simulator.
(gdb) load
(gdb) run
Starting program: /home/rtems/rtems-4.11-devel/b-sis/sparc-rtems4.11/c/sis/testsuites/samples/hello/hello.exe 

Hello World
rtems is fun
[Inferior 1 (process 42000) exited normally]
(gdb) q

[1] http://wiki.rtems.org/wiki/index.php/Virtual_Machines_for_RTEMS_Development


More information about the users mailing list