libpruio (BB D/A - I/O fast and easy)
Re: libpruio (BB D/A - I/O fast and easy)
Hi TJF,
has anyone been able to get the library going using Arch Linux? I am using Arch with kernel 4.5.0-1 (which has capemgr again) on a BeagleBone Green and currently can't get the libpruio device tree overlay blob provided with the download into my /sys/devices/platform/bone_capemgr/slots...
has anyone been able to get the library going using Arch Linux? I am using Arch with kernel 4.5.0-1 (which has capemgr again) on a BeagleBone Green and currently can't get the libpruio device tree overlay blob provided with the download into my /sys/devices/platform/bone_capemgr/slots...
Re: libpruio (BB D/A - I/O fast and easy)
H1 c136!
I didn't test on Arch Linux yet and I don't know about users running that. In any case pinmuxing will be a problem since the path names for ocp changed in the newer kernels, so libpruio cannot change pin modes, but will run with pre-set pins.
AFAIK the device tree compiler changed between kernels 3.8 and 4.x and there're differences in the dtbo format. I had to re-compile the libpruio-00A0.dts file with the matching dtc of the kernel version to run on 4.1 kernel. Also try this, first.
If this doesn't help, please send the output from dmesg:
dmesg | grep bone_cape
BR
PS:
Notifications are working again here. I just switched them off and on again.
I didn't test on Arch Linux yet and I don't know about users running that. In any case pinmuxing will be a problem since the path names for ocp changed in the newer kernels, so libpruio cannot change pin modes, but will run with pre-set pins.
AFAIK the device tree compiler changed between kernels 3.8 and 4.x and there're differences in the dtbo format. I had to re-compile the libpruio-00A0.dts file with the matching dtc of the kernel version to run on 4.1 kernel. Also try this, first.
If this doesn't help, please send the output from dmesg:
dmesg | grep bone_cape
BR
PS:
Notifications are working again here. I just switched them off and on again.
Re: libpruio (BB D/A - I/O fast and easy)
Hi TFJ,
Thank you! That helped.
Now... If I only want to use C/C++ code with your library, I won't have to install and setup the FreeBasic compiler?
I followed the install procedure in the online documentation. However, running e.g. the /src/c_examples/1 application for testing results in:
When I try to recompile it (the 1.c) on the BeagleBone Green with Arch I get
Thank you! That helped.
Now... If I only want to use C/C++ code with your library, I won't have to install and setup the FreeBasic compiler?
I followed the install procedure in the online documentation. However, running e.g. the /src/c_examples/1 application for testing results in:
Code: Select all
./1: error while loading shared libraries: libpruio.so: cannot open shared object file: No such file or directory
Code: Select all
In file included from 1.c:20:0:
../c_wrapper/pruio.h:197:7: error: 'PRUIO_AZ_GPIO' undeclared here (not in a function)
*Init[PRUIO_AZ_GPIO + 1], //!< initial device configuration, used in the destructor PruIo:~
^
../c_wrapper/pruio.h:337:7: error: 'PRUIO_AZ_PWMSS' undeclared here (not in a function)
*Init[PRUIO_AZ_PWMSS + 1], //!< initial device configuration, used in the destructor PruIo:
^
In file included from 1.c:20:0:
../c_wrapper/pruio.h:396:15: error: 'PRUIO_AZ_BALL' undeclared here (not in a function)
uint8 Value[PRUIO_AZ_BALL + 1];//!< The values of the pad control registers.
Re: libpruio (BB D/A - I/O fast and easy)
Sorry, I can't edit my post above...
In Arch Linux you obviously have to cp libpruio.so /usr/lib and not to /usr/local/lib (http://users.freebasic-portal.de/tjf/Pr ... ation.html). I also did cp src/c_wrapper/pruio*.h* /usr/include.
That now gives me
Where do I get that from?
In Arch Linux you obviously have to cp libpruio.so /usr/lib and not to /usr/local/lib (http://users.freebasic-portal.de/tjf/Pr ... ation.html). I also did cp src/c_wrapper/pruio*.h* /usr/include.
That now gives me
Code: Select all
[alarm@BBG libpruio-0.2]$ sudo src/c_examples/1
src/c_examples/1: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
Re: libpruio (BB D/A - I/O fast and easy)
As long as you use the library AS-IS, you wont need FreeBASIC. If you want to change the library, ie. to fix the maximum sample rate bug, you'll have to install FreeBASIC.c136 wrote:Now... If I only want to use C/C++ code with your library, I won't have to install and setup the FreeBasic compiler?
Your run-time linker cannot find the binary -> installation problem.c136 wrote:I followed the install procedure in the online documentation. However, running e.g. the /src/c_examples/1 application for testing results in:Code: Select all
./1: error while loading shared libraries: libpruio.so: cannot open shared object file: No such file or directory
Did you install the binary in a system path? Did you update the linker cache?
Code: Select all
sudo ldconfig
Code: Select all
LD_LIBRARY_PATH=...
Re: libpruio (BB D/A - I/O fast and easy)
You should have seen another error message first, complaining on a missing header file named pruio.hp. This macro is defined in that file. Did you install it? How, and where?c136 wrote:When I try to recompile it (the 1.c) on the BeagleBone Green with Arch I getCode: Select all
In file included from 1.c:20:0: ../c_wrapper/pruio.h:197:7: error: 'PRUIO_AZ_GPIO' undeclared here (not in a function) *Init[PRUIO_AZ_GPIO + 1], //!< initial device configuration, used in the destructor PruIo:~ ^ ../c_wrapper/pruio.h:337:7: error: 'PRUIO_AZ_PWMSS' undeclared here (not in a function) *Init[PRUIO_AZ_PWMSS + 1], //!< initial device configuration, used in the destructor PruIo: ^ In file included from 1.c:20:0: ../c_wrapper/pruio.h:396:15: error: 'PRUIO_AZ_BALL' undeclared here (not in a function) uint8 Value[PRUIO_AZ_BALL + 1];//!< The values of the pad control registers.
Re: libpruio (BB D/A - I/O fast and easy)
Thanks for your reply.
As I have tried to post before, apparently it is found when in /usr/lib instead of /user/local/lib. However, I still haven't figured out libtinfo.so.5.
Yes, indeed.TJF wrote:Your run-time linker cannot find the binary -> installation problem.
As I have tried to post before, apparently it is found when in /usr/lib instead of /user/local/lib. However, I still haven't figured out libtinfo.so.5.
Yes, I did.Did you update the linker cache?
No other error message. I have it in /usr/include and actually also in a folder /usr/local/include as copied from src/c_wrapper/.You should have seen another error message first, complaining on a missing header file named pruio.hp
Re: libpruio (BB D/A - I/O fast and easy)
An Arch issue. Sorry, I can't help (anywhere you can add /usr/local/lib to the run-time linker path, which may help to avoid trouble with the package manager).c136 wrote: As I have tried to post before, apparently it is found when in /usr/lib instead of /user/local/lib. However, I still haven't figured out libtinfo.so.5.
Maybe it's better to do small steps. First try with an default Debian (3.8 kernel) image and then switch to Arch?
The file is in src/pruio. In src/wrapper, it's a link. Maybe the link didn't get handled by the unpacking tool? Check the files context. In case of doubts, install from src/pruio/pruio.hp.c136 wrote: No other error message. I have it in /usr/include and actually also in a folder /usr/local/include as copied from src/c_wrapper/.
Re: libpruio (BB D/A - I/O fast and easy)
I just g**gl*d "libtinfo arch". It seems to be in the libncurses-dev package.c136 wrote: However, I still haven't figured out libtinfo.so.5.
-
- Posts: 1
- Joined: Apr 17, 2016 17:47
Re: libpruio (BB D/A - I/O fast and easy)
Hi
I was able to make the SOS work with user LED3 and the button example. I am using the pre-compiled libpruio dtbo file. However, when I changed the Pins of the sos example, it does not work. Stepper also does not work. I attached 4 LEDs to P8_11,P8_12,P8_13, and _P8_14 with the anode on the pins and Cathode on gnd. I can confirm the LEDs are fine because if I connect them to P9_11,12 and 13, they're on. I also test stepper and sos on P9_11-14. The LEDs are initially on but when the sos or stepper programs are run, the are turned off. They are turned on again after I exit the programs. I ran a command like this echo x0F > /sys/devices/ocp.*/pruio-12.*/state for the involve pins before I ran the examples.
I was able to make the SOS work with user LED3 and the button example. I am using the pre-compiled libpruio dtbo file. However, when I changed the Pins of the sos example, it does not work. Stepper also does not work. I attached 4 LEDs to P8_11,P8_12,P8_13, and _P8_14 with the anode on the pins and Cathode on gnd. I can confirm the LEDs are fine because if I connect them to P9_11,12 and 13, they're on. I also test stepper and sos on P9_11-14. The LEDs are initially on but when the sos or stepper programs are run, the are turned off. They are turned on again after I exit the programs. I ran a command like this echo x0F > /sys/devices/ocp.*/pruio-12.*/state for the involve pins before I ran the examples.
Re: libpruio (BB D/A - I/O fast and easy)
Hello engkan2kit,
welcome at the forum and thanks for your report. Unfortunatelly it's a bit confusing and I need more information to understand what's going on:
welcome at the forum and thanks for your report. Unfortunatelly it's a bit confusing and I need more information to understand what's going on:
Fine. Which version of libpruio do you use? Which kernel version do you use? Please post the output of commandengkan2kit wrote:I was able to make the SOS work with user LED3 and the button example. I am using the pre-compiled libpruio dtbo file.
- uname -a
Where did you change the pin? (There's just one in the sos example!) Which pin did you choose? How did you compile and run the example? What did you expect that didn't happen?engkan2kit wrote:However, when I changed the Pins of the sos example, it does not work.
What kind of LEDs did you use? (BBB GPIO is designed for a maximum current of 6 mA, usual LEDs consume about 20 mA.) The example is designed to work on pins P8_08, P8_10, P8_12 and P8_14 (not P8_11, P8_13). Which command did you execute in order to run the pre-compiled examples binary?engkan2kit wrote:Stepper also does not work. I attached 4 LEDs to P8_11,P8_12,P8_13, and _P8_14 with the anode on the pins and Cathode on gnd. I can confirm the LEDs are fine because if I connect them to P9_11,12 and 13, they're on.
Which feedback do you get when loading the device tree overlay? Post the output ofengkan2kit wrote:I also test stepper and sos on P9_11-14. The LEDs are initially on but when the sos or stepper programs are run, the are turned off. They are turned on again after I exit the programs. I ran a command like this echo x0F > /sys/devices/ocp.*/pruio-12.*/state for the involve pins before I ran the examples.
- dmesg | grep bone
Re: libpruio (BB D/A - I/O fast and easy)
Ah yes of course, my bad.TJF wrote:The file is in src/pruio.
Thank you very much for your time and help!t seems to be in the libncurses-dev package.
A libncurses-dev package does not exist in/for Arch Linux. Unfortunately the ncurses5-compat-libs from the AUR is not ARMv7 compatible (at least that's what makepkg -sri tells me).
ncurses-6.0-4 is installed on my system, as shown by pacman.
So I tried to create a link manually by sudo ln -s /usr/lib/libtinfo.so /usr/lib/libtinfo.so.5 - that led to a Segmentation fault when trying to sudo ./1 in the .../src/c_examples
Re: libpruio (BB D/A - I/O fast and easy)
Actually I am obviously not quite awake and forgot to echo libpruio > slots.
However, sudo ./1 now leads to a.
However, sudo ./1 now leads to a
Code: Select all
Bus error
Re: libpruio (BB D/A - I/O fast and easy)
You'll never need sudo, since libpruio-0.2 doesn't support run-time pinmuxing on kernels > 3.8.c136 wrote:sudo ./1 now leads to a.Code: Select all
Bus error
Install the -dev version.c136 wrote:ncurses-6.0-4 is installed on my system, as shown by pacman.
Remove the link. Instead, compile against the newer ncurses6-dev binaries.c136 wrote:So I tried to create a link manually by sudo ln -s /usr/lib/libtinfo.so /usr/lib/libtinfo.so.5 - that led to a Segmentation fault when trying to sudo ./1 in the .../src/c_examples
Re: libpruio (BB D/A - I/O fast and easy)
(afaik ncurses can build with everything in one (ncurses) library, and one that splits out terminfo into a separate libtinfo for oses that didn't have an libterminfo of their own. I haven't followed this up recently, but in the past rule of thumb was RPM distributions typically have tinfo separately, deb ones have them integrated)