96boards / 96boardsgpio Goto Github PK
View Code? Open in Web Editor NEWA library to make GPIO use across 96Boards uniform
License: GNU Lesser General Public License v2.1
A library to make GPIO use across 96Boards uniform
License: GNU Lesser General Public License v2.1
Please, correct this variable at the file.
It's causing an error when I perform a sudo make install at my DragonBoard 410c.
After I changed it, it's been working fine.
libsoc doesn't have a file called: autogen.sh
You need to run: autoreconf -i
So I think you should fix the docs
I try to build it on the dragonboard 410c, but I get a build error:
error: 'LS_SHARED' undeclared; did you mean 'LS_GPIO_SHARED'?
Trying to configure 96BoardsGPIO and getting error:
linaro@linaro-alip:~/Desktop/dev/96BoardsGPIO$ make
Making all in lib
make[1]: Entering directory '/home/linaro/Desktop/dev/96BoardsGPIO/lib'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME="96BoardsGPIO" -DPACKAGE_TARNAME="96boardsgpio" -DPACKAGE_VERSION="0.1" -DPACKAGE_STRING="96BoardsGPIO\ 0.1" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="96boardsgpio" -DVERSION="0.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -I. -I../lib -g -O2 -MT lib96BoardsGPIO_la-gpio.lo -MD -MP -MF .deps/lib96BoardsGPIO_la-gpio.Tpo -c -o lib96BoardsGPIO_la-gpio.lo test -f 'gpio.c' || echo './'
gpio.c
libtool: compile: gcc -DPACKAGE_NAME="96BoardsGPIO" -DPACKAGE_TARNAME="96boardsgpio" -DPACKAGE_VERSION="0.1" "-DPACKAGE_STRING="96BoardsGPIO 0.1"" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="96boardsgpio" -DVERSION="0.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -I. -I../lib -g -O2 -MT lib96BoardsGPIO_la-gpio.lo -MD -MP -MF .deps/lib96BoardsGPIO_la-gpio.Tpo -c gpio.c -fPIC -DPIC -o .libs/lib96BoardsGPIO_la-gpio.o
gpio.c: In function ‘gpio_id’:
gpio.c:63:17: warning: implicit declaration of function ‘strdup’ [-Wimplicit-function-declaration]
char *fixed = strdup(pin_name);
^~~~~~
gpio.c:63:17: warning: incompatible implicit declaration of built-in function ‘strdup’
gpio.c: In function ‘gpio_open’:
gpio.c:98:41: error: ‘LS_SHARED’ undeclared (first use in this function)
gpio *g = libsoc_gpio_request(gpio_id, LS_SHARED);
^~~~~~~~~
gpio.c:98:41: note: each undeclared identifier is reported only once for each function it appears in
gpio.c:101:7: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration]
if (!strcmp(direction, "in"))
^~~~~~
Makefile:459: recipe for target 'lib96BoardsGPIO_la-gpio.lo' failed
make[1]: *** [lib96BoardsGPIO_la-gpio.lo] Error 1
make[1]: Leaving directory '/home/linaro/Desktop/dev/96BoardsGPIO/lib'
Makefile:459: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
linaro@linaro-alip:~/Desktop/dev/96BoardsGPIO$ uname -a
Linux linaro-alip 4.9.27-linaro-lt-qcom #1 SMP PREEMPT Wed May 10 19:59:33 UTC 2017 aarch64 GNU/Linux
Hello, I don't know if this is really the place to ask this but I have searched elsewhere and didn't find anything, sorry if this is not to be posted here.
I am trying to build the example blink.c, have installed 96boards and its dependencies (via the autoreconf -i option), but it won't compile the script.
I am using this command : g++ blink.c -o Blink -lsoc -l96BoardsGPIO
I am getting these errors :
main.c:(.text+0x8c4): undefined reference to
gpio_id(char const_)'
main.c:(.text+0x8dc): undefined reference to gpio_open(unsigned int, char const_)' main.c:(.text+0x904): undefined reference to
digitalWrite(unsigned int, unsigned int)'
main.c:(.text+0x91c): undefined reference todigitalWrite(unsigned int, unsigned int)' collect2: error: ld returned 1 exit status
Would you have any idea how to correct this error please ? Sorry if this is a newbie question
Cheers, Pierre
This file is used by this package but never be created. Is it possible to generate this file during package installation? Or, it's better to specify it in the document and let the user create it manually.
Hello,
I appear to be having issues using the Python bindings on the Dragonboard 410c. I'm getting the following message when importing the library in to Python:
OSError: lib96BoardsGPIO.so: cannot open shared object file: No such file or directory
The file does exist in /usr/local/lib
Is it possible that you could create a Python Package and put it on PyPi?
Thanks,
Barry
Slightly pedantic maybe ...
The spec uses (-) and the python bindings use underscores (_)
So should:
GPIO_A = GPIO.gpio_id('GPIO_A')
be:
GPIO_A = GPIO.gpio_id('GPIO-A')
I won't like all the issues, but:
gpio.c
converts dashes to underscores in GPIO names and translates pin numbers and letters to names with underscore. However it appears that libsoc configuration uses the dash convention by default: https://github.com/jackmitch/libsoc/blob/master/contrib/board_files/dragonboard410c.conf
Which one is more right? :)
If one tries to get a GPIO using gpio_by_pin(23)
libsoc is eventually asked for GPIO_A
which is not in the above configuration.
Couldn't find the packaged libsoc for e.g. the Linaro Debian release for the DragonBoard right now to check, so it could be fixed there.
One idea is to include both dashed and underscored mappings in libsoc configuration as aliases.
Thanks!
Have you looked at https://github.com/jackmitch/libsoc ?
You have an ambiguous mix of GPL (COPYING) and LGPL (LICENSE, and other file headers) in the archive. Which is it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.