Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

User:Pau pajuelo

1,295 bytes added, 11:18, 29 August 2012
m
Program
== Program ==
 
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-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 IGEP Board
*Execute arm executable file inside IGEP Board (remote shell):<br>
<pre>root@igep00x0:~# ./hello-world
Hello world&nbsp;!</pre>
 
http://labs.isee.biz/images/c/c9/Rs485.tar.bz2
 
 
microcom -s 9600 -X /dev/ttyO0
== Test ==
4,199
edits