Sorry I forgot to ask if the i2c-io-api.h will also have the definitions that I will need to control the pins?

On Tue, Jul 15, 2008 at 1:02 PM, Jose Gomez <> wrote:
Thank you for the response Dave, and after looking at the different posts I found how to get the i2c files you are talking about ( bitbake robostix), and after reading the instructions on the wiki I was able to have the robostix and the gumstix communicating.  I also found this web site
which shows a simple example using the i2c, I have created the .bb file and tryed running it but I am getting some errors.

this is the .bb:
DESCRIPTION = "hello world sample program using i2c"

PR = "r0"


SRC_URI = " \
  file://i2c-hello.c \

S = "${WORKDIR}"

do_compile () {
    ${CC} ${CFLAGS} ${LDFLAGS} -o i2c-hello i2c-hello.c

do_install () {
    install -d ${D}${bindir}/
    install -m 0755 ${S}/i2c-hello ${D}${bindir}/

FILES_${PN} = "${bindir}/i2c-hello"

and here are the errors:

ERROR: function do_compile failed
ERROR: log data follows (/home/ace/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/i2c-hello-1.0.0-r0/temp/log.do_compile.6929)
| arm-angstrom-linux-gnueabi-gcc: i2c-hello.c: No such file or directory
NOTE: Task failed: /home/ace/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/i2c-hello-1.0.0-r0/temp/log.do_compile.6929
NOTE: package i2c-hello-1.0.0-r0: task do_compile: failed
ERROR: TaskFailed event exception, aborting
NOTE: package i2c-hello-1.0.0: failed
ERROR: Build of /home/ace/gumstix/gumstix-oe/user.collection/packages/i2c-hello/ do_compile failed
ERROR: Task 7 (/home/ace/gumstix/gumstix-oe/user.collection/packages/i2c-hello/, do_compile) failed
NOTE: Tasks Summary: Attempted 201 tasks of which 201 didn't need to be rerun and 1 failed.
ERROR: '/home/ace/gumstix/gumstix-oe/user.collection/packages/i2c-hello/' failed

Am I missing files that need to be linked to the .c or this program was not ment for oe? or I am just going about it the wrong way?

Thank you,

On Tue, Jul 15, 2008 at 2:00 AM, Dave Hylands <> wrote:
Hi Jose,

> Thank you very much for reply, they do seem to be working pretty good, but I
> still would like to just run a program on gumstix oe to turn on and off the
> LEDs without me having to type in the commands on the gumstix console. I
> know the Flasher.hex does it but I want to see an example C program to
> control the robostix from the my verdex gumstix.
> Just a very small example will do, that shows me the header files that I
> would need to include, and where I would be able to find them.

i2c-io is a C program (actually 2 C programs - one which runs on the
gumstix and one which runs on the robostix).

i2c-io allows any of the registers on the ATMega128 to be manipulated
from the gumstix.

i2c-io was just created as a sample program that uses i2c to talk
between the gumstix and robostix. You could easily create your own.

Unfortunately, it's not a one-sided thing. You need to have code
running on both the gumstix and robostix.

I created some libraries for working with the i2c code I wrote for the
robostix. You'll find i2c-api.h/.c for doing all of the low-level
stuff. i2c-io-api.h/.c implements all of the i2c-io specific commands.

If you still have questions, fell free to ask away.

Dave Hylands
Vancouver, BC, Canada

This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
gumstix-users mailing list