Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to setup a cross compiler

4,075 bytes added, 12:48, 16 November 2016
m
no edit summary
__TOC__
 
= Overview =
Cross-development usually involves two different platforms, the host platform where actual development work takes place, and the target platform where the final application is tested and run.
'''IGEP SDK Yocto Toolchain''' provides all necessary tools like a cross compiler, embedded libraries, etc. to compile program sources for IGEP devices.  '''IGEP SDK Yocto Toolchain''' is included in '''IGEP SDK Virtual Machine''' but you can install in other Linux operating system. = Download/Install IGEP SDK Yocto Toolchain = ==='''IGEP OMAP3'''=== Download - [http://www.isee.biz/support/downloads/item/igep-sdk-yocto-toolchain-1-2-2-3 isee.biz] follow the next steps:*Open a terminal *Located your downloaded file, in my case is inside /home/jdoe/Downloads:<pre>jdoe@ubuntu ~ $ cd Downloads/</pre> *Extract binaries in root directory with root privileges<br><pre>jdoe@ubuntu ~/Downloads $ sudo tar jxf igep-sdk-yocto-toolchain-*.tar.bz2 -C /</pre>*Make sure that binaries are installed correctly.<pre>jdoe@ubuntu ~/Downloads $ ls /opt/poky/1.2 1.2.1 </pre> ==='''IGEP iMX6'''=== Download - [http://downloads.isee.biz/pub/releases/sdk/poky-glibc-x86_64-isee-fsl-image-dev-cortexa9hf-vfp-neon-toolchain-1.8.sh isee.biz] follow the next steps:*Open a terminal *Located your downloaded file, in my case is inside /home/jdoe/Downloads:<pre>jdoe@ubuntu ~ $ cd Downloads/</pre> *Extract binaries in root directory with root privileges<br><pre>jdoe@ubuntu ~/Downloads $ sudo sh *.sh /</pre>*Make sure that binaries are installed correctly.<pre>jdoe@ubuntu ~/Downloads $ ls /opt/poky/1.8 </pre>  = Use IGEP SDK Yocto Toolchain = IGEP SDK Yocto Toolchain can be integrated with multiple IDEs, but the simplest method to prove it is using terminal:  *Create source code text file: First of all you need to initialize a suitable environment in the bash shell console inside your machine. <br> You can do this sourcing once the environment-setup script. <pre>jdoe@ubuntu ~ $ source /opt/poky/1.2/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi </pre> Create a single .c file (hello-world.c), using your preferred editor (vi, nano, gedit, ...) <br> hello-world.c: <pre>#include &lt;stdio.h&gt; int main (int argc, char **argv){ printf("Hello world&nbsp;!\n"); return 0;}</pre> *Build arm binary executable: Cross toolchain tools are available into the built-in virtual machine Poky SDK. You only need open bash terminal prompt and write commands: <pre>jdoe@ubuntu ~/Desktop $ arm-poky-linux-gnueabi-gcc -o hello-world hello-world.c</pre> *Check binary created:<pre>jdoe@ubuntu ~/Desktop $ file hello-worldhello-world: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped</pre> *Transfer arm executable file from virtual machine to IGEP Board *Execute arm executable file inside IGEP Board (remote shell):<br><pre>root@igep00x0:~# ./hello-world Hello world&nbsp;!</pre> = Other Cross compilers for IGEP Boards = == Linaro Toolchain == {{Message/Information Message|message=Tested in Ubuntu 12.04.}}  === Install Toolchain === Install Linaro Toolchain in Ubuntu distribution is simple, because it is officially supported at latest releases. Open a terminal and type: <pre>sudo apt-get install cpp-4.5-arm-linux-gnueabi g++-4.5-arm-linux-gnueabi </pre> For older releases you need to add Linaro Toolchain repositories: <pre>sudo add-apt-repository ppa:linaro-maintainers/toolchainsudo apt-get install cpp-4.5-arm-linux-gnueabi g++-4.5-arm-linux-gnueabi </pre> Link Linaro Toolchain 4.5: <pre>sudo ln -f -s /usr/bin/arm-linux-gnueabi-cpp-4.5 /usr/bin/arm-linux-gnueabi-cpp sudo ln -f -s /usr/bin/arm-linux-gnueabi-gcov-4.5 /usr/bin/arm-linux-gnueabi-gcov sudo ln -f -s /usr/bin/arm-linux-gnueabi-gcc-4.5 /usr/bin/arm-linux-gnueabi-gcc </pre> = IDE programs = An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of:  *a source code editor *build automation tools *a graphical debugger IGEP SDK can be integrated with some popular IDEs like Eclipse, QT Creator and Codeblocks. IGEP SDK Virtual Machine includes by default Eclipse and Qt Creator to let develop applications quickly.<br>  == Eclipse == ''(from [[How to install Eclipse IDE]])''  {{#lst:How to install Eclipse IDE|overview}}  == QtCreator == ''(from [[How to install Qt Creator]])''  {{#lst:How to install Qt Creator|overview}}  == Codeblocks == ''(from [[Install and configure Codeblocks for IGEP devices]])''
{{#lst:Install and configure Codeblocks for IGEP SDK is included in IGEP SDK Virtual Machine but you can install in other Linux operating system. devices|overview}}
= Install IGEP SDK =
== Download IGEP SDK<br> =={{Message/Forum}}
Download IGEP SDK&nbsp;from [http://www.isee.biz/component/zoo/item/igep-yocto-toolcahin-sdk isee.biz] website. Onece downloaded follow the next steps: <pre>a </pre> [[Category:Work_in_progress]] [[Category:Development_tools]] [[Category:How_to_forge]]
4,199
edits