Help with RTEMS C User’s Guide
Tanu Hari Dixit
tokencolour at gmail.com
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 (https://docs.rtems.org/doc-
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 (
https://docs.rtems.org/doc-current/share/rtems/html/c_
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(https://github.com/alanc98/rki/blob/master/Makefile).
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
rtems_object_try.c
In file included from /home/thd/development/rtems/src/builds/erc32_1/sparc-
rtems4.12/erc32/lib/include/rtems/score/object.h:26:0,
from /home/thd/development/rtems/src/builds/erc32_1/sparc-
rtems4.12/erc32/lib/include/rtems/score/thread.h:30,
from /home/thd/development/rtems/src/builds/erc32_1/sparc-
rtems4.12/erc32/lib/include/rtems/score/heap.h:22,
from /home/thd/development/rtems/src/builds/erc32_1/sparc-
rtems4.12/erc32/lib/include/rtems/rtems/types.h:26,
from /home/thd/development/rtems/src/builds/erc32_1/sparc-
rtems4.12/erc32/lib/include/rtems.h:31,
from rtems_object_try.c:1:
/home/thd/development/rtems/src/builds/erc32_1/sparc-
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: <http://lists.rtems.org/pipermail/devel/attachments/20170124/7a5fd00b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtems_object_try.c
Type: text/x-csrc
Size: 285 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170124/7a5fd00b/attachment.bin>
More information about the devel
mailing list