source: rtems-docs/user/rsb/cross-canadian-cross.rst @ bb47f89

Last change on this file since bb47f89 was bb47f89, checked in by Chris Johns <chrisj@…>, on Oct 13, 2019 at 8:51:25 AM

user/rsb: Update 3rd party package build and add packaging details.

  • Property mode set to 100644
File size: 4.2 KB

Cross and Canadian Cross Building

Cross building and Canadian Cross building is the process of building on one machine an executable that runs on another machine. An example is building a set of RTEMS tools on Linux to run on Windows. The RSB supports cross building and Canadian cross building.

This sections details how to the RSB to cross and Canadian cross build.

Cross Building

Cross building is where the build machine and host are different. The build machine runs the RSB and the host machine is where the output from the build runs. An example is building a package such as Curl for RTEMS on your development machine.

To build the Curl package for RTEMS you enter the RSB command:

Error: Failed to load processor none
No macro or processor named 'none' found


  1. The tools and the RTEMS BSP are installed under the same prefix.
  2. The --host command is the RTEMS architecture and version.
  3. The BSP is built and installed in the prefix. The arhcitecture must match the --host architecture.

Canadian Cross Building

A Canadian cross builds are where the build, host and target machines all differ. For example building an RTEMS compiler for an ARM processor that runs on Windows is built using a Linux machine. The process is controlled by setting the build triplet to the host you are building, the host triplet to the host the tools will run on and the target to the RTEMS architecture you require. The tools needed by the RSB are:

  • Build host C and C++ compiler
  • Host C and C++ cross compiler

The RTEMS Source Builder requires you provide the build host C and C++ compiler and the final host C and C++ cross-compiler. The RSB will build the build host RTEMS compiler and the final host RTEMS C and C++ compiler, the output of this process.

The Host C and C++ compiler is a cross-compiler that builds executables for the host you want the tools for. You need to provide these tools. For Windows a number of Unix operating systems provide MinGW tool sets as packages.

The RSB will build an RTEMS tool set for the build host. This is needed when building the final host's RTEMS compiler as it needs to build RTEMS runtime code such as libc on the build host.

TIP: Make sure the host's cross-compiler tools are in your path before run the RSB build command.

TIP: Canadian Cross built tools will not run on the machine being used to build them so you should provide the --bset-tar-files and --no-install options. The option to not install the files lets you provide a prefix that does not exist or you cannot access.

To perform a cross build add --host= to the command line. For example to build a MinGW tool set on FreeBSD for Windows add --host=mingw32 if the cross compiler is mingw32-gcc:

Error: Failed to load processor none
No macro or processor named 'none' found

If you are on a Linux Fedora build host with the MinGW packages installed the command line is:

Error: Failed to load processor none
No macro or processor named 'none' found
Note: See TracBrowser for help on using the repository browser.