Macena
Macena

Reputation: 43

How to Build RTEMS 4.11 environment properly in a Linux Mint

I'm an unexperienced linux and rtems user trying to build and configure rtems 4.11 environment on a Linux Mint host. I want this environment to compile a RTEMS application for an ERC32 chipset. I'm following the instructions given by the 4.11 version of the RTEMS Source Builder Manual. I've done the suggested steps but when it comes to the building command:

../source-builder/sb-set-builder --log=l-sparc.txt \   <1>
      --prefix=$HOME/development/rtems/4.11 \       <2>
      4.11/rtems-sparc

it fails and returns:

"Rtems Source Builder - Set Builder, 5 (35c533f545c8) Build set: 4.11/rtems-sparc error: no build set file found: 4.11/rtems-sparc.bset Build FAILED"

I used the command:

 ../source-builder/sb-set-builder --list-bset

in the list appears:

5/rtems-sparc.bset
6/rtems-sparc.b

set

So I found another question related to this: no build set file found 4.11/rtems-sparc on rtems (VB)

The answer says to use the following command:

../source-builder/sb-set-builder \
    --log=1-sparc.txt \
    --prefix=${HOME}/rtems-4.11-work/tools 5/rtems-sparc

note that the 4.11 was replaced by 5. I used this command and the build worked, however all executables now are like "sparc-rtems5-something".

I tried to compile a hello_world.c example with "sparc-rtems5-gcc" but it is missing rtems.h

I thought that after the building steps everything including dependencies would be in their proper directories and the compiler would recognize it. Also, I've searched for the rtems.h file and I haven't found it in any part of the system.

After all the history, I have some questions:

1) Is it good or technically appropriate to replace 4.11 by 5 in that step ? Given that a supposedly I have a 4.11 environment.

2) What is that 5 and 6 directories with each one a sparc bset ?
Why two sparc bsets ?

3) Have been the 4.11 git directories changed over years ? Even though it is old.

4) Could someone explain how to build properly the rtems 4.11 system or at least recommend some guide?

It is worth noting that I found the documentation too confusing for a beginner. There are three different explanations of the environment, two in the user guide (quick start and installation sections) and one in the Source Builder docs. Also they differ in instructions. So I don't know which one or which part of each one to follow.

My uname -a command output:

Linux michel-COM 4.15.0-45-generic #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Upvotes: 0

Views: 344

Answers (1)

Christian Mauderer
Christian Mauderer

Reputation: 328

Short answer first: If you want to build a RTEMS 4.11 toolchain, you have to check out the 4.11 branch of the source builder. Try git checkout -t origin/4.11 in the rtems source builder directory. After that, a ../source-builder/sb-set-builder --list-bsets should list the 4.11/rtems-sparc.bset.

Now for the four questions:

1) Is it good or technically appropriate to replace 4.11 by 5 in that step ? Given that a supposedly I have a 4.11 environment.

If you want a 4.11 toolchain, you should not replace 4.11 by 5. Instead use the 4.11 release branches.

2) What is that 5 and 6 directories with each one a sparc bset ? Why two sparc bsets ?

The current development version of RTEMS is 5. I would recommend to use RTEMS 5 for most new developments. In general the development version works quite stable and most active projects that I know of use a snapshot of that version. It's also the one with the best community support.

6 is a experimental version of the toolchain only. While 5 uses gcc releases (most of the time), 6 is updated automatically to snapshots. See https://lists.rtems.org/pipermail/devel/2018-December/023954.html for details how that one was created.

3) Have been the 4.11 git directories changed over years ? Even though it is old.

4.11 has been moved to branches.

4) Could someone explain how to build properly the rtems 4.11 system or at least recommend some guide?

You should be able to follow the documentation with the difference, that you have to use the 4.11 branches of all repositories.

It is worth noting that I found the documentation too confusing for a beginner. There are three different explanations of the environment, two in the user guide (quick start and installation sections) and one in the Source Builder docs. Also they differ in instructions. So I don't know which one or which part of each one to follow.

I have to be honest: I haven't started my RTEMS work with the documentation. So I'm not really sure about it's quality. I know that at least some of the points have been addressed in the current (version 5) documentation. For example, the source builder manual has been eliminated.

Upvotes: 1

Related Questions