Project

General

Profile

epicsnotes.txt

installation instructions - David Slimmer, 11/05/2019 06:19 AM

 
1
05oct2019  DS
2

    
3
Used EPICS Base installation instructions from here:
4
https://prjemian.github.io/epicspi/
5

    
6
except downloaded this newer version (version in instructions above had compilation error)
7
wget http://www.aps.anl.gov/epics/download/base/base-3.15.6.tar.gz
8

    
9
add epics enivronment vars to .bashrc
10
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
11
 # EPICs environment variables
12
export EPICS_HOST_ARCH=`/usr/local/epics/base/startup/EpicsHostArch`
13
export EPICS_ROOT=/usr/local/epics
14
export EPICS_BASE=${EPICS_ROOT}/base
15
export EPICS_HOST_ARCH=`${EPICS_BASE}/startup/EpicsHostArch`
16
export EPICS_BASE_BIN=${EPICS_BASE}/bin/${EPICS_HOST_ARCH}
17
export EPICS_BASE_LIB=${EPICS_BASE}/lib/${EPICS_HOST_ARCH}
18
if [ "" = "${LD_LIBRARY_PATH}" ]; then
19
    export LD_LIBRARY_PATH=${EPICS_BASE_LIB}
20
else
21
    export LD_LIBRARY_PATH=${EPICS_BASE_LIB}:${LD_LIBRARY_PATH}
22
fi
23
export PATH=${PATH}:${EPICS_BASE_BIN}
24
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25

    
26
edit configure/CONFIG_SITE
27
 CROSS_COMPILER_HOST_ARCHS=linux-arm
28
 # EPICs environment variables
29
 
30
make
31
 
32
create link for subsequent installation builds
33
ln-s ./base-3.15.6 ./base
34

    
35

    
36

    
37
Install synApps
38
install dependency with Raspian Add/Remove Software:
39
 screen-4.5.0-6    (for in-screen.sh)
40
install dependency
41
sudo apt-get install re2c --fix-missing
42

    
43
download from here:
44
cd /home/pi/Apps
45
https://www.aps.anl.gov/BCDA/synApps/Where-to-find-it
46
tar xzf synApps_6_1.tar.gz
47

    
48
define SUPPORT in ~/Apps/epics/synApps_6_1/support/configure/RELEASE
49
SUPPORT=/usr/local/epics/synApps_6_1/support
50
 comment out everything but ASYN (plus dependencies IPAC,SSCAN,SNCSEQ) and CALC
51
 or copy adipi1 RELEASE file
52

    
53
ln -s synApps_6_1 synApps
54

    
55
make release
56

    
57
the following 2 should be set by "make release"
58
edit synAPPS/support/seq-2-2-6/configure/RELEASE
59
 EPICS_BASE=/usr/local/epics/base
60

    
61
edit synAPPS/support/ipac-2-15/configure/RELEASE
62
 EPICS_BASE=/usr/local/epics/base
63

    
64
make
65

    
66

    
67

    
68
Build epics_ioc_raspi_sensors-master
69
download from here:
70
https://github.com/prjemian/epics_ioc_raspi_sensors
71
unzip epics_ioc_raspi_sensors-master.zip
72

    
73
set /home/pi/Apps/epics_ioc_raspi_sensors-master/configure/CONFIG_SITE
74
 CROSS_COMPILER_TARGET_ARCHS = linux-arm
75

    
76
modify source files 
77
cd /home/pi/Apps/epics_ioc_raspi_sensors-master
78
edit cron_start_ioc
79
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
80
bash[7]pi@raspberrypi:epics_ioc_raspi_sensors-master-> diff cron_start_ioc /home/pi/Apps/epics/epics_ioc_raspi_sensors-master/cron_start_ioc 
81
10c10,11
82
< export TOPDIR=`dirname "$0"`
83
---
84
> #export TOPDIR=`dirname "$0"`  DS 12aug2019
85
> export TOPDIR=`pwd`
86
12c13,14
87
< export SCRIPT=${IOCDIR}/raspi.sh
88
---
89
> #export SCRIPT=${IOCDIR}/raspi.sh  DS 12aug2019
90
> export SCRIPT=raspi.sh
91
16c18
92
< export STATUS=`${SCRIPT} status | grep not`
93
---
94
> export STATUS=`./${SCRIPT} status | grep not`
95
18a21
96
> export IOC_STARTUP_DIR=${IOCDIR}
97
21,23c24,26
98
<     cd ${IOCDIR}
99
<     echo "`date`: start command = ${SCRIPT} start"
100
<     echo "`date`: `${SCRIPT} start`"
101
---
102
>     #cd ${IOCDIR}  DS 12aug2019
103
>     echo "`date`: start command = ./${SCRIPT} start"
104
>     echo "`date`: `./${SCRIPT} start`"
105
25c28
106
<     echo "`date`: status = `${SCRIPT} status`"
107
---
108
>     echo "`date`: status = `./${SCRIPT} status`"
109
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110

    
111
cd ./iocBoot/iocLinux
112
edit raspi.sh		(see adipi1 installation for details)
113
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
114
bash[9]pi@raspberrypi:iocLinux-> diff raspi.sh /home/pi/Apps/epics/epics_ioc_raspi_sensors-master/iocBoot/iocLinux/raspi.sh
115
62,63c62,64
116
<         cd ${IOC_STARTUP_DIR}
117
< 	./in-screen.sh
118
---
119
>         #cd ${IOC_STARTUP_DIR}  DS 12aug2019
120
> 	#./in-screen.sh
121
> 	${IOC_STARTUP_DIR}/in-screen.sh
122
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123

    
124
cd ./iocBoot/iocLinux
125
edit Makefile
126
 ARCH = linux-arm
127
 as last line add:  install: ${TARGETS}
128
 
129
cd /home/pi/Apps/epics/epics_ioc_raspi_sensors-master/raspiApp/src
130
copy modified dht22.c
131
 
132
make
133

    
134

    
135

    
136
 
137
VDCT install
138
get code from github link at https://epics.anl.gov/extensions/vdct/index.php
139

    
140
install dependency with Raspian Add/Remove Software
141
 default-jdk-2:1.8-58+deb9u1 
142

    
143
cd ~/Apps
144
unzip vdct_3-0-b.zip
145
 
146
use command
147
java -jar VisualDCT.jar
148

    
149

    
150

    
151
Test installations above with AM2032 temperature and humidity sensor
152
connections:
153
+  to 3.3V
154
out to GPIO17
155
-  to Ground
156

    
157
cd /home/pi/Apps/epics/epics_ioc_raspi_sensors-master/iocBoot/iocLinux
158
../../bin/${EPICS_HOST_ARCH}/raspi st.cmd
159

    
160
(should see scrolling readout of humidity and temperature)