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

William Busacker wbusacker at outlook.com
Wed Mar 27 00:13:47 UTC 2019


Michel,

Maybe I can help you out.

I personally find the default RTEMS makefile to be overly complicated for simple projects. I get why its made the way it is, but ¯\_(ツ)_/¯

So the xxx-rtems5-gcc compiler doesn't have any knowledge of the actual RTEMS install. As far as I can tell, its just a fancy renamed target compiler. If you're trying to build an RTEMS project on its own, you'll need to tell the compiler where all of the headers and linker objects are at. There's also a couple other details you'll need to tell the compiler about. I typically run with Raspberry Pis so for me in my Makefile the compiler command looks like

arm-rtems5-gcc -B/$(RTEMS_INSTALL)/arm-rtems5/raspberrypi/lib -specs bsp_specs -qrtems -mcpu=arm1176jzf-s -o init.o init.c

where $(RTEMS_INSTALL) is a path to where you ran ../rtems-git/configure. My build tree is kinda messed up so I don't know exactly where to point you, but if you manage to find the file "bsp_specs" that will be in the directory you need to target. My guess is that it would look something like sparc-rtems5/erc32/lib

From there you just compile the project like you would a normal C program, just always substituting in sparc-rtems5-gcc for gcc and making sure that something like -B/$(RTEMS_INSTALL)/arm-rtems5/raspberrypi/lib -specs bsp_specs -qrtems -mcpu=arm1176jzf-s is in your compiler and linker flags. I think for you, you would need to change out the arm11.... for erc32, but I'm not sure. I think there's an RTEMS Source Builder program that can tell you what it needs to be. Joel or Chris would know.

Happy RTEMSing!

-will




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190327/40cd596b/attachment-0002.html>


More information about the users mailing list