Using 3204 with GCC compiler

Post any questions you may have about our current range of oscilloscopes
Post Reply

Using 3204 with GCC compiler

Post by Dermot » Wed Apr 07, 2010 6:27 pm

Does anyone use the 3204 with the gcc compiler. I have tried to run a test program to open the usb port, flash the LED and close the port. This is just to prove connectivity.
Can anyone give me the initial command line for gcc and do I have to link libraries etc. All files are in the same folder and output exe file is directed there.

See attached code

short handle;

int main(void) {
short handle;

handle = ps3000_open_unit();
printf("opened ");
//handle = ps3000_open_unit(void);
printf("Handle = $%sd", handle);
Sleep(2000); /* keep cmd window open for 2 seconds*/

Posts: 53
Joined: Mon Oct 23, 2006 8:16 am
Location: Cambridgeshire, UK

Re: Using 3204 with GCC compiler

Post by Erik » Mon Apr 12, 2010 8:32 am

To compile the example program the line is:

Code: Select all

gcc -lps3000 PS3000con.c -oPS3000con
-lps3000 includes the driver library
PS3000con.c should be changed to the name of your c-file
-oPS3000con specifies the name of the final binary

Have a look in the documentation for the linux SDK.
More specifically, the README and INSTALL files.

Post Reply