<div dir="ltr"><div><div>Hello Devs,<br><br>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 (<a href="https://docs.rtems.org/doc-current/share/rtems/html/c_user/index.html#SEC_Contents" target="_blank">https://docs.rtems.org/doc-<wbr>current/share/rtems/html/c_<wbr>user/index.html#SEC_Contents</a>) and have failed miserably. Can you please help me with this?<br></div><br>I have made a file with the first example of printing object names (<a href="https://docs.rtems.org/doc-current/share/rtems/html/c_user/Key-Concepts-Object-Names.html#Key-Concepts-Object-Names" target="_blank">https://docs.rtems.org/doc-<wbr>current/share/rtems/html/c_<wbr>user/Key-Concepts-Object-<wbr>Names.html#Key-Concepts-<wbr>Object-Names</a>) and i use the following command to use sparc-rtems4.12-gcc to compile this program<br><br>sparc-rtems4.12-gcc --pipe -B/home/thd/development/rtems/<wbr>src/builds/erc32_1/sparc-<wbr>rtems4.12/erc32/lib -specs bsp_specs -qrtems -Wall -g -O2 -o rtems_object_try rtems_object_try.c <br><br></div>but when i do ./rtems_object_try I get:<br><br><div>./rtems_object_try: Invalid argument<br><br></div><div>I narrowed in on the above compiler command by reading the makefile as given here(<a href="https://github.com/alanc98/rki/blob/master/Makefile" target="_blank">https://github.com/<wbr>alanc98/rki/blob/master/<wbr>Makefile</a>). <br></div><div><br></div><div>What is it that I am missing? <br><br></div><div>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, <br></div><div>I get the following error:<br><br><br>thd@thd-Inspiron-5537:~/<wbr>development/rtems/src/<wbr>programs/rtems_object$ gcc --pipe -B/home/thd/development/rtems/<wbr>src/builds/erc32_1/sparc-<wbr>rtems4.12/erc32/lib -specs bsp_specs -qrtems -Wall -g -O2 -o rtems_object_try rtems_object_try.c <br>In file included from /home/thd/development/rtems/<wbr>src/builds/erc32_1/sparc-<wbr>rtems4.12/erc32/lib/include/<wbr>rtems/score/object.h:26:0,<br>                 from /home/thd/development/rtems/<wbr>src/builds/erc32_1/sparc-<wbr>rtems4.12/erc32/lib/include/<wbr>rtems/score/thread.h:30,<br>                 from /home/thd/development/rtems/<wbr>src/builds/erc32_1/sparc-<wbr>rtems4.12/erc32/lib/include/<wbr>rtems/score/heap.h:22,<br>                 from /home/thd/development/rtems/<wbr>src/builds/erc32_1/sparc-<wbr>rtems4.12/erc32/lib/include/<wbr>rtems/rtems/types.h:26,<br>                 from /home/thd/development/rtems/<wbr>src/builds/erc32_1/sparc-<wbr>rtems4.12/erc32/lib/include/<wbr>rtems.h:31,<br>                 from rtems_object_try.c:1:<br>/home/thd/development/rtems/<wbr>src/builds/erc32_1/sparc-<wbr>rtems4.12/erc32/lib/include/<wbr>rtems/score/rbtree.h:21:22: fatal error: sys/tree.h: No such file or directory<br> #include <sys/tree.h><br>                      ^<br>compilation terminated.<br><br><br><br></div><div>I am not able to understand what is wrong. It would be great if you could point that out.<br></div><div>Thank you,<br></div>Tanu Hari Dixit.</div>