Help with RTEMS C User’s Guide

Tanu Hari Dixit tokencolour at
Tue Jan 24 06:55:08 UTC 2017

Hello Devs,

I have been trying to setup a makefile so as to execute the various code
snippets given in the C User's guide for RTEMS (
current/share/rtems/html/c_user/index.html#SEC_Contents) and have failed
miserably. Can you please help me with this?

I have made a file with the first example of printing object names (
user/Key-Concepts-Object-Names.html#Key-Concepts-Object-Names) and i use
the following command to use sparc-rtems4.12-gcc to compile this program

sparc-rtems4.12-gcc --pipe -B/home/thd/development/rtems/
src/builds/erc32_1/sparc-rtems4.12/erc32/lib -specs bsp_specs -qrtems -Wall
-g -O2 -o rtems_object_try rtems_object_try.c

but when i do ./rtems_object_try I get:

./rtems_object_try: Invalid argument

I narrowed in on the above compiler command by reading the makefile as
given here(

What is it that I am missing?

Also is it necessary to use sparc-rtems4.12-gcc and not the gcc available
to me normally on my machine. When I use gcc,
I get the following error:

thd at thd-Inspiron-5537:~/development/rtems/src/programs/rtems_object$ gcc
--pipe -B/home/thd/development/rtems/src/builds/erc32_1/sparc-rtems4.12/erc32/lib
-specs bsp_specs -qrtems -Wall -g -O2 -o rtems_object_try
In file included from /home/thd/development/rtems/src/builds/erc32_1/sparc-
                 from /home/thd/development/rtems/src/builds/erc32_1/sparc-
                 from /home/thd/development/rtems/src/builds/erc32_1/sparc-
                 from /home/thd/development/rtems/src/builds/erc32_1/sparc-
                 from /home/thd/development/rtems/src/builds/erc32_1/sparc-
                 from rtems_object_try.c:1:
rtems4.12/erc32/lib/include/rtems/score/rbtree.h:21:22: fatal error:
sys/tree.h: No such file or directory
 #include <sys/tree.h>
compilation terminated.

I am not able to understand what is wrong. It would be great if you could
point that out.
Thank you,
Tanu Hari Dixit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtems_object_try.c
Type: text/x-csrc
Size: 285 bytes
Desc: not available
URL: <>

More information about the devel mailing list