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

Chris Johns chrisj at
Sun Mar 31 22:20:34 UTC 2019

Hi Michel,

Sorry about the delay, I have been away for a week or so.

On 26/3/19 4:27 am, Michel Macena wrote:
> Hi Chris, I'm glad you helped me,
> but I'm kind of lost in RTEMS development cycle.
> I followed all steps of section 2 (Quick-Start),and in the
> end there is a instruction "make install" is that one you
> talking about ?

Yes. Make install takes the built parts and installs them under the `--prefix`
path. This places the headers, libraries and any other files in a defined and
set structure. Accessing the libraries and headers in the source and build tree
is complicated and things may change.

> Also, I did not quite understand section 4 (installation), it seems
> somewhat redundant to section 2, what is new about it ?

The Quick Start as a series of simple steps. The Installation section is more
detailed and of value when you need more specific details. There is a cross over
of items.

> And, if I understand it correctly, after all steps of section 2 I should
> have a functional environment for rtems for an ERC32 target (which is
> exactly the one I want). So, now I didn't understand how exactly
> I configure the files and the environment with my own .c codes
> in order to be compiled for the ERC 32 target.

You need to get the CFLAGS and LDFLAGS for the ERC32 BSP to build a C file and
link an executable.

> Note that section 2.8 ("Build your application)  is "TODO" at the moment. So
> there is no instruction there and I don't know exactly how to proceed.

Yes. We would love the time to write this chapter but it is a decent sized task.
For example which build system do we document? RTEMS is designed to give a user
the freedom to select any build system, there are many with differing and
competing requirements and each user and system is different. I provide a
framework for waf called rtems_waf and there is also which is
tagged to be removed at some point in time.

> I have an old document of an old system, the ERC32 cross compile system
> (provided by ESA),
> and in the instructions, after the  configuration of the environment the next
> step was to compile with sparc-rtems-gcc and the
> next one was to use sparc-rtems-gdb for simulation or to load it on the target.
> So as I noticed, is not this way anymore. So for me to compile a fresh new
> application for my ERC32 target,

This could be true. As gcc changes and we update RTEMS specific commands line
and set ups may not be valid any more. This is the challenge for us when
documenting a specific application build environment. We need to document
something users can rely on and will not change.

> I don't need to use directy the sparc-rtems5-gcc compiler ?

To build a C or C++ file, yes. To link an executable, yes.

> Also, once my environment is set-up what is the next step ?

Once you have built and installed RTEMS and you have a way to build a project
you can create your application. Another aspect is the edit, compile and then
debug workflow and the embedded nature of RTEMS means debugging can be a
challenge. I recommend projects sort this part of the development workflow out

> Sorry for this amount of doubts and questions, I need to learn this
> for my masters.

These are valid questions to ask and worth answering. We need users asking these
questions so the RTEMS developers can understand where our ecosystem and
documentation is weak and needs improving.


More information about the users mailing list