Go to previous topic
Go to next topic
Last Post 15 Oct 2012 02:01 AM by  jackdomek
AN 531 Gingerbread GPIO demo contains errors
 0 Replies
Author Messages
jackdomek
New Member
New Member
Posts:3


--
15 Oct 2012 02:01 AM
    Dear LogicPD technical support,
    I'm trying to build your Android Gingerbread GPIO demo as described in the AN 531 document.
    I downloaded the sources from git.logicpd.com/gpio-demo.
    When building the sources I found some errors in the scripts and sources, specifically:

    gpio-demo/TestIgpio/deployToDevice.sh:
    -- refers to froyo instead of gingerbread;

    gpio-demo/TestIgpio/Android.mk:
    -- the line "LOCAL_MODULE_TAGS := user eng" contains the "user" tag which generates the following error:
    *** user tag detected on new module - user tags are only supported on legacy modules.

    gpio-demo/igpio/deployToDevice.sh:
    -- refers to wrong android-sdk directory for adb command;

    gpio-demo/igpio/buildIgpio.sh:
    -- refers to froyo instead of gingerbread;

    gpio-demo/igpio/igpio.c:
    -- should #include <linux/slab.h>
    -- should #define init_MUTEX(sem) sema_init(sem,1)
    -- refers to obsolete "ioctl" field in the struct file_operations (I changed this to "unlocked_ioctl")
    -- [COULD NOT FIND WORKAROUND] calls the "void omap_mux_write(u16 offset, u16 val)" function.

    Finally I was able to build the GPIO demo, but when trying to load the igpio driver, I got the following:
    igpio: Unknown symbol omap_mux_write (err 0)
    insmod: init_module '/data/local/tmp/igpio.ko' failed (No such file or directory)

    I was able to find a workaround to all but the last error. I did a grep for the omap_mux_write function in the full gingerbread tree (downloaded from git.logicpd.com) and I only found a match in the file:
    kernel/arch/arm/mach-omap2/mux.c
    but the function has a different signature:
    void omap_mux_write(struct omap_mux_partition *partition, u16 val, u16 reg)
    I don't know how to pass the first argument to the function.

    Please help, we really need the GPIO feature in out project.
    Thanks in advance.
    Domenico.


    ---