On Sat, Mar 23, 2019, 10:15 AM Michel Macena <[email protected]> wrote:
> Thanks for the answer ! > > 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." ? > RTEMS has about 700 sample and test executables you can build when you build RTEMS. Those are for testing and users sanity checking. 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. See the examples-v2 repository for sample programs built against an installed RTEMS. 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 ! > > > Em sex, 22 de mar de 2019 às 18:47, Joel Sherrill <[email protected]> > escreveu: > >> I don't know how many people monitor this mailing list. You will likely >> have better luck on [email protected] once you are subscribed to that. >> >> 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. >> >> After you configure, build and install RTEMS itself, your command line >> will have to look more like this: >> >> sparc-rtems5-gcc -B PREFIX/sparc-rtems5/BSP/lib/ -specs bsp_specs -qrtems >> FILE.c >> >> --joel >> >> On Fri, Mar 22, 2019 at 4:37 PM Michel Macena <[email protected]> >> wrote: >> >>> 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 >>> linux mint. The environment comes with sample applications. I'm trying >>> to compile the >>> sample from "hello" (init.c) using sparc-rtems5-gcc, here's the command >>> line: >>> >>> 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 >>> >>> but it returns the following error: >>> >>> fatal error: rtems.h: No such file or directory >>> #include <rtems.h> >>> ^~~~~~~~~ >>> compilation terminated. >>> >>> So I tried to comment rtems.h in the code and leave the next library of >>> the code, >>> tmacros.h, so I tried to compile again and had the following error: >>> >>> fatal error: tmacros.h: No such file or directory >>> #include <tmacros.h> >>> ^~~~~~~~~~~ >>> compilation terminated. >>> >>> I have used the locate command and found these libraries in the >>> envinronment tree. >>> As far as I perceived the sparc-rtems5-gcc does not find or ignore the >>> libraries. >>> I added the bin folder to the PATH variable, also I have created the >>> variable >>> RTEMS_MAKEFILE_PATH based in older versions instructions. I found that >>> that RTEMS_MAKEFILE_PATH variable should point to where the BSP files >>> are. But >>> 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. >>> >>> command line: >>> export RTEMS_MAKEFILE_PATH=/home/michel/masters_project/build/b-erc32 >>> >>> Could someone help ? Also if you have a working environment could you >>> copy your project >>> tree for me ? >>> _______________________________________________ >>> bugs mailing list >>> [email protected] >>> http://lists.rtems.org/mailman/listinfo/bugs >> >>
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
