SPARC-RTEMS5-GCC ignores or don't find libraries

Vaibhav Gupta vaibhavgupta40 at gmail.com
Fri Mar 22 21:57:37 UTC 2019


You need to take care of multiple flags to run sparc-rtems5-gcc
And do not make changes to RTEMS source tree, I too did that mistake once.
.
If you have successfully built RTEMS (i.e completed with step where you
need to run "make install").
.
The hello.c  gets automatically compiled and is placed to path:
{RTEMS build}/erc32/sparc-rtems5/c/erc32/testsuites/samples/hello.exe
,
.
or you can run :
$ cd ~
$ cd quick-start
$ find ./ -name \hello.exe
you will be able to get path.
.
If you want to execute it, just run
$ sparc-rtems5-run {RTEMS build}/erc32/sparc-rtems5/c/
erc32/testsuites/samples/hello.exe
(replace with the path to hello.exe , I typed, with the one you find on
your system).
.
And if you make changes to hello.c
save the changes,
just go to b-erc32 folder and run:
$ make
$ make install
and use sparc-rtems5-run to see changes in .exe file

Thanks
Vaibhav Gupta



On Sat, Mar 23, 2019 at 3:07 AM Michel Macena <mmacena.eng at gmail.com> 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
> bugs at rtems.org
> http://lists.rtems.org/mailman/listinfo/bugs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20190323/7a845de9/attachment.html>


More information about the bugs mailing list