Test and Measurement Forum

Drivers for BeagleBoneBlack and Raspberry Pi

Discussion forum for the new Picoscope Linux software

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Postby Hitesh » Tue Apr 11, 2017 10:45 am

Hi benamis,

You can obtain the files from https://github.com/picotech/picosdk-c-examples/tree/master/pl1000.

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2514
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Postby alsamaraee » Thu Apr 13, 2017 10:25 am

Hitesh wrote:Hi alsamaree,

There is an incorrect reference to the PicoStatus.h file which this driver does not use.

I've updated the zip file in the post above so please download this and the source code file should have the fix.

Edit: The files are now available from GitHub:

https://github.com/picotech/picosdk-c-examples/tree/master/usbtc08

Please use the usbtc08con.c file from the usbtc08Con sub-folder.

Regards,

Hi Hitesh,
Did you update the files in the link ?
I cann't find the same files that worked for me last time.
I using raspberry pi.
Regards
alsamaraee
Newbie
 
Posts: 0
Joined: Mon Mar 20, 2017 12:21 pm

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Postby Martyn » Tue Apr 18, 2017 9:30 am

Can you check with the files from the Repository

and if you are still having problems let us know exactly what the errors are.
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 2812
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Postby tobiwan » Sun Jun 04, 2017 10:39 am

Hello,

I do have quite some problems getting the example C codes to run. I already installed the ps2000a drivers and used the usbtest, which works. I then downloaded the relevant picosdk-c-example. The autogen.sh , however, seems to be broken for the provided example. For me it first crashes because it can't find "../install-sh". After i created a link, it then crashes because it can't find "../ltmain.sh". After moving ltmain.sh to said directory I get the following log/error:

Code: Select all
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
configure.ac:31: installing '../compile'
configure.ac:31: installing '../config.guess'
configure.ac:31: installing '../config.sub'
configure.ac:10: installing '../missing'
Makefile.am: installing '../depcomp'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... configure: error: ls -t appears to fail.  Make sure there is not a broken
  alias in your environment
configure: error: newly created file is older than distributed files!
Check your system clock


Is this actually a problem with the autogen.sh or am I doing something wrong?
Could someone else try to prepare these build files?

Tobi
tobiwan
Newbie
 
Posts: 0
Joined: Sun Jun 04, 2017 9:13 am

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Postby Hitesh » Mon Jun 05, 2017 11:10 am

Hi Tobi,

I've tested the build files on Ubuntu 14.04 LTS and the build process works without issues (I had to make the autogen.sh file executable first).

Have you installed the autoconf and libtool packages?

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2514
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Postby alsamaraee » Thu Dec 07, 2017 12:28 pm

Hi,

Trying to compile a modified version of the usbtc08con.c example. Using command line. eg
Code: Select all
gcc -std=c99 -std=c11 -Wall -g -DONE=1 -I/opt/picoscope/include/ usbtc08con-test.c -L/opt/picoscope/lib/ -lusbtc08 -o test


Got this fault

Code: Select all
usbtc08con-test.c: In function ‘main’:
usbtc08con-test.c:181:3: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
   Sleep(200);
   ^
usbtc08con-test.c:272:7: warning: format ‘%lu’ expects argument of type ‘long unsigned int *’, but argument 2 has type ‘uint32_t *’ [-Wformat=]
       scanf_s("%lu", &numberOfReadings);
       ^


Do I missing an external lib ??

Regards
alsamaraee
Newbie
 
Posts: 0
Joined: Mon Mar 20, 2017 12:21 pm

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Postby Hitesh » Thu Dec 07, 2017 1:41 pm

Hi alsamaree,

Are there any error messages after those two warning messages?

Have you tried building our example source code file using the files from the linux-build-files folder?

You should be able to use the commands ./autogen.sh and make to build the application if you copy the usbtc08con.c file into the folder.

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2514
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Postby alsamaraee » Thu Dec 07, 2017 1:57 pm

Hitesh wrote:Hi alsamaree,

Are there any error messages after those two warning messages?

Have you tried building our example source code file using the files from the linux-build-files folder?

You should be able to use the commands ./autogen.sh and make to build the application if you copy the usbtc08con.c file into the folder.

Regards,

Hi Hitesh,

Thank you for your replay.
I have done building your example using
Code: Select all
./autogen.sh
and
Code: Select all
make
.
But I need to go this way to build the program/code bacause I need to add another external lib(bcm2835).

Any help?
alsamaraee
Newbie
 
Posts: 0
Joined: Mon Mar 20, 2017 12:21 pm

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Postby Hitesh » Mon Dec 11, 2017 3:56 pm

Hi alsamaraee,

Looking at the errors, please change:

Code: Select all
scanf_s("%lu", &numberOfReadings);

to
Code: Select all
scanf_s("%u", &numberOfReadings);

For the warning related to the Sleep function, you may wish to check our linux-build-files folder to see how we configure and compile the code. The alternative is to delete the #define line and use usleep() instead of Sleep().

Hope this helps,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2514
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Previous

Return to PicoScope for Linux

Who is online

Users browsing this forum: No registered users and 0 guests