LogicBox SDK

From LogicBox
Revision as of 12:56, 23 May 2014 by Rubio (talk | contribs) (Created page with "The LogicBox SDK contains C++ code to work with the LogicBox. This SDK can be compiled under Linux and Windows and the examples should run under both systems too. All the code...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The LogicBox SDK contains C++ code to work with the LogicBox. This SDK can be compiled under Linux and Windows and the examples should run under both systems too. All the code can be obtained from our repository.

 http://hwstar.physi.uni-heidelberg.de/svn/LB_C++/trunk/

The repository folder contains the following sub-folders:

 bin: executables files for Linux
 eclipse: project configuration files for eclipse
 exe: executables files for Linux
 libraries: temporal folder to save all objects files from compilation process  
 lin: source code with the Linux specific files
 projects: each project is saved here. Until now there is following projects
   DAQ: data acquisition system for Dirk Wiedner (no LogicPool supported)
   DLL: dll file to connect with LabVIEW
   FX2LP: test of an old linux class, do not use it.(no LogicPool supported)
   LogicPool: contain all modules used by the LogicPool.
   SU728: test for the SU728 (no LogicPool supported).
   SU730_741: test for the SU730 and SU741 (DAC submodule).
   SU738:  test for the SU738 (no LogicPool supported).
   TDC: time to digital converter for Dirk Wiedner (no LogicPool supported)


Linux

The LogicBox is now running under Linux. All test are done with ubuntu but should work with others Linux distributions. The open source library "libusb " is used in order to control the LogicBox. To install the library and give access to the LogicBox to all user follow this installations instructions:

Install the libusb library

 sudo apt-get install libusb-dev libusb-1.0-0-dev libusb-1.0-0

Install the C++ compiler

sudo apt-get install g++

Install the LogicBox source code

 sudo apt-get install subversion
 svn checkout http://hwstar.physi.uni-heidelberg.de/svn/LB_C++/trunk/

Make the LogicBox accessible to all users

 echo SUBSYSTEMS=='"'usb'"', ATTRS{idVendor}=='"'16dc'"', ATTRS{idProduct}=='"'0013'"', GROUP='"'plugdev'"', MODE='"'0660'"' > 20-LogicBox.rules
 echo SUBSYSTEMS=='"'usb'"', ATTRS{idVendor}=='"'0403'"', ATTRS{idProduct}=='"'6001'"', GROUP='"'plugdev'"', MODE='"'0660'"' >> 20-LogicBox.rules
 echo SUBSYSTEMS=='"'usb'"', ATTRS{idVendor}=='"'0403'"', ATTRS{idProduct}=='"'b990'"', GROUP='"'plugdev'"', MODE='"'0660'"' >> 20-LogicBox.rules
 sudo mv 20-LogicBox.rules /etc/udev/rules.d/

Check the libusb installation library

Check the LogicBox. It should show one USB device with ID 0013:16dc

 lsusb


Compiling the projects using a makefile

Compile one example and run it. The example test_LB_C++ shows how many LogicBoxes are connected in the system, try to open the first one and read the FPGA firmware compilation date.

make test_LB_C++
bin/test_LB_C++


Modify the Makefile if necessary


Compiling the projects using Eclipse

download the lastest version of Eclipse IDE for C/C++ Developers

 Linux 64-Bits
 http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR2/eclipse-cpp-kepler-SR2-linux-gtk-x86_64.tar.gz
 Linux 32-Bits
 http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR2/eclipse-cpp-kepler-SR2-linux-gtk.tar.gz


switch the workspace to the code folder "Linux/eclipse". The test_LB_C++ project should be load. Check that under "Test_apps" only one file is include to be build. And run the application

Check if JAVA runtime engine is installed

 java -version
 sudo apt-get install default-jre