From: kindredvendetta <ja...@ec...> - 2009-10-29 20:04:35
|
Hello, I'm completely new to the Gumstix so sorry if this has been answered elsewhere, but I haven't found anything to help fix my problem! It's probably something obvious... I'm trying to write an application in C which interfaces with the Gumstix Overo's GPIO pins, exposed on the pin header on an attached Summit board. I've successfully managed to manipulate the GPIO pins from the terminal by echoing the appropriate data to the files in sys/class/gpio, but from the C program I'd like to access the pins by calling functions such as gpio_request and gpio_set_value, which I guess necessitates a "#include <path/gpio.h>" at the beginning of the file. However, I can't get it to compile. Bitbake returns an error: "No such file or directory". Examples I see on the Internet suggest things such as linux/gpio.h, mach/gpio.h and asm/gpio.h, none of which work. I did a search for gpio.h on my system and there are 160 copies... not sure which one is the correct one. They are in subfolders named for different architectures under four main paths: /overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/linux-libc-headers-2.6.23-r4/linux-2.6.23/include/ /overo-oe/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.30-r47/staging-pkg/staging/overo-angstrom-linux-gnueabi/kernel/ /overo-oe/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.30-r47/git/arch/ /overo-oe/tmp/staging/overo-angstrom-linux-gnueabi/kernel/ Does anyone have an idea which one is correct? I've tried a few edits to my Bitbake file as well but not sure what to do as I don't fully understand Bitbake yet... putting "-I path" in the do_compile section was suggested to me, but hasn't worked. Do I need to edit this file? I've opened up some of the gpio.h files and some of them contain references to including other instances of gpio.h from elsewhere... this just seems to complicate things! I know I could simply write C code to write and read directly from the files in /sys/class/gpio but that won't fix the bigger problem - I should be able to include a header file! I assume that would also give me problems with using interrupts on these pins later on in development. Thanks in advance for your help. -- View this message in context: http://www.nabble.com/Problems-compiling-with-BitBake---Can%27t-find-header-file-gpio.h-tp26119802p26119802.html Sent from the Gumstix mailing list archive at Nabble.com. |