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

Michel Macena mmacena.eng at
Fri Mar 22 21:39:39 UTC 2019

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

sparc-rtems5-gcc -g -O2
/home/michel/masters_project/src/rtems/testsuites/samples/hello/init.c -o

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
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
I added the bin folder to the PATH variable, also I have created the
RTEMS_MAKEFILE_PATH based in older versions instructions. I found that
that RTEMS_MAKEFILE_PATH variable should point to where the BSP files are.
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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the bugs mailing list