Build instructions for the Xspress3 3.2 driver

First, to build a complete Epics environment for the Xspress3, see
INSTALL_Standalone.md and the build_xspress3.py script.

The following instructions assume that you know that you do not want
to build a standalone environment but include Xspress3 support in an
existing Epics development environment. 

Required Packages
======================

Xspress3 version 3.2 builds with areaDetector 3.7 or higher on Centos7
(or later).  It needs the following Epics modules (and 'known to work'
versions):

   base      3.15 to 7.0.4 should work 
   asyn      4-38
   seq       2.2.6
   ipac      2.15
   alive     R1-1-1
   std       R3-6
   autosave  R5-10
   iocStats  3.1.16
   busy      R1-7-2
   sscan     R2-11-3
   calc      R3-7-3
   areaDetector  3-7 or later, with ADCore and ADSupport.


In addition to a complete gcc development suite, which can be installed with

  sudo yum install @Development Tools

the following packages may need to be installed:
  
   re2c  
   boost, boost-devel
   readline, readline-devel
   hdf5, hdf5-devel
   libtiff, libtiff-devel
   libjpeg, libjpeg-turbo-devel
   libxml2, libxml2-devel
   bzip2-devel, bzip2-libs
   GraphicsMagick, GraphicsMagick-devel
   motif, motif-devel (for medm)

which can be installed with 
   
  sudo yum install re2c ...

On some modern linux machines, you may also need to install

   rpcgen libtirpc-devel

if /usr/include/rpc/rpc.h is not already installed.


Unpack the source kit
=========================
The source kit for this folder should be in folder called or
symbolically linked to `xspress3` that is in the same folder as
areaDetector and the other epics modules, perhaps as:

   /home/xpsress3/epics/
   /home/xpsress3/epics/areaDetector
   /home/xpsress3/epics/std
   /home/xpsress3/epics/busy
   /home/xpsress3/epics/....
   /home/xpsress3/epics/xspress3

Build
=================

You will need to set environment variables

   export EPICS_CA_AUTO_ADDR_LIST=NO
   export EPICS_HOST_ARCH=linux-x86_64
   export EPICS_CA_MAX_ARRAY_BYTES=20000000
   export EPICS_CA_ADDR_LIST=<your broadcast address>
   export EPICS_BASE=<location of epics base>
   export EPICS_EXTENSIONS=<location of epics extensions>

and then run make both in the top-level and in the IOC directory

   make -j8 install && cd iocs && make -j8 install && cd ..

Configure IOC
===============

You can then run select one of the available IOCS in
   iocs/xspress3IOC/iocboot

and modify the startup script, and the run the xspress3 app:

   cd iocs/xspress3IOC/iocBoot/ioc_4Channel
   ../../bin/linux-x86_64/xspress3App  st.cmd




