AW: GPIO OF OMAP5912

LIMITED Nguyen Duong Thanh (CR/AEM Praktikant)
2006-08-29T14:08:33Z

Hello,

I don't know if my idea help you.
Maybe the problem is about the libraries in directory /lib/ on OMAP file systems. It doesn't contain the libraries, which your program need.

Regard,
Thanh

-----Ursprüngliche Nachricht-----
Von: linux-omap-open-source-bounces@linux.omap.com [mailto:linux-omap-open-source-bounces@linux.omap.com] Im Auftrag von w.b.b
Gesendet: Dienstag, 29. August 2006 08:44
An: Linux-omap-open-source@linux.omap.com
Betreff: GPIO OF OMAP5912

hi:

i want to do some work about OMAP5912'GPIO.but I am failed to do that.

the following is a simple program:

test.c

-----------------------------------------------------

#include <stdio.h>
#include <unistd.h>
#include <asm/io.h>

#define GPIO3_OUT 0xfffbbc40 /* lp1 */

int main()
{
/* Get access to the ports */

/* Set the data signals (D0-7) of the port to all low (0) */
outb(0xffff, GPIO3_OUT);

/* Sleep for a while (100 ms) */
usleep(100000);
}
-----------------------------------------------------
arm-linux-gcc -g test.c -o test.out
----------------------------------------------------
I run the binary file on the omap:./test.out
-----------------------------------------------------
but i get the result:segmentation falt!
---------------------------------------------------
who can provide me with information? if you have done work related with gpio,would you like send me some examplefile?
thanks!