==== Installation Guide ====
== 1. Install Software Requirements ==
* GNU make
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
* Perl
sudo apt-get install perl
* Unzip and tar
sudo apt-get install unzip
sudo apt-get install tar
* vxWorks or RTEMS
* GNU readline or Tecla library
apt-cache search readline (to check for latest versions of GNU readline)
sudo apt-get install libreadline7
sudo apt-get install libreadline-dev
maybe also this is needed: (sudo apt-get install lib64readline7; sudo apt-get install lib64readline-dev)
== 2. Download EPICS base ==
* [[https://epics.anl.gov/download/base/index.php|EPICS base download]] (version: baseR3.14.12.5.tar.gz)
* unzip it
== 3. In folder base/documentation you can find the README files for further instruction ==
* If you don’t want to change any default parameter, go to:
cd base-3.XX.X/startup
./EpicsHostArch
export EPICS_HOST_ARCH=linux-x86_64
this sets an environment variable EPICS_HOST_ARCH
* For building go to base-3.XX.X (you may need sudo)
cd ..
make clean uninstall
make
* if you use GCC 6 change in /base/src/libCom/test/epicsExceptionTest.cpp:
static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max () to:
static size_t unsuccessfulNewSize = numeric_limits < size_t > :: max ()
== 4. In folder base/documentation you can find the README files for further instruction ==
* in folder base-3.XX.X/
mkdir exampleApp
cd exampleApp
export EPICS_HOST_ARCH=linux-x86_64
/bin//makeBaseApp.pl -t example myexample
/bin//makeBaseApp.pl -i -t example myexample
* in file configure/RELEASE – Set SNCSEQ to the location of the sequencer (therefor the sequencer needs to be installed, see 4*)
* in file exampleapp/iocBoot/iocmyexample/st.cmd – Remove the comment character # from this line:
#seq sncExample, "user="
== 4*. Installing sequencer ==
* build prequisite: re2c
sudo apt install re2c
* downloads can be found on: http://www-csr.bessy.de/control/SoftDist/sequencer/releases/
* instructions for installation can be found in /seq-2.2.X/documentation/Installation.txt
== 5. Installing libreadline6 ==
* get the deb file
* install libreadline 6
* A temporary but related link[[https://linuxprograms.wordpress.com/2010/10/19/install-readline-linux/]]
== 6. Add EPICS base to your bashrc ==
* the bashrc is executed each time you open your terminal (for example some paths are set)
* if you want to execute an EPICS IOC the path to EPICS-base and to EPICS-host-arch needs to be known, therefore open your bashrc:
~$ geany .bashrc
* and add the following lines (make sure to adapt the right path)
# EPICS
export EPICS_BASE=/home/sahra/EPICS/epics-base
export EPICS_HOST_ARCH=$(${EPICS_BASE}/startup/EpicsHostArch)
export PATH=${EPICS_BASE}/bin/${EPICS_HOST_ARCH}:${PATH}
== 7. Create a demo/test ioc to test ca and pva ==
stolen from here: [[https://epics-controls.org/resources-and-support/documents/getting-started/]]
mkdir -p $HOME/EPICS/TEST/testIoc
cd $HOME/EPICS/TEST/testIoc
makeBaseApp.pl -t example testIoc
makeBaseApp.pl -i -t example testIoc
make
cd iocBoot/ioctestIoc
chmod u+x st.cmd
ioctestIoc> ./st.cmd
#!../../bin/darwin-x86/testIoc
< envPaths
epicsEnvSet("IOC","ioctestIoc")
epicsEnvSet("TOP","/Users/maradona/EPICS/TEST/testIoc")
epicsEnvSet("EPICS_BASE","/Users/maradona/EPICS/epics-base")
cd "/Users/maradona/EPICS/TEST/testIoc"
## Register all support components
dbLoadDatabase "dbd/testIoc.dbd"
testIoc_registerRecordDeviceDriver pdbbase
## Load record instances dbLoadTemplate "db/user.substitutions"
dbLoadRecords "db/testIocVersion.db", "user=junkes"
dbLoadRecords "db/dbSubExample.db", "user=junkes"
#var mySubDebug 1
#traceIocInit
cd "/Users/maradona/EPICS/TEST/testIoc/iocBoot/ioctestIoc"
iocInit
Starting iocInit
############################################################################
## EPICS R7.0.1.2-DEV
## EPICS Base built Mar 8 2018
############################################################################
cas warning: Configured TCP port was unavailable.
cas warning: Using dynamically assigned TCP port 52907,
cas warning: but now two or more servers share the same UDP port.
cas warning: Depending on your IP kernel this server may not be
cas warning: reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)
iocRun: All initialization complete
2018-03-09T13:07:02.475 Using dynamically assigned TCP port 52908.
## Start any sequence programs
#seq sncExample, "user=maradona" epics> dbl
maradona:circle:tick
maradona:compressExample
maradona:line:b
maradona:aiExample
maradona:aiExample1
maradona:ai1
maradona:aiExample2
... etc. ...
epics>
dbl shows all the PVs
== 8. Include Stream ==
* Therfore add the following in examplieIOCAPP/src/Makefile and change esampleIOC_LIBS to your current ioc_lib:
#add asyn and streamDevice to this IOC production libs
exampleIOC_LIBS += stream
exampleIOC_LIBS += asyn
* in examplieIOCAPP/src/xxxSupport.dbd add
#
include "stream.dbd"
include "asyn.dbd"
registrar(drvAsynIPPortRegisterCommands)
registrar(drvAsynSerialPortRegisterCommands)
registrar(vxi11RegisterCommands)
* in configure/RELEASE add:
# Build variables that are NOT used in paths should be set in
# the CONFIG_SITE file.
# Variables and paths to dependent modules:
SUPPORT = ${HOME}/EPICS/support
ASYN=$(SUPPORT)/asyn
STREAM=$(SUPPORT)/stream
# If using the sequencer, point SNCSEQ at its top directory:
#SNCSEQ = $(MODULES)/seq-ver
== 9. Some useful links ==
EPICS in PANDA:
* [[https://panda-wiki.gsi.de/foswiki/bin/view/DCS/WebHome]]
* [[http://panda-service.gsi.de/repo/#Usage]]
* [[http://panda-service.gsi.de/debian/?C=N;O=A]]
EPICS slildes/training:
* [[https://epics-controls.org/resources-and-support/documents/getting-started/]]
* [[https://epics.anl.gov/docs/APS2015.php]]
* [[https://epics.anl.gov/docs/training.php]]