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
getting_started:host_and_target [2015/10/03 15:43] abajricgetting_started:host_and_target [2021/02/12 16:40] (current) – [Cross Compilation] ursgraf
Line 1: Line 1:
 ====== Host and Target ====== ====== Host and Target ======
  
-It is important to distinguish between the machine where the development is done (the host) and the machine where the program will be running (the target). These two can be the same but very often you write the program on one machine and execute it on another. And very often the target machine is not identical to the host machine, which means that the program cannot be simply copied from the host to the target. If the architecture of target and host don't match, cross compilation is necessary.+It is important to distinguish between the machine where the development is done (the host) and the machine where the program will be running (the target). These two can be the same but very often you write the program on one machine and execute it on another. And very often the architecture of the target machine is not identical to the one of the host machine, which means that programs cannot be simply copied from the host to the target. If the architectures of target and host don't match, cross compilation is necessary.
  
  
-===== Find the Architecture of your Machine =====+===== Determine the Architecture of your Machine =====
  
 On a Linux system the following command displays the hardware plattform of your machine: On a Linux system the following command displays the hardware plattform of your machine:
  
 <code> <code>
-$ uname -i+$ uname -m
 </code> </code>
  
Line 18: Line 18:
 </code> </code>
  
-On the target machine it's probably different. Some examples are: x86, x86_64, armv7l, powerpc, ...+On the target machine it's probably different. Some examples are: ''x86''''x86_64''''armv7l''''powerpc'', ...
  
 ===== 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 ]]. EEROS uses CMake to build the code. By default CMake does not use a cross compiler. To tell CMake to use a cross compiler you have to supply the CMAKE_TOOLCHAIN_FILE option when generating the build files:+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. 
 + 
 +If you don't use an SDK, you have to make sure to manually specify a cross compiler. EEROS uses CMake to build the code. By default CMake does not use a 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> <code>
getting_started/host_and_target.1443879810.txt.gz · Last modified: 2015/10/03 15:43 by abajric