Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to setup a cross compiler

1,341 bytes added, 16:44, 14 August 2012
m
no edit summary
<pre>jdoe@ubuntu ~/Downloads $ ls /opt/poky/
1.2 1.2.1 </pre>
== Use IGEP SDK ==
 
IGEP SDK 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 virtual 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-world
hello-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 IGEPv2 board
*Execute arm executable file inside IGEP Board (remote shell)<br>
<pre>root@igep00x0:~# ./hello-world
Hello world !</pre>
[[Category:Work_in_progress]] [[Category:Development_tools]] [[Category:How_to_forge]]
4,199
edits