linux 运行 epics,EPICS入门与安装

4.1. Base

We begin be setting up the environment to build the Base package.

export EPICS_BASE="${HOME}/myepics/base" export EPICS_HOST_ARCH=`${EPICS_BASE}/startup/EpicsHostArch` export PATH="${PATH}:${EPICS_BASE}/bin/${EPICS_HOST_ARCH}" export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${EPICS_BASE}/lib/${EPICS_HOST_ARCH}"

Before starting the compile it is worth mentioning that there are several files which contain user options which effect the build process.CONFIG_SITE andRELEASE in $EPICS_BASE/configure. In particularCONFIG_SITE is where the cross-build targets would be specified.

Now simply switch to the base directory and issue the make command.

cd $EPICS_BASE make

More infomation on compiling EPICS Base can be found in base/documentation/README.htmlor online athttp://www.aps.anl.gov/epics/base/R3-14/12-docs/README.html.

4.2. ALH

ALH requires the presence of a Motif installation (OpenMotif or LessTif). Linux users check to see if your distribution provides one or more of these. Also install the development headers (-dev or -devel as appropriate). Others should consult available documentationhttp://www.motifzone.net/. Also see the ALH user guide [ALHman].

Now build the Alarm Handler.

export EPICS_EXTENSIONS="${HOME}/myepics/extensions" cd ${EPICS_EXTENSIONS}/src/alh1_2_26 make

Include the resulting executable in the system path.

export PATH="${PATH}:${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}" export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH}" alh

ALH will not actually do anything useful without a configuration file. This will be described later.

4.3. EDM

Building the EDM display manager can be complicated. It has many dependencies in addition to Motif including libgif, libpng, and many X11 libraries (X11, Xm, Xau, etc.). These are assumed to be present and the build system does not check that they are. If a compile or link fails look for messages indicating missing headers or libraries and install the appropriate package. More infomation of building EDM can be found in the EDM User Manual[EDMman].

cd ${EPICS_EXTENSIONS}/src/edm make

The GIF plugin needs to link against the ungif library which may not be available. In this case the solution is not to build the gif plugin. A plugin for png images is available.

sed -i -e 's|giflib||g' Makefile make

4.3.1. Generate Plugin Config Files

EDM depends on several configuration files. The two files which list the locations of various plugins must be generated.

The following is a simpleminded way to do this which takes advantage of the fact that EDM can recognize if a library is a valid plugin and which type it is. It will only add valid plugins to the list files.

cd ${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH} export EDMOBJECTS=$PWD export EDMPVOBJECTS=$PWD export EDM=${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}/edm for pv in Epics Calc Log Loc;do $EDM -addpv $PWD/lib$pv.so;done for ff in lib*.so;do ${EDM} -add $PWD/$ff; done sed -i -e "s|$PWD|"'$(EDMLIBS)|' edmObjects edmPvObjects rm edmObjects~ edmPvObjects~ unset EDMOBJECTS EDMPVOBJECTS EDM install -d ${EPICS_EXTENSIONS}/etc mv edmObjects edmPvObjects ${EPICS_EXTENSIONS}/etc/

The additional step of replacing the absolute paths with $(EDMLIBS) is taken to allow the built tree to be relocated without requiring modifications to these files.

4.3.2. Additional Environment

Several more environment variables are required to run EDM.

export EDMOBJECTS=$EPICS_EXTENSIONS/etc export EDMPVOBJECTS=$EPICS_EXTENSIONS/etc export EDMFILES=$EPICS_EXTENSIONS/src/edm/edmMain export EDMHELPFILES=$EPICS_EXTENSIONS/src/edm/helpFiles export EDMLIBS=$EPICS_EXTENSIONS/lib/$EPICS_HOST_ARCH

EDM can now be executed, but it can’t show anything interesting, yet.

edm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是在Linux安装EPICS的步骤: 1. 下载EPICS软件包: - 访问EPICS官方网站(https://epics.anl.gov/)并下载最新的EPICS Base软件包。 2. 解压EPICS软件包: - 打开终端,进入下载目录。 - 使用以下命令解压EPICS软件包: ```shell tar -xvf epics-base-x.x.x.tar.gz ``` 其中,x.x.x是EPICS Base软件包的版本号。 3. 设置环境变量: - 打开终端,进入EPICS Base目录。 - 使用以下命令设置EPICS环境变量: ```shell source ./setEpicsEnv.sh ``` 这将设置EPICS的环境变量,使其在终端中可用。 4. 编译EPICS Base: - 在EPICS Base目录中,使用以下命令编译EPICS Base: ```shell make ``` 这将编译EPICS Base并生成所需的库文件和可执行文件。 5. 创建IOC实例: - 在EPICS Base目录中,使用以下命令创建IOC实例: ```shell makeBaseApp.pl -t ioc myioc ``` 其中,myioc是IOC实例的名称,可以根据需要进行更改。 6. 进入IOC实例目录: - 使用以下命令进入IOC实例目录: ```shell cd myioc ``` 7. 编译IOC实例: - 在IOC实例目录中,使用以下命令编译IOC实例: ```shell make ``` 这将编译IOC实例并生成所需的库文件和可执行文件。 8. 运行IOC实例: - 在IOC实例目录中,使用以下命令运行IOC实例: ```shell ./st.cmd ``` 这将启动IOC实例并运行EPICS应用程序。 请注意,上述步骤仅适用于EPICS Base的安装和IOC实例的创建。如果需要安装其他EPICS模块或进行更高级的配置,请参考EPICS官方文档或相关教程。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值