Skip to content
Emanuele Leonardi edited this page Apr 15, 2019 · 7 revisions

The padme-adc package collects programs to use stand-alone ADC modules from CAEN using a RaspberryPi.

Installation procedure

  • Install Raspbian OS. After installation make sure to update the OS and install some extra packets needed for padme-adc
pi@padmerasp2:~ $ sudo apt-get update
pi@padmerasp2:~ $ sudo apt-get upgrade
pi@padmerasp2:~ $ sudo apt-get install emacs
pi@padmerasp2:~ $ sudo apt-get install raspberrypi-kernel-headers
  • Create a directory for CAEN software
pi@padmerasp2:~ $ mkdir CAEN
pi@padmerasp2:~ $ cd CAEN
  • Download Linux version of USB driver from CAEN site (file CAENUSBdrvB-1.5.2.tgz) then compile and install it
pi@padmerasp2:~/CAEN $ tar -xzvf CAENUSBdrvB-1.5.2.tgz
pi@padmerasp2:~/CAEN $ cd CAENUSBdrvB-1.5.2
pi@padmerasp2:~/CAEN/CAENUSBdrvB-1.5.2 $ make
pi@padmerasp2:~/CAEN/CAENUSBdrvB-1.5.2 $ sudo make install
pi@padmerasp2:~/CAEN/CAENUSBdrvB-1.5.2 $ cd ..
  • Obtain precompiled CAENDigitizer libraries for ARM (need to directly contact CAEN)
pi@padmerasp2:~/CAEN $ ls -l lib
totale 256
lrwxrwxrwx 1 pi pi     20 apr 11 13:58 libCAENComm.so -> libCAENComm.so.1.1.0
-rwxr-xr-x 1 pi pi  19168 mag 11  2016 libCAENComm.so.1.1.0
lrwxrwxrwx 1 pi pi     25 apr 11 13:58 libCAENDigitizer.so -> libCAENDigitizer.so.2.7.4
-rwxr-xr-x 1 pi pi 179316 mag 11  2016 libCAENDigitizer.so.2.7.4
lrwxrwxrwx 1 pi pi     18 apr 11 13:58 libCAENVME.so -> libCAENVME.so.2.50
-rwxr-xr-x 1 pi pi  58812 mag 11  2016 libCAENVME.so.2.50
  • Install header files for the CAENDigitizer libraries (download Linux version from CAEN and copy them)
pi@padmerasp2:~/CAEN $ ls -l include
totale 244
-rwxr-xr-x 1 pi pi 20790 nov 27  2017 CAENComm.h
-rwxr-xr-x 1 pi pi 76521 nov 27  2017 CAENDigitizer.h
-rwxr-xr-x 1 pi pi 55968 nov 27  2017 CAENDigitizerType.h
-rwxr-xr-x 1 pi pi 62594 nov 27  2017 CAENVMElib.h
-rwxr-xr-x 1 pi pi   800 nov 27  2017 CAENVMEoslib.h
-rwxr-xr-x 1 pi pi 17786 nov 27  2017 CAENVMEtypes.h
  • Use git to obtain latest version of the padme-adc package (you can use https if you are not planning to change the code)
pi@padmerasp2:~ $ git clone ssh://[email protected]/PADME-Experiment/padme-adc.git
Cloning into 'padme-adc'...
The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
Enter passphrase for key '/home/pi/.ssh/id_rsa':
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 33 (delta 3), reused 32 (delta 2), pack-reused 0
Ricezione degli oggetti: 100% (33/33), 35.92 KiB | 0 bytes/s, done.
Risoluzione dei delta: 100% (3/3), done.
  • Edit padme-adc-config.sh and point CAENDIR to top directory containing lib and include subdirectories.
pi@padmerasp2:~ $ cd padme-adc
pi@padmerasp2:~/padme-adc $ emacs padme-adc-config.sh
...
# This directory contains the lib and include directories needed
# to access to CAEN digitizer libraries
export CAENDIR="/home/pi/CAEN"
...
  • Configure the enviroment and compile PadmeADC.exe
pi@padmerasp2:~/padme-adc $ . padme-adc-config.sh
pi@padmerasp2:~/padme-adc $ cd PadmeADC
pi@padmerasp2:~/padme-adc/PadmeADC $ make
gcc -fPIC -DLINUX -O2 -g -Wall -Iinclude -I/home/pi/CAEN/include -c -o obj/DAQ.o src/DAQ.c
gcc -fPIC -DLINUX -O2 -g -Wall -Iinclude -I/home/pi/CAEN/include -c -o obj/ZSUP.o src/ZSUP.c
gcc -fPIC -DLINUX -O2 -g -Wall -Iinclude -I/home/pi/CAEN/include -c -o obj/Config.o src/Config.c
gcc -fPIC -DLINUX -O2 -g -Wall -Iinclude -I/home/pi/CAEN/include -c -o obj/FAKE.o src/FAKE.c
gcc -fPIC -DLINUX -O2 -g -Wall -Iinclude -I/home/pi/CAEN/include -c -o obj/PEvent.o src/PEvent.c
gcc -fPIC -DLINUX -O2 -g -Wall -Iinclude -I/home/pi/CAEN/include -c -o obj/Signal.o src/Signal.c
gcc -fPIC -DLINUX -O2 -g -Wall -Iinclude -I/home/pi/CAEN/include -c -o obj/PadmeADC.o src/PadmeADC.c
gcc -fPIC -DLINUX -O2 -g -Wall -Iinclude -I/home/pi/CAEN/include -c -o obj/Tools.o src/Tools.c
gcc  -o PadmeADC.exe obj/DAQ.o obj/ZSUP.o obj/Config.o obj/FAKE.o obj/PEvent.o obj/Signal.o obj/PadmeADC.o obj/Tools.o -L/home/pi/CAEN/lib -lCAENDigitizer -lm
Clone this wiki locally