LogicBox SDK

From LogicBox
Jump to: navigation, search

SDK

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)
 Test_apps: test applications for all projects.
   test_ADC16: test of the ADC16 module of the LogicPool
   test_DACR: test of the DACR module of the LogicPool
   test_LB_C++: test of the open and close function for LogicPool and no LogicPool projects.
   main_ADC: test for the projectc DAQ (no LogicPool)
   main_TDC: test for the projectc TDC (no LogicPool)
 VisualStudio: this folder contains all configurations files for VisualStudio 2008
 win: source code with windows specific files


There are two possibilities in order to compile the software under Windows and Linux

Linux

to compile the fostware without errors please install first the driver!

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++


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


import the project from "./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

Windows

Compiling the projects using a makefile

the used compiler is MinGW, download it from

 http://www.mingw.org/

MinGW.png


In the installation check following packages:

 All packages->MinGW Base System-> mingw32-binutils (bin)
 All packages->MinGW Base System-> mingw32-binutils (dev)
 All packages->MinGW Base System-> mingw32-gcc (bin)
 All packages->MinGW Base System-> mingw32-gcc (dev)
 All packages->MinGW Base System-> mingw32-gcc-g++ (bin)
 All packages->MinGW Base System-> mingw32-gcc-g++ (dev)

Under installation directory use C:\MinGW otherwise you have to change the makefile. The code can be compiled with the same Linux Makefile after the installation. The only difference is that you have to use the parameter -d OS=windows

 make -d OS=windows test_LB_C++
 the exe files are saved under ".\exe\test_LB_C++.exe"