Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to use GPIOs

179 bytes added, 15:31, 9 January 2012
no edit summary
Go to:$/svn.hylands.org/linux/gpio/lib/. libgpio.so will be found here.
If a program is link with dinamic libraries, Linux kernel find this ones in a specific paths when program is executed. Now is necessary link the libgpio.so path to the envireonment variable LD_LIBRARY_PATH, use the following commnad:<br>
<pre>export LD_LIBRARY_PATH=/root/svn.hylands.org/linux/gpio/lib/
</pre>Check that libgpio.so is linked correctly. Go to:$/svn.hylands.org/linux/gpio/app, gpio program will be found here. Type next command: <pre>ldd gpio </pre> ldd command list program dependencies and show its paths. The result will be similar than this: <pre>root@localhostlSee if libgpio.so is found it. If you execute program in bash without linking library dependencies, bash give you a error message. ocalhost:~/svn.hylands.org/linux/gpio/app# ldd gpio libgpio.so => &gt; /root/svn.hylands.org/linux/gpio/lib/libgpio.so (0x40197000) libc.so.6 => &gt; /lib/libc.so.6 (0x401a0000)
/lib/ld-linux.so.3 (0x4008a000)
</pre>
Now you can execute example program gpio.
=== Execute app<br> ===
4,199
edits