I downloaded the same revision and have the same problem with GPIO program



2007/2/13, Nikolaos Trikoupis <trikoupi@gmail.com>:

Hi again,      :)

1)

I had the revision 773 installed with gumstix(on  purchase) and I wrote a program referenced from:

http://docwiki.gumstix.org/Sample_code/C/gpregs

to test changing the pins. The program was running correctly.

Later I updated to revision 1292 and after rebuilding the code (of course after reflashing gumstix again),
I got the following message:

mmap(): Invalid argument

I used:
    map = mmap(0,
MAP_SIZE,
PROT_READ | PROT_WRITE,
MAP_SHARED,
fd,
0x40E00000 & ~MAP_MASK

);

2)
I downloaded th gpio-event driver from http://docwiki.gumstix.org/GPIO_event
and I tried to make it.

I got a lot of errors:

/root/gpio-event/gpio-event-drv.c: In function 'gpio_event_monitor':
/root/gpio-event/gpio-event-drv.c:658: error: 'SA_INTERRUPT' undeclared (first use in this function)
/root/gpio-event/gpio-event-drv.c :658: error: (Each undeclared identifier is reported only once
/root/gpio-event/gpio-event-drv.c:658: error: for each function it appears in.)
/root/gpio-event/gpio-event-drv.c:667: error: 'SA_TRIGGER_RISING' undeclared (first use in this function)
/root/gpio-event/gpio-event-drv.c:671: error: 'SA_TRIGGER_FALLING' undeclared (first use in this function)
/root/gpio-event/gpio-event-drv.c:684: warning: passing argument 2 of 'request_irq' from incompatible pointer type

the gpio-event-drv.c uses some libraries, some of which, I was not able to locate to my system

e.g.
#include <linux/config.h>


I couldn't either load it directly

# insmod gpio-event-drv.ko
gpio_event_drv: version magic '2.6.18gum mod_unload ARMv5 gcc-4.1' should be '2.6.20-rt5gum preempt mod_unload ARMv5 '
insmod: error inserting 'gpio-event-drv.ko': -1 Invalid module format


Any idea?


Note: for updating the buildroot, I first renamed the gumstix-buildroot to gumstix-buildroot773 and then I downloaded everything from the very beginning (for 1292) to a new gumstix-buildroot directory. I did that for backup reasons. I don't know if that could be the cause of any problem.


Thank you for your time,
Nikolaos

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users