109209eecSAndrew Geissler.. SPDX-License-Identifier: CC-BY-SA-2.0-UK 209209eecSAndrew Geissler 309209eecSAndrew Geissler******************************** 409209eecSAndrew GeisslerUsing the SDK Toolchain Directly 509209eecSAndrew Geissler******************************** 609209eecSAndrew Geissler 709209eecSAndrew GeisslerYou can use the SDK toolchain directly with Makefile and Autotools-based 809209eecSAndrew Geisslerprojects. 909209eecSAndrew Geissler 1009209eecSAndrew GeisslerAutotools-Based Projects 1109209eecSAndrew Geissler======================== 1209209eecSAndrew Geissler 1309209eecSAndrew GeisslerOnce you have a suitable :ref:`sdk-manual/intro:the cross-development toolchain` 1409209eecSAndrew Geisslerinstalled, it is very easy to develop a project using the `GNU 1509209eecSAndrew GeisslerAutotools-based <https://en.wikipedia.org/wiki/GNU_Build_System>`__ 1609209eecSAndrew Geisslerworkflow, which is outside of the :term:`OpenEmbedded Build System`. 1709209eecSAndrew Geissler 1809209eecSAndrew GeisslerThe following figure presents a simple Autotools workflow. 1909209eecSAndrew Geissler 2009209eecSAndrew Geissler.. image:: figures/sdk-autotools-flow.png 2109209eecSAndrew Geissler :align: center 2209209eecSAndrew Geissler 2309209eecSAndrew GeisslerFollow these steps to create a simple Autotools-based "Hello World" 2409209eecSAndrew Geisslerproject: 2509209eecSAndrew Geissler 2609209eecSAndrew Geissler.. note:: 2709209eecSAndrew Geissler 2809209eecSAndrew Geissler For more information on the GNU Autotools workflow, see the same 2909209eecSAndrew Geissler example on the 3009209eecSAndrew Geissler GNOME Developer 3109209eecSAndrew Geissler site. 3209209eecSAndrew Geissler 3309209eecSAndrew Geissler1. *Create a Working Directory and Populate It:* Create a clean 3409209eecSAndrew Geissler directory for your project and then make that directory your working 3509209eecSAndrew Geissler location. 3609209eecSAndrew Geissler :: 3709209eecSAndrew Geissler 3809209eecSAndrew Geissler $ mkdir $HOME/helloworld 3909209eecSAndrew Geissler $ cd $HOME/helloworld 4009209eecSAndrew Geissler 4109209eecSAndrew Geissler After setting up the directory, populate it with files needed for the flow. 4209209eecSAndrew Geissler You need a project source file, a file to help with configuration, 4309209eecSAndrew Geissler and a file to help create the Makefile, and a README file: 4409209eecSAndrew Geissler ``hello.c``, ``configure.ac``, ``Makefile.am``, and ``README``, 4509209eecSAndrew Geissler respectively. 4609209eecSAndrew Geissler 4709209eecSAndrew Geissler Use the following command to create an empty README file, which is 48*c926e17cSAndrew Geissler required by GNU Coding Standards:: 4909209eecSAndrew Geissler 5009209eecSAndrew Geissler $ touch README 5109209eecSAndrew Geissler 5209209eecSAndrew Geissler Create the remaining 5309209eecSAndrew Geissler three files as follows: 5409209eecSAndrew Geissler 55*c926e17cSAndrew Geissler - ``hello.c``:: 5609209eecSAndrew Geissler 5709209eecSAndrew Geissler #include <stdio.h> 5809209eecSAndrew Geissler 5909209eecSAndrew Geissler main() 6009209eecSAndrew Geissler { 6109209eecSAndrew Geissler printf("Hello World!\n"); 6209209eecSAndrew Geissler } 6309209eecSAndrew Geissler 64*c926e17cSAndrew Geissler - ``configure.ac``:: 6509209eecSAndrew Geissler 6609209eecSAndrew Geissler AC_INIT(hello,0.1) 6709209eecSAndrew Geissler AM_INIT_AUTOMAKE([foreign]) 6809209eecSAndrew Geissler AC_PROG_CC 6909209eecSAndrew Geissler AC_CONFIG_FILES(Makefile) 7009209eecSAndrew Geissler AC_OUTPUT 7109209eecSAndrew Geissler 72*c926e17cSAndrew Geissler - ``Makefile.am``:: 7309209eecSAndrew Geissler 7409209eecSAndrew Geissler bin_PROGRAMS = hello 7509209eecSAndrew Geissler hello_SOURCES = hello.c 7609209eecSAndrew Geissler 7709209eecSAndrew Geissler2. *Source the Cross-Toolchain Environment Setup File:* As described 7809209eecSAndrew Geissler earlier in the manual, installing the cross-toolchain creates a 7909209eecSAndrew Geissler cross-toolchain environment setup script in the directory that the 8009209eecSAndrew Geissler SDK was installed. Before you can use the tools to develop your 8109209eecSAndrew Geissler project, you must source this setup script. The script begins with 8209209eecSAndrew Geissler the string "environment-setup" and contains the machine architecture, 8309209eecSAndrew Geissler which is followed by the string "poky-linux". For this example, the 8409209eecSAndrew Geissler command sources a script from the default SDK installation directory 8509209eecSAndrew Geissler that uses the 32-bit Intel x86 Architecture and the &DISTRO; Yocto 86*c926e17cSAndrew Geissler Project release:: 8709209eecSAndrew Geissler 8809209eecSAndrew Geissler $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux 8909209eecSAndrew Geissler 9009209eecSAndrew Geissler3. *Create the configure Script:* Use the ``autoreconf`` command to 9109209eecSAndrew Geissler generate the ``configure`` script. 9209209eecSAndrew Geissler :: 9309209eecSAndrew Geissler 9409209eecSAndrew Geissler $ autoreconf 9509209eecSAndrew Geissler 9609209eecSAndrew Geissler The ``autoreconf`` 9709209eecSAndrew Geissler tool takes care of running the other Autotools such as ``aclocal``, 9809209eecSAndrew Geissler ``autoconf``, and ``automake``. 9909209eecSAndrew Geissler 10009209eecSAndrew Geissler .. note:: 10109209eecSAndrew Geissler 1023b8a17c1SAndrew Geissler If you get errors from ``configure.ac``, which ``autoreconf`` 10309209eecSAndrew Geissler runs, that indicate missing files, you can use the "-i" option, 10409209eecSAndrew Geissler which ensures missing auxiliary files are copied to the build 10509209eecSAndrew Geissler host. 10609209eecSAndrew Geissler 10709209eecSAndrew Geissler4. *Cross-Compile the Project:* This command compiles the project using 10809209eecSAndrew Geissler the cross-compiler. The 10909209eecSAndrew Geissler :term:`CONFIGURE_FLAGS` 11009209eecSAndrew Geissler environment variable provides the minimal arguments for GNU 111*c926e17cSAndrew Geissler configure:: 11209209eecSAndrew Geissler 11309209eecSAndrew Geissler $ ./configure ${CONFIGURE_FLAGS} 11409209eecSAndrew Geissler 11509209eecSAndrew Geissler For an Autotools-based 11609209eecSAndrew Geissler project, you can use the cross-toolchain by just passing the 11709209eecSAndrew Geissler appropriate host option to ``configure.sh``. The host option you use 11809209eecSAndrew Geissler is derived from the name of the environment setup script found in the 11909209eecSAndrew Geissler directory in which you installed the cross-toolchain. For example, 12009209eecSAndrew Geissler the host option for an ARM-based target that uses the GNU EABI is 12109209eecSAndrew Geissler ``armv5te-poky-linux-gnueabi``. You will notice that the name of the 12209209eecSAndrew Geissler script is ``environment-setup-armv5te-poky-linux-gnueabi``. Thus, the 12309209eecSAndrew Geissler following command works to update your project and rebuild it using 124*c926e17cSAndrew Geissler the appropriate cross-toolchain tools:: 12509209eecSAndrew Geissler 12609209eecSAndrew Geissler $ ./configure --host=armv5te-poky-linux-gnueabi --with-libtool-sysroot=sysroot_dir 12709209eecSAndrew Geissler 12809209eecSAndrew Geissler5. *Make and Install the Project:* These two commands generate and 129*c926e17cSAndrew Geissler install the project into the destination directory:: 13009209eecSAndrew Geissler 13109209eecSAndrew Geissler $ make 13209209eecSAndrew Geissler $ make install DESTDIR=./tmp 13309209eecSAndrew Geissler 13409209eecSAndrew Geissler .. note:: 13509209eecSAndrew Geissler 13609209eecSAndrew Geissler To learn about environment variables established when you run the 13709209eecSAndrew Geissler cross-toolchain environment setup script and how they are used or 13809209eecSAndrew Geissler overridden when the Makefile, see the " 13909209eecSAndrew Geissler Makefile-Based Projects 14009209eecSAndrew Geissler " section. 14109209eecSAndrew Geissler 14209209eecSAndrew Geissler This next command is a simple way to verify the installation of your 14309209eecSAndrew Geissler project. Running the command prints the architecture on which the 14409209eecSAndrew Geissler binary file can run. This architecture should be the same 14509209eecSAndrew Geissler architecture that the installed cross-toolchain supports. 14609209eecSAndrew Geissler :: 14709209eecSAndrew Geissler 14809209eecSAndrew Geissler $ file ./tmp/usr/local/bin/hello 14909209eecSAndrew Geissler 15009209eecSAndrew Geissler6. *Execute Your Project:* To execute the project, you would need to run 15109209eecSAndrew Geissler it on your target hardware. If your target hardware happens to be 152*c926e17cSAndrew Geissler your build host, you could run the project as follows:: 15309209eecSAndrew Geissler 15409209eecSAndrew Geissler $ ./tmp/usr/local/bin/hello 15509209eecSAndrew Geissler 15609209eecSAndrew Geissler As expected, the project displays the "Hello World!" message. 15709209eecSAndrew Geissler 15809209eecSAndrew GeisslerMakefile-Based Projects 15909209eecSAndrew Geissler======================= 16009209eecSAndrew Geissler 16109209eecSAndrew GeisslerSimple Makefile-based projects use and interact with the cross-toolchain 16209209eecSAndrew Geisslerenvironment variables established when you run the cross-toolchain 16309209eecSAndrew Geisslerenvironment setup script. The environment variables are subject to 16409209eecSAndrew Geisslergeneral ``make`` rules. 16509209eecSAndrew Geissler 16609209eecSAndrew GeisslerThis section presents a simple Makefile development flow and provides an 16709209eecSAndrew Geisslerexample that lets you see how you can use cross-toolchain environment 16809209eecSAndrew Geisslervariables and Makefile variables during development. 16909209eecSAndrew Geissler 17009209eecSAndrew Geissler.. image:: figures/sdk-makefile-flow.png 17109209eecSAndrew Geissler :align: center 17209209eecSAndrew Geissler 17309209eecSAndrew GeisslerThe main point of this section is to explain the following three cases 17409209eecSAndrew Geisslerregarding variable behavior: 17509209eecSAndrew Geissler 17609209eecSAndrew Geissler- *Case 1 - No Variables Set in the Makefile Map to Equivalent 17709209eecSAndrew Geissler Environment Variables Set in the SDK Setup Script:* Because matching 17809209eecSAndrew Geissler variables are not specifically set in the ``Makefile``, the variables 17909209eecSAndrew Geissler retain their values based on the environment setup script. 18009209eecSAndrew Geissler 18109209eecSAndrew Geissler- *Case 2 - Variables Are Set in the Makefile that Map to Equivalent 18209209eecSAndrew Geissler Environment Variables from the SDK Setup Script:* Specifically 18309209eecSAndrew Geissler setting matching variables in the ``Makefile`` during the build 18409209eecSAndrew Geissler results in the environment settings of the variables being 18509209eecSAndrew Geissler overwritten. In this case, the variables you set in the ``Makefile`` 18609209eecSAndrew Geissler are used. 18709209eecSAndrew Geissler 18809209eecSAndrew Geissler- *Case 3 - Variables Are Set Using the Command Line that Map to 18909209eecSAndrew Geissler Equivalent Environment Variables from the SDK Setup Script:* 19009209eecSAndrew Geissler Executing the ``Makefile`` from the command line results in the 19109209eecSAndrew Geissler environment variables being overwritten. In this case, the 19209209eecSAndrew Geissler command-line content is used. 19309209eecSAndrew Geissler 19409209eecSAndrew Geissler.. note:: 19509209eecSAndrew Geissler 19609209eecSAndrew Geissler Regardless of how you set your variables, if you use the "-e" option 197*c926e17cSAndrew Geissler with ``make``, the variables from the SDK setup script take precedence:: 19809209eecSAndrew Geissler 19909209eecSAndrew Geissler $ make -e target 20009209eecSAndrew Geissler 20109209eecSAndrew Geissler 20209209eecSAndrew GeisslerThe remainder of this section presents a simple Makefile example that 20309209eecSAndrew Geisslerdemonstrates these variable behaviors. 20409209eecSAndrew Geissler 20509209eecSAndrew GeisslerIn a new shell environment variables are not established for the SDK 20609209eecSAndrew Geissleruntil you run the setup script. For example, the following commands show 20709209eecSAndrew Geisslera null value for the compiler variable (i.e. 20809209eecSAndrew Geissler:term:`CC`). 20909209eecSAndrew Geissler:: 21009209eecSAndrew Geissler 21109209eecSAndrew Geissler $ echo ${CC} 21209209eecSAndrew Geissler 21309209eecSAndrew Geissler $ 21409209eecSAndrew Geissler 21509209eecSAndrew GeisslerRunning the 21609209eecSAndrew GeisslerSDK setup script for a 64-bit build host and an i586-tuned target 21709209eecSAndrew Geisslerarchitecture for a ``core-image-sato`` image using the current &DISTRO; 21809209eecSAndrew GeisslerYocto Project release and then echoing that variable shows the value 219*c926e17cSAndrew Geisslerestablished through the script:: 22009209eecSAndrew Geissler 22109209eecSAndrew Geissler $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux 22209209eecSAndrew Geissler $ echo ${CC} 22309209eecSAndrew Geissler i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/&DISTRO;/sysroots/i586-poky-linux 22409209eecSAndrew Geissler 22509209eecSAndrew GeisslerTo illustrate variable use, work through this simple "Hello World!" 22609209eecSAndrew Geisslerexample: 22709209eecSAndrew Geissler 22809209eecSAndrew Geissler1. *Create a Working Directory and Populate It:* Create a clean 22909209eecSAndrew Geissler directory for your project and then make that directory your working 23009209eecSAndrew Geissler location. 23109209eecSAndrew Geissler :: 23209209eecSAndrew Geissler 23309209eecSAndrew Geissler $ mkdir $HOME/helloworld 23409209eecSAndrew Geissler $ cd $HOME/helloworld 23509209eecSAndrew Geissler 23609209eecSAndrew Geissler After 23709209eecSAndrew Geissler setting up the directory, populate it with files needed for the flow. 23809209eecSAndrew Geissler You need a ``main.c`` file from which you call your function, a 23909209eecSAndrew Geissler ``module.h`` file to contain headers, and a ``module.c`` that defines 24009209eecSAndrew Geissler your function. 24109209eecSAndrew Geissler 24209209eecSAndrew Geissler Create the three files as follows: 24309209eecSAndrew Geissler 244*c926e17cSAndrew Geissler - ``main.c``:: 24509209eecSAndrew Geissler 24609209eecSAndrew Geissler #include "module.h" 24709209eecSAndrew Geissler void sample_func(); 24809209eecSAndrew Geissler int main() 24909209eecSAndrew Geissler { 25009209eecSAndrew Geissler sample_func(); 25109209eecSAndrew Geissler return 0; 25209209eecSAndrew Geissler } 25309209eecSAndrew Geissler 254*c926e17cSAndrew Geissler - ``module.h``:: 25509209eecSAndrew Geissler 25609209eecSAndrew Geissler #include <stdio.h> 25709209eecSAndrew Geissler void sample_func(); 25809209eecSAndrew Geissler 259*c926e17cSAndrew Geissler - ``module.c``:: 26009209eecSAndrew Geissler 26109209eecSAndrew Geissler #include "module.h" 26209209eecSAndrew Geissler void sample_func() 26309209eecSAndrew Geissler { 26409209eecSAndrew Geissler printf("Hello World!"); 26509209eecSAndrew Geissler printf("\n"); 26609209eecSAndrew Geissler } 26709209eecSAndrew Geissler 26809209eecSAndrew Geissler2. *Source the Cross-Toolchain Environment Setup File:* As described 26909209eecSAndrew Geissler earlier in the manual, installing the cross-toolchain creates a 27009209eecSAndrew Geissler cross-toolchain environment setup script in the directory that the 27109209eecSAndrew Geissler SDK was installed. Before you can use the tools to develop your 27209209eecSAndrew Geissler project, you must source this setup script. The script begins with 27309209eecSAndrew Geissler the string "environment-setup" and contains the machine architecture, 27409209eecSAndrew Geissler which is followed by the string "poky-linux". For this example, the 27509209eecSAndrew Geissler command sources a script from the default SDK installation directory 276d1e89497SAndrew Geissler that uses the 32-bit Intel x86 Architecture and the &DISTRO_NAME; Yocto 277*c926e17cSAndrew Geissler Project release:: 27809209eecSAndrew Geissler 279d1e89497SAndrew Geissler $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux 28009209eecSAndrew Geissler 28109209eecSAndrew Geissler3. *Create the Makefile:* For this example, the Makefile contains 28209209eecSAndrew Geissler two lines that can be used to set the ``CC`` variable. One line is 28309209eecSAndrew Geissler identical to the value that is set when you run the SDK environment 28409209eecSAndrew Geissler setup script, and the other line sets ``CC`` to "gcc", the default 285*c926e17cSAndrew Geissler GNU compiler on the build host:: 28609209eecSAndrew Geissler 28709209eecSAndrew Geissler # CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux 28809209eecSAndrew Geissler # CC="gcc" 28909209eecSAndrew Geissler all: main.o module.o 29009209eecSAndrew Geissler ${CC} main.o module.o -o target_bin 29109209eecSAndrew Geissler main.o: main.c module.h 29209209eecSAndrew Geissler ${CC} -I . -c main.c 29309209eecSAndrew Geissler module.o: module.c 29409209eecSAndrew Geissler module.h ${CC} -I . -c module.c 29509209eecSAndrew Geissler clean: 29609209eecSAndrew Geissler rm -rf *.o 29709209eecSAndrew Geissler rm target_bin 29809209eecSAndrew Geissler 29909209eecSAndrew Geissler4. *Make the Project:* Use the ``make`` command to create the binary 30009209eecSAndrew Geissler output file. Because variables are commented out in the Makefile, the 30109209eecSAndrew Geissler value used for ``CC`` is the value set when the SDK environment setup 302*c926e17cSAndrew Geissler file was run:: 30309209eecSAndrew Geissler 30409209eecSAndrew Geissler $ make 30509209eecSAndrew Geissler i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c 30609209eecSAndrew Geissler i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c module.c 30709209eecSAndrew Geissler i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux main.o module.o -o target_bin 30809209eecSAndrew Geissler 30909209eecSAndrew Geissler From the results of the previous command, you can see that 31009209eecSAndrew Geissler the compiler used was the compiler established through the ``CC`` 31109209eecSAndrew Geissler variable defined in the setup script. 31209209eecSAndrew Geissler 31309209eecSAndrew Geissler You can override the ``CC`` environment variable with the same 31409209eecSAndrew Geissler variable as set from the Makefile by uncommenting the line in the 31509209eecSAndrew Geissler Makefile and running ``make`` again. 31609209eecSAndrew Geissler :: 31709209eecSAndrew Geissler 31809209eecSAndrew Geissler $ make clean 31909209eecSAndrew Geissler rm -rf *.o 32009209eecSAndrew Geissler rm target_bin 32109209eecSAndrew Geissler # 32209209eecSAndrew Geissler # Edit the Makefile by uncommenting the line that sets CC to "gcc" 32309209eecSAndrew Geissler # 32409209eecSAndrew Geissler $ make 32509209eecSAndrew Geissler gcc -I . -c main.c 32609209eecSAndrew Geissler gcc -I . -c module.c 32709209eecSAndrew Geissler gcc main.o module.o -o target_bin 32809209eecSAndrew Geissler 32909209eecSAndrew Geissler As shown in the previous example, the 33009209eecSAndrew Geissler cross-toolchain compiler is not used. Rather, the default compiler is 33109209eecSAndrew Geissler used. 33209209eecSAndrew Geissler 33309209eecSAndrew Geissler This next case shows how to override a variable by providing the 33409209eecSAndrew Geissler variable as part of the command line. Go into the Makefile and 33509209eecSAndrew Geissler re-insert the comment character so that running ``make`` uses the 33609209eecSAndrew Geissler established SDK compiler. However, when you run ``make``, use a 337*c926e17cSAndrew Geissler command-line argument to set ``CC`` to "gcc":: 33809209eecSAndrew Geissler 33909209eecSAndrew Geissler $ make clean 34009209eecSAndrew Geissler rm -rf *.o 34109209eecSAndrew Geissler rm target_bin 34209209eecSAndrew Geissler # 34309209eecSAndrew Geissler # Edit the Makefile to comment out the line setting CC to "gcc" 34409209eecSAndrew Geissler # 34509209eecSAndrew Geissler $ make 34609209eecSAndrew Geissler i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c 34709209eecSAndrew Geissler i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c module.c 34809209eecSAndrew Geissler i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux main.o module.o -o target_bin 34909209eecSAndrew Geissler $ make clean 35009209eecSAndrew Geissler rm -rf *.o 35109209eecSAndrew Geissler rm target_bin 35209209eecSAndrew Geissler $ make CC="gcc" 35309209eecSAndrew Geissler gcc -I . -c main.c 35409209eecSAndrew Geissler gcc -I . -c module.c 35509209eecSAndrew Geissler gcc main.o module.o -o target_bin 35609209eecSAndrew Geissler 35709209eecSAndrew Geissler In the previous case, the command-line argument overrides the SDK 35809209eecSAndrew Geissler environment variable. 35909209eecSAndrew Geissler 36009209eecSAndrew Geissler In this last case, edit Makefile again to use the "gcc" compiler but 361*c926e17cSAndrew Geissler then use the "-e" option on the ``make`` command line:: 36209209eecSAndrew Geissler 36309209eecSAndrew Geissler $ make clean 36409209eecSAndrew Geissler rm -rf *.o 36509209eecSAndrew Geissler rm target_bin 36609209eecSAndrew Geissler # 36709209eecSAndrew Geissler # Edit the Makefile to use "gcc" 36809209eecSAndrew Geissler # 36909209eecSAndrew Geissler $ make 37009209eecSAndrew Geissler gcc -I . -c main.c 37109209eecSAndrew Geissler gcc -I . -c module.c 37209209eecSAndrew Geissler gcc main.o module.o -o target_bin 37309209eecSAndrew Geissler $ make clean 37409209eecSAndrew Geissler rm -rf *.o 37509209eecSAndrew Geissler rm target_bin 37609209eecSAndrew Geissler $ make -e 37709209eecSAndrew Geissler i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c 37809209eecSAndrew Geissler i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c module.c 37909209eecSAndrew Geissler i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux main.o module.o -o target_bin 38009209eecSAndrew Geissler 38109209eecSAndrew Geissler In the previous case, the "-e" option forces ``make`` to 38209209eecSAndrew Geissler use the SDK environment variables regardless of the values in the 38309209eecSAndrew Geissler Makefile. 38409209eecSAndrew Geissler 38509209eecSAndrew Geissler5. *Execute Your Project:* To execute the project (i.e. ``target_bin``), 386*c926e17cSAndrew Geissler use the following command:: 38709209eecSAndrew Geissler 38809209eecSAndrew Geissler $ ./target_bin 38909209eecSAndrew Geissler Hello World! 39009209eecSAndrew Geissler 39109209eecSAndrew Geissler .. note:: 39209209eecSAndrew Geissler 39309209eecSAndrew Geissler If you used the cross-toolchain compiler to build 39409209eecSAndrew Geissler target_bin 39509209eecSAndrew Geissler and your build host differs in architecture from that of the 39609209eecSAndrew Geissler target machine, you need to run your project on the target device. 39709209eecSAndrew Geissler 39809209eecSAndrew Geissler As expected, the project displays the "Hello World!" message. 399