1# @Time    : 2019-11-29
2# @Language: Markdown
3# @Software: VS Code
4# @Author  : Di Wang
5# @Email   : [email protected]

EPICS Base Installation Instruction

Check this site for the detail. README

This MEMO will introduce how to build EPICS Base 3.14.12.5 on linux and run IOC on vxWorks, VME5500 .

If you have any problem of the basic structure of EPICS (e.g. confused about the Host ARCH and Target ARCH), please refer to the EPICS Application Developer’s Guide. (Though it may take several days to read :)

Noted: the introduction of Wind River software installation will not be included.

EPICS Base Release 3.14.12.5

Download EPICS Base file from the ANL site here https://epics.anl.gov/base/R3-14/12.php

1mkdir base
2cd base
3tar xzf /yourdirectory/baseR3.14.12.5.tar.gz
4cd base-3.14.12.5/

Software requirements

  • make (version 3.81 or later)
  • Perl (version 5.8.1 or later)
  • vxWorks (You must have vxWorks installed if any of your target systems are vxWorks systems.)
  • gcc (version larger than 6.1 might have some problems. A discussion: EPICS tech talk: Compiling EPICS 3.14.12.5 with GCC 6)

Set environment variables

  • EPICS_BASE
1setenv EPICS_BASE `env PERL5LIB=src/tools perl src/tools/fullPathName.pl .`
2echo $EPICS_BASE
  • EPICS_HOST_ARCH
1setenv EPICS_HOST_ARCH `startup/EpicsHostArch`
2echo $EPICS_HOST_ARCH
  • readline If readline is not installed on your linux:
1vi /configure/os/CONFIG_SITE.Common.linux-x86_64
2# comment the following line
3# COMMANDLINE_LIBRARY = READLINE
  • Set vxWorks environment varibles
1eval `/cont/VxWorks/vw68/wrenv.sh -p vxworks-6.8 -o print_env -f csh`

Note: wrenv.sh might change the reference of make command, be careful to make sure the make version is larger than 3.81

Do site-specific build configuration

Since there is no “vxWorks-ppc604” target architecture in base 3.14.12.5, we need to create it on our own.

1cp -p configure/os/CONFIG_SITE.linux-x86_64.vxWorks-ppc60{3,4}
2cp -p configure/os/CONFIG_SITE.linux-x86_64.vxWorks-ppc60{3,4}_long

Then modify the CONFIG_SITE file, set the target architecture.

1vi configure/CONFIG_SITE

set CROSS_COMPILER_TARGET_ARCHS=vxWorks-ppc604_long

Set vxWorks

1vi configure/os/CONFIG_SITE.Common.vxWorksCommon

Set these values

1...
2VXWORKS_VERSION = 6.8
3# WIND_BASE is where you installed the Wind River software. In our case is:
4WIND_BASE = /cont/VxWorks/vw683
5...
6WORKBENCH_VERSION = 3.2
7UTILITIES_VERSION = 1.0

Build EPICS base

It is recommended that using a log file to track your make process to help you find the error or warning.

In my case:

1mkdir log
2make | & tee log/base-3.14.12.5-make-linux64.txt

check the warnings and run tests

1grep -i warning log/base-3.14.12.5-make-linux64.txt | wc
2make runtests | & tee /log/base-3.14.12.5-test-linux64.txt

Create IOC

Next we can create an IOC and run on vxWorks

1cd ../base-3.14.12.5/..
2mkdir -p test/vx
3cd test/vx/
4$EPICS_BASE/bin/$EPICS_HOST_ARCH/makeBaseApp.pl -t example myapp
5$EPICS_BASE/bin/$EPICS_HOST_ARCH/makeBaseApp.pl -i -t example -p myapp myapp
1# here you should input vxworks as your host_arch according to the prompt information. In my case:
2The following target architectures are available in base:
3    linux-x86_64
4    vxWorks-ppc604_long
5What architecture do you want to use? 
1mkdir log
2make | & tee log/base-3.14.12.5-app-linux64.txt

check the EPICS environment variables in this file: less iocBoot/iocmyapp/cdCommands

Then telnet to your vxWroks, and go to this IOC’s iocBoot/iocmyapp/ directory, then load this IOC by < st.cmd Using dbl to check whether IOC runs successfully or not.