<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 23, 2019, 10:15 AM Michel Macena <<a href="mailto:mmacena.eng@gmail.com">mmacena.eng@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks for the answer !</div><div><br></div><div>But could you explain this part "The simple answer is that you are compiling code from the source tree 
which is intended to be built inside the source tree while RTEMS is 
being built." ?</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">RTEMS has about 700 sample and test executables you can build when you build RTEMS. Those are for testing and users sanity checking. </div><div dir="auto"><br></div><div dir="auto">You do a make install which puts the RTEMS libraries and headers at the prefix you configured. After that, you compile and link against just those installed libraries and header.</div><div dir="auto"><br></div><div dir="auto">See the examples-v2 repository for sample programs built against an installed RTEMS.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>for example, if want to compile a new application for a given target ( in my case sparc erc32) should I have to build everything again ? How I 'am supposed to do to compile an application for a target ? is it bay callind sparc-rtems5-gcc with the proper flags, or I need build the sparc-rtems5-gcc along with the application ? Sorry for my ignorance !<br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sex, 22 de mar de 2019 às 18:47, Joel Sherrill <<a href="mailto:joel.sherrill@gmail.com" target="_blank" rel="noreferrer">joel.sherrill@gmail.com</a>> escreveu:<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 don't know how many people monitor this mailing list. You will likely have better luck on <a href="mailto:users@rtems.org" target="_blank" rel="noreferrer">users@rtems.org</a> once you are subscribed to that.<div><br></div><div>The simple answer is that you are compiling code from the source tree which is intended to be built inside the source tree while RTEMS is being built. </div><div><br></div><div>After you configure, build and install RTEMS itself, your command line will have to look more like this:</div><div><br></div><div>sparc-rtems5-gcc -B PREFIX/sparc-rtems5/BSP/lib/ -specs bsp_specs -qrtems FILE.c</div><div><br></div><div>--joel</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 22, 2019 at 4:37 PM Michel Macena <<a href="mailto:mmacena.eng@gmail.com" target="_blank" rel="noreferrer">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" rel="noreferrer">bugs@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/bugs" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/bugs</a></blockquote></div>
</blockquote></div>
</blockquote></div></div></div>