<div dir="ltr"><div dir="ltr"><div>You need to take care of multiple flags to run sparc-rtems5-gcc</div><div>And do not make changes to RTEMS source tree, I too did that mistake once.<br></div><div>.<br></div><div>If you have successfully built RTEMS (i.e completed with step where you need to run "make install").</div><div>.</div><div>The hello.c  gets automatically compiled and is placed to path:</div><div><span style="font-family:monospace,monospace"> {RTEMS build}/erc32/sparc-rtems5/c/</span><span style="font-family:monospace,monospace">erc32/testsuites/samples/</span><span style="font-family:monospace,monospace">hello.exe</span></div><div>,</div><div>.<br></div><div>or you can run :</div><div><span style="font-family:monospace,monospace">$ cd ~</span></div><div><span style="font-family:monospace,monospace">$ cd quick-start</span></div><div><span style="font-family:monospace,monospace">$ find ./ -name \hello.exe</span></div><div>you will be able to get path.</div><div>.</div><div>If you want to execute it, just run</div><div><span style="font-family:monospace,monospace">$ sparc-rtems5-run {RTEMS build}/erc32/sparc-rtems5/c/</span><span style="font-family:monospace,monospace">erc32/testsuites/samples/</span><span style="font-family:monospace,monospace">hello.exe</span></div><div>(replace with the path to hello.exe , I typed, with the one you find on your system).</div><div>.</div><div>And if you make changes to hello.c</div><div>save the changes,<br></div><div>just go to b-erc32 folder and run:</div><div><span style="font-family:monospace,monospace">$ make <br></span></div><div><span style="font-family:monospace,monospace">$ make install</span></div><div>and use <span style="font-family:monospace,monospace">sparc-rtems5-run</span> to see changes in .exe file</div><div><br></div><div>Thanks</div><div>Vaibhav Gupta<br></div><div><br></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 23, 2019 at 3:07 AM Michel Macena <<a href="mailto:mmacena.eng@gmail.com" target="_blank">mmacena.eng@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'm a beginner with RTEMS and I have built a RTEMS5 environment for an 
erc32 chip (the example in RTEMS Docs) in my computer with<br>linux mint. The environment comes with sample applications. I'm trying to compile the <br>sample from "hello" (init.c) using sparc-rtems5-gcc, here's the command line:<br><br>sparc-rtems5-gcc -g -O2 /home/michel/masters_project/src/rtems/testsuites/samples/hello/init.c -o /home/michel/masters_project/compile_test/hello2.exe<br><br>but it returns the following error:<br><br>fatal error: rtems.h: No such file or directory<br> #include <rtems.h><br>          ^~~~~~~~~<br>compilation terminated.<br><br>So I tried to comment rtems.h in the code and leave the next library of the code,<br>tmacros.h, so I tried to compile again and had the following error:<br><br>fatal error: tmacros.h: No such file or directory<br> #include <tmacros.h><br>          ^~~~~~~~~~~<br>compilation terminated.<br><br>I have used the locate command and found these libraries in the envinronment tree.<br>As far as I perceived the sparc-rtems5-gcc does not find or ignore the libraries.<br>I added the bin folder to the PATH variable, also I have created the variable<br>RTEMS_MAKEFILE_PATH based in older versions instructions. I found that<br>that RTEMS_MAKEFILE_PATH variable should point to where the BSP files are. But<br>I'm
 not sure if in the present version of RTEMS it is still necessary since
 I have not found any instructions for this in the main docs.<br><br>command line:<br>export RTEMS_MAKEFILE_PATH=/home/michel/masters_project/build/b-erc32<br><br>Could someone help ? Also if you have a working environment could you copy your project<br>tree for me ? </div>
_______________________________________________<br>
bugs mailing list<br>
<a href="mailto:bugs@rtems.org" target="_blank">bugs@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/bugs" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/bugs</a></blockquote></div>