Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

User:Pau pajuelo

169 bytes removed, 11:29, 29 August 2012
m
Program
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 (hello485-worldexample.c), using your preferred editor (vi, nano, gedit, ...) <br> hello485-worldexample.c:
<pre>/* 485-example.c : Basic example of RS485 half duplex transmission */
#include <stdio.h>
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 hello485-world helloexample 485-worldexample.c</pre> === IGEP 1 ===*Check binary created:Get aremote shell and execute microcom program<pre>jdoe@ubuntu ~/Desktop $ file hello-worldhellomicrocom -world: ELF 32s 9600 -bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNUX /dev/Linux ttyO0 === IGEP 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:~# ./hello485-world Hello world&nbsp;!example</pre> 
http://labs.isee.biz/images/c/c9/Rs485.tar.bz2
4,199
edits