Hello World Example

9 views
Skip to first unread message

Dhruva T.B.

unread,
Mar 23, 2012, 9:00:17 AM3/23/12
to rtems...@rtems.org
Ok, these are the steps I took   ( I had sudo access throughout) -:
1) Downloaded and extracted the tarballs for binutils, gcc-core, gcc-g++, gdb, newlib, mpc and mpfr.
2) Then for binutils created a seperate  folder and ran ../binutils-2.20/configure --target=sparc-rtems4.10 --prefix=/opt/rtems4.10.
    Then ran make all followed by make info and finally make install.
3) Then ran a similar configure script for gcc -:
     ->cd ../gcc-4.63/
     -> ln -s ../newlib-1.20.0/newlib
     -> cd ..; -> mkdir gcc-temp;
     -> cd gcc-temp
     -> ../gcc-4.63/configure --target=sparc-rtems4.10 --with-gnu-as --with-newlib --verbose --enable-threads --enable-languages="c,c++" --prefix=/opt/rtems4.10
     -> make all; -> make info; -> make install

4)  At this point I ran the bootstrap inside my rtems-4.10.2 folder. I also set my path with export PATH=/opt/rtems4.10/bin:$PATH
5) Then I cd into a directory called b-rtems and ran the configure code in it with ../rtems-4.10.2/configure --target=sparc-rtems4.10 --enable-rtemsbsp=sis --enable-        tests=samples --disable-posix --disable-itran --prefix=/opt/rtems4.10
I then ran make all and got the following as the last couple of lines of output -:
make[5]: *** [kern/libnetworking_a-uipc_
socket.o] Error 1
make[5]: Leaving directory `/home/dhruva/RTEMS/Tools/b-rtems/sparc-rtems4.10/c/sis/cpukit/libnetworking'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/dhruva/RTEMS/Tools/b-rtems/sparc-rtems4.10/c/sis/cpukit'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/dhruva/RTEMS/Tools/b-rtems/sparc-rtems4.10/c/sis/cpukit'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dhruva/RTEMS/Tools/b-rtems/sparc-rtems4.10/c/sis'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dhruva/RTEMS/Tools/b-rtems/sparc-rtems4.10/c'
make: *** [all-recursive] Error 1


6) Not sure what the error is here but I ran make install anyway.

I then checked the sparc-rtems4.10/c/sis/testsuites/samples/ticker directory and only found a Makefile there.
Not sure where I am going wrong.

I then went back to the original rtems4.10 directory and found my way to the testsuites ticker folder. I tried sparc-rtems4.10-gcc init.c to see what would happen and got an error about missing header file 'rtems.h'. Not sure where its supposed to be but hoping that might help.

Hoping to find a fix that doesn't begin with -' Start over, except...'  :).


--
Dhruva T.B.,
3rd Year Electronics And Instrumentation Engineer,
Birla Institute Of Technology And Science (BITS)-Pilani, Goa,
India

Contact : +91-9503817694

Gedare Bloom

unread,
Mar 23, 2012, 11:56:47 AM3/23/12
to Dhruva T.B., rtems...@rtems.org
On Fri, Mar 23, 2012 at 9:00 AM, Dhruva T.B. <dhru...@gmail.com> wrote:
Ok, these are the steps I took   ( I had sudo access throughout) -:
1) Downloaded and extracted the tarballs for binutils, gcc-core, gcc-g++, gdb, newlib, mpc and mpfr.
2) Then for binutils created a seperate  folder and ran ../binutils-2.20/configure --target=sparc-rtems4.10 --prefix=/opt/rtems4.10.
For GSOC you should use rtems4.11. You will need to redo these steps to build updated tools. You can find the current patches you will need to apply in http://git.rtems.org/rtems-crossrpms.git/tree/patches

That will also give you hints about which versions of the tools to download. The wiki instructions are somewhat outdated.
 
    Then ran make all followed by make info and finally make install.
3) Then ran a similar configure script for gcc -:
     ->cd ../gcc-4.63/
     -> ln -s ../newlib-1.20.0/newlib
     -> cd ..; -> mkdir gcc-temp;
     -> cd gcc-temp
     -> ../gcc-4.63/configure --target=sparc-rtems4.10 --with-gnu-as --with-newlib --verbose --enable-threads --enable-languages="c,c++" --prefix=/opt/rtems4.10
     -> make all; -> make info; -> make install

4)  At this point I ran the bootstrap inside my rtems-4.10.2 folder. I also set my path with export PATH=/opt/rtems4.10/bin:$PATH
The path must be set before compiling gcc, or it won't find the binutils. I'd be surprised that your gcc compile worked.
 

5) Then I cd into a directory called b-rtems and ran the configure code in it with ../rtems-4.10.2/configure --target=sparc-rtems4.10 --enable-rtemsbsp=sis --enable-        tests=samples --disable-posix --disable-itran --prefix=/opt/rtems4.10
I then ran make all and got the following as the last couple of lines of output -:
make[5]: *** [kern/libnetworking_a-uipc_
socket.o] Error 1
make[5]: Leaving directory `/home/dhruva/RTEMS/Tools/b-rtems/sparc-rtems4.10/c/sis/cpukit/libnetworking'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/dhruva/RTEMS/Tools/b-rtems/sparc-rtems4.10/c/sis/cpukit'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/dhruva/RTEMS/Tools/b-rtems/sparc-rtems4.10/c/sis/cpukit'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dhruva/RTEMS/Tools/b-rtems/sparc-rtems4.10/c/sis'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dhruva/RTEMS/Tools/b-rtems/sparc-rtems4.10/c'
make: *** [all-recursive] Error 1


6) Not sure what the error is here but I ran make install anyway.

You'd have to scroll back farther to see where the error started.
 
I then checked the sparc-rtems4.10/c/sis/testsuites/samples/ticker directory and only found a Makefile there.
Not sure where I am going wrong.

Try just typing 'make' there.
 
I then went back to the original rtems4.10 directory and found my way to the testsuites ticker folder. I tried sparc-rtems4.10-gcc init.c to see what would happen and got an error about missing header file 'rtems.h'. Not sure where its supposed to be but hoping that might help.

Can't compile from within the source tree.
 
Hoping to find a fix that doesn't begin with -' Start over, except...'  :).


--
Dhruva T.B.,
3rd Year Electronics And Instrumentation Engineer,
Birla Institute Of Technology And Science (BITS)-Pilani, Goa,
India

Contact : +91-9503817694


_______________________________________________
rtems-users mailing list
rtems...@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-users


Ralf Corsepius

unread,
Mar 23, 2012, 12:20:37 PM3/23/12
to Gedare Bloom, rtems...@rtems.org
On 03/23/2012 04:56 PM, Gedare Bloom wrote:

> For GSOC you should use rtems4.11. You will need to redo these steps to
> build updated tools. You can find the current patches you will need to
> apply in http://git.rtems.org/rtems-crossrpms.git/tree/patches

I have no idea where this entirely unofficial directory has popped up from.


For many years, the official RTEMS toolchain sources and patches are
published in
ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/

The patches the rpms are build from are in
http://git.rtems.org/rtems-crossrpms.git/tree/patches

Ralf

Gedare Bloom

unread,
Mar 23, 2012, 12:36:30 PM3/23/12
to Ralf Corsepius, rtems...@rtems.org
On Fri, Mar 23, 2012 at 12:20 PM, Ralf Corsepius
<ralf.co...@rtems.org> wrote:
> On 03/23/2012 04:56 PM, Gedare Bloom wrote:
>
>> For GSOC you should use rtems4.11. You will need to redo these steps to
>> build updated tools. You can find the current patches you will need to
>> apply in http://git.rtems.org/rtems-crossrpms.git/tree/patches
>
>
> I have no idea where this entirely unofficial directory has popped up from.
>
>
> For many years, the official RTEMS toolchain sources and patches are
> published in
> ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/
>
OK. We should really maintain updated documentation and scripts to
help users build their toolchain from these sources/patches. This is
especially important for users who cannot use the RPMs (for whatever
reasons).

Gedare Bloom

unread,
Mar 23, 2012, 2:04:35 PM3/23/12
to Ralf Corsepius, rtems...@rtems.org
On Fri, Mar 23, 2012 at 12:36 PM, Gedare Bloom <ged...@rtems.org> wrote:
> On Fri, Mar 23, 2012 at 12:20 PM, Ralf Corsepius
> <ralf.co...@rtems.org> wrote:
>> On 03/23/2012 04:56 PM, Gedare Bloom wrote:
>>
>>> For GSOC you should use rtems4.11. You will need to redo these steps to
>>> build updated tools. You can find the current patches you will need to
>>> apply in http://git.rtems.org/rtems-crossrpms.git/tree/patches
>>
>>
>> I have no idea where this entirely unofficial directory has popped up from.
>>
>>
>> For many years, the official RTEMS toolchain sources and patches are
>> published in
>> ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/
>>
> OK. We should really maintain updated documentation and scripts to
> help users build their toolchain from these sources/patches. This is
> especially important for users who cannot use the RPMs (for whatever
> reasons).
>
I have made a new wiki page (Building_Tools) and put links to it for
people who will choose to build the tools from source. This is a
temporary solution. We should really have good options and scripts for
doing this regardless of development environment...
Reply all
Reply to author
Forward
0 new messages