Changes

User:Pau pajuelo

769 bytes added, 18:24, 14 September 2012
m
Example program
Example program configures a GPIO to wait a hardware interrupt. Once the GPIO value change from 0 to 1 (rising), program give you a message. This program needs a GPIO peripheral parameter, for example GPIO 157.
 
=== Compile example program ===
[http://labs.isee.biz/index.php/How_to_setup_a_cross_compiler#Download.2FInstall_IGEP_SDK Download an Install] IGEP SDK if you don't have it.
 
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>
 
*Download source code
 
*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 485-example 485-example.c</pre>
4,199
edits