User Tools

Site Tools


getting_started:host_and_target

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
getting_started:host_and_target [2019/10/11 15:11] – [Cross Compilation] grafgetting_started:host_and_target [2021/02/12 16:33] – [Cross Compilation] ursgraf
Line 22: Line 22:
 ===== Cross Compilation ===== ===== Cross Compilation =====
  
-A compiler that runs on one plattform and generates code for another plattform is called a [[https://en.wikipedia.org/wiki/Cross_compiler | cross compiler ]]. A cross compiler can be obtained from the official package repositories of your Linux distribution or from third party sources. +A compiler that runs on one platform and generates code for another platform is called a [[https://en.wikipedia.org/wiki/Cross_compiler | cross compiler]]. We encourage to use our prebuilt software development kits (SDK) with built-in cross compiler. This SDK has to be installed on the host and contains exactly the same environment as is present on the target.
- +
-EEROS uses CMake to build the code. By default CMake does not use cross compiler. To tell CMake to use a cross compiler you have to supply the CMAKE_TOOLCHAIN_FILE option when generating the build files: +
- +
-<code> +
-$ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/toolchain-file.cmake path/to/source/directory +
-</code> +
- +
-An example of a toolchain file can be found on the github page of the EEROS scripts: [[https://github.com/eeros-project/eeros-build-scripts/tree/master/toolchainfile]]+
getting_started/host_and_target.txt · Last modified: 2021/02/12 16:40 by ursgraf