Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 15 Oct 2012 02:01 AM by  jackdomek
AN 531 Gingerbread GPIO demo contains errors
 0 Replies
Sort:
You are not authorized to post a reply.
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.
    You are not authorized to post a reply.