303 lines
12 KiB
HTML
303 lines
12 KiB
HTML
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta name="Author" content="jba">
|
|
<meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; SunOS 5.8 sun4u) [Netscape]">
|
|
</head>
|
|
<body>
|
|
|
|
<center>
|
|
<h2>
|
|
Converting an EPICS R3.13 application to R3.14.0alpha3</h2></center>
|
|
|
|
<p><br>This document describes how to convert a R3.13 vxWorks application
|
|
so that it builds with release R3.14.0alpha3. It describes procedures
|
|
such that:
|
|
<ul>
|
|
<li>
|
|
The application uses the configure rules which are new to R3.14.</li>
|
|
</ul>
|
|
|
|
<ul>
|
|
<li>
|
|
The OSI (Operating System Independent) features of R3.14 are available,
|
|
i.e. iocCore products can be build for vxWorks as well as other platforms,
|
|
e.g. solaris and linux.</li>
|
|
</ul>
|
|
|
|
<h3>
|
|
Gnumake clean uninstall</h3>
|
|
|
|
<blockquote>First do a gnumake clean uninstall in the application's root
|
|
directory to remove all files created by earlier builds.</blockquote>
|
|
|
|
<h3>
|
|
Create a new R3.14 application</h3>
|
|
|
|
<blockquote><tt>mkdir <top></tt>
|
|
<br><tt>cd <top></tt>
|
|
<br><tt><full path to R3.14.0alpha3 base>/bin/<host_arch>/makeBaseApp.pl
|
|
-t example example</tt></blockquote>
|
|
|
|
<h3>
|
|
Copy all *App and iocBoot directories and files to the new <top> directory</h3>
|
|
|
|
<blockquote><tt>cd <oldtop></tt>
|
|
<br><tt>find *App iocBoot -print | cpio -pvmd <fullpath name to new
|
|
top></tt></blockquote>
|
|
|
|
<h3>
|
|
Modify <top>/configure/RELEASE</h3>
|
|
|
|
<blockquote>Copy definitions of external modules excluding EPICS_BASE and
|
|
TEMPLATES_TOP from old application RELEASE file.
|
|
<br>If sequence programs (*.st or *.stt files) exist in your application,
|
|
add the SNCSEQ location definition for the R3.14 seq external module
|
|
<blockquote><tt>SNCSEQ =<full path to seq module top></tt></blockquote>
|
|
The R3.14 seq module must exist and be built with EPICS base R3.14.0alpha3.</blockquote>
|
|
|
|
<h3>
|
|
Modify the Makefiles in <top>/*App directories.</h3>
|
|
|
|
<blockquote>Change <tt>include $(TOP)/config/CONFIG_APP</tt>
|
|
<br>to <tt>include $(TOP)/configure/CONFIG</tt>
|
|
<p>Change i<tt>nclude $(TOP)/config/RULES_DIRS</tt>
|
|
<br>to <tt>include $(TOP)/configure/RULES_DIRS</tt></blockquote>
|
|
|
|
<h3>
|
|
Modify the Makefiles in <top>/*App/*Db directories.</h3>
|
|
|
|
<blockquote>Remove existing Makefile
|
|
<br>Rename Makefile.Host to Makefile
|
|
<br>Modify Makefile as follows:
|
|
<p>Change <tt>TOP=../../..</tt>
|
|
<br>to <tt>TOP=../..</tt>
|
|
<p>Change i<tt>nclude $(TOP)/config/CONFIG_APP</tt>
|
|
<br>to <tt>include $(TOP)/configure/CONFIG</tt>
|
|
<p>Change <tt>include $(TOP)/config/RULES.Db</tt>
|
|
<br>to <tt>include $(TOP)/configure/RULES</tt>
|
|
<p>Place all definitions between the include lines.
|
|
<p>Place any rules after the last include line.</blockquote>
|
|
|
|
<h3>
|
|
Modify the Makefiles in <top>/*App/src directories.</h3>
|
|
|
|
<blockquote>Remove existing Makefile
|
|
<br>Rename Makefile.Host to Makefile
|
|
<br>Modify Makefile as follows:
|
|
<p>Change <tt>TOP=../../..</tt>
|
|
<br>to <tt>TOP=../..</tt>
|
|
<p>Change <tt>include $(TOP)/config/CONFIG_APP</tt>
|
|
<br>to <tt>include $(TOP)/configure/CONFIG</tt>
|
|
<p>Change i<tt>nclude $(TOP)/config/RULES.Host</tt>
|
|
<br>to <tt>include $(TOP)/configure/RULES</tt>
|
|
<p>Change <tt>PROD_LIBS = <name></tt>
|
|
<br>to <tt> <prod name>_LIBS = dbStaticHost</tt>
|
|
<br>where <tt><prod name></tt> is a specifified product to be
|
|
built.
|
|
<p>Change library name <tt>Db</tt> to <tt>dbStaticHost.</tt>
|
|
<br>Change<tt> PROD_LIBS = Db</tt>
|
|
<br>to <tt> <prodname>_LIBS += dbStaticHost</tt>
|
|
<br>and <tt>Db_DIR = $(EPICS_BASE_LIB)</tt>
|
|
<br>to <tt>dbStaticHost_DIR = $(EPICS_BASE_LIB)</tt>
|
|
<p>Change <tt>USER_DBDFLAGS</tt>
|
|
<br>to <tt>USR_DBDFLAGS</tt>
|
|
<p>Change <tt>RECTYPES += xxxRecord.h</tt>
|
|
<br>to <tt>DBDINC += xxxRecord</tt>
|
|
<p>Change <tt>DBDNAME = <name>App.dbd</tt>
|
|
<br>to <tt>DBD += <name>.dbd</tt>
|
|
<p>Remove all <tt>DBDEXPAND</tt> lines.
|
|
<p>Change <tt>PROD = <prodname></tt>
|
|
<br>to <tt>PROD_HOST = <prodname></tt>
|
|
<p>Change <tt>SRCS.c += <name></tt>
|
|
<br>to <tt><prodname>_SRCS += <name></tt>
|
|
<br>or<tt> <libname>_SRCS += <name></tt>
|
|
<p>Add the contents of Makefile.Vx to Makefile removing the include lines
|
|
and the TOP definition.</blockquote>
|
|
|
|
<blockquote>Change <tt>LIBNAME = <libname>Lib</tt>
|
|
<br>to <tt>PROD_vxWorks = <libname></tt><tt></tt>
|
|
<p>Remove line <tt> -include ../baseLIBOBJS</tt>
|
|
<p>Remove line <tt>INSTALLS = iocCore seq</tt><tt></tt>
|
|
<p>Change all <tt>SRCS.c += ../<name>.c </tt>lines
|
|
<br>to <font face="Arial,Helvetica"><prodname>_SRCS += <name>.c</font>
|
|
<br>if the source files exist in the current directory.<tt></tt>
|
|
<p>Change all <tt>*OBJS += <name>.o</tt>
|
|
lines
|
|
<br>to <font face="Arial,Helvetica"><prodname>_SRCS += <name>.c</font>
|
|
<br>or <font face="Arial,Helvetica"> <prodname>_SRCS += <name>.cc</font>
|
|
<br>if the c/c++ source files exist in the current directory.
|
|
<p>Change <tt>LIBOBJS += <seq_program_name>.o</tt>
|
|
lines
|
|
<br>to <tt><prodname>_SRCS += <seq_program_name>.stt</tt>
|
|
<br>or <tt><prodname>_SRCS += <seq_program_name>.st</tt><tt></tt>
|
|
<p>Add the lines
|
|
<blockquote><tt>#<name>_LIBS += seq</tt>
|
|
<br><tt>#<name>_LIBS += pv</tt>
|
|
<br><tt>#seq_DIR = $(SNCSEQ_LIB)</tt>
|
|
<br><tt>#pv_DIR = $(SNCSEQ_LIB)</tt><tt></tt>
|
|
<p><tt><name>_LIBS += recIoc</tt>
|
|
<br><tt><name>_LIBS += softDevIoc</tt>
|
|
<br><tt><name>_LIBS += testDevIoc</tt>
|
|
<br><tt><name>_LIBS += iocsh</tt>
|
|
<br><tt><name>_LIBS += miscIoc</tt>
|
|
<br><tt><name>_LIBS += rsrvIoc</tt>
|
|
<br><tt><name>_LIBS += dbtoolsIoc</tt>
|
|
<br><tt><name>_LIBS += asIoc</tt>
|
|
<br><tt><name>_LIBS += dbIoc</tt>
|
|
<br><tt><name>_LIBS += registryIoc</tt>
|
|
<br><tt><name>_LIBS += dbStaticIoc</tt>
|
|
<br><tt><name>_LIBS += ca</tt>
|
|
<br><tt><name>_LIBS += Com</tt></blockquote>
|
|
where <tt><name></tt> is the name in the <tt>PROD_vxWorks</tt>
|
|
definition, and uncomment the first four lines if you have sequence programs
|
|
(.st or .stt files) in the current directory.
|
|
<p>Place all macro definitions between the include lines.
|
|
<p>Place any rules after the last include line.</blockquote>
|
|
|
|
<h3>
|
|
Modify the Makefiles in <top>/iocBoot directory.</h3>
|
|
|
|
<blockquote>Change i<tt>nclude $(TOP)/config/CONFIG_APP</tt>
|
|
<br>to <tt>include $(TOP)/configure/CONFIG</tt>
|
|
<p>Remove the line <tt>DIRS += $(wildcard *ioc*)</tt>
|
|
<p>Change <tt>include $(TOP)/config/RULES.iocBoot</tt>
|
|
<br>to i<tt>nclude $(TOP)/configure/RULES.iocBoot</tt></blockquote>
|
|
|
|
<h3>
|
|
Modify the Makefiles in <top>/iocBoot/ioc* directories.</h3>
|
|
|
|
<blockquote>Change <tt>include $(TOP)/config/CONFIG_APP</tt>
|
|
<br>to <tt>include $(TOP)/configure/CONFIG</tt>
|
|
<p>Change <tt>include ARCH = <old arch specification e.g. mv167></tt>
|
|
<br>to <tt>include ARCH = <new arch specificatio
|
|
e.g. vxWorks-68040></tt><tt></tt>
|
|
<p>Change <tt>include $(TOP)/config/RULES.ioc</tt>
|
|
<br>to <tt>include $(TOP)/configure/RULES.ioc</tt>
|
|
<p>Add the following rule at the end of the Makefile.
|
|
<blockquote><tt>buildInstall: cdCommands</tt></blockquote>
|
|
</blockquote>
|
|
|
|
<h3>
|
|
Modify st.cmd in <top>/iocBoot/ioc* directories.</h3>
|
|
|
|
<blockquote>Remove the lines</blockquote>
|
|
|
|
<blockquote>
|
|
<blockquote>
|
|
<pre>ld < seq</pre>
|
|
|
|
<pre>ld < iocCore</pre>
|
|
</blockquote>
|
|
Change <tt>ld < <libname>Lib</tt>
|
|
<br>to <tt>ld < <libname>.munch</tt>
|
|
<p>Change load statements for db and dbd files from
|
|
<blockquote><tt>cd startup</tt>
|
|
<br><tt>dbLoadDatabase("../../dbd/exampleApp.dbd")</tt>
|
|
<br><tt>dbLoadRecords("../../db/dbExample1.db","user=jba")</tt>
|
|
<br><tt>dbLoadRecords("../../db/dbExample2.db")</tt></blockquote>
|
|
to
|
|
<blockquote><tt>cd top</tt>
|
|
<br><tt>dbLoadDatabase("dbd/example.dbd")</tt>
|
|
<br><tt>registerRecordDeviceDriver(pdbbase)</tt>
|
|
<br><tt>dbLoadRecords("db/dbExample1.db","user=jba")</tt>
|
|
<br><tt>dbLoadRecords("db/dbExample2.db")</tt></blockquote>
|
|
</blockquote>
|
|
|
|
<h3>
|
|
Record support changes</h3>
|
|
|
|
<blockquote>The steppermotor, scan, and pid records are no longer in base.
|
|
If these records are not used in your application, comment out references
|
|
to them in base.dbd. If these record types are used at your site, they
|
|
should be downloaded and built with base R3.14 by your EPICS administrator.
|
|
To update the R3.14 location of these record types in your application
|
|
you must add appropriate module definitions to your application's
|
|
config/RELEASE file and change the <tt>LIBOBJS</tt> definitions.
|
|
<p>For example add</blockquote>
|
|
|
|
<blockquote> <tt>PID=<full
|
|
path to modules directory>/pid</tt>
|
|
<p>to config/RELEASE.
|
|
<br>Remove</blockquote>
|
|
|
|
<blockquote> <tt>LIBOBJS
|
|
+= $(EPICS_BASE_BIN)/pidRecord.o</tt>
|
|
<p>from baseLIBOBJS, and add</blockquote>
|
|
|
|
<blockquote>
|
|
<blockquote><tt>LIBOBJS += $(PID_BIN)/pidRecord.o</tt></blockquote>
|
|
to your application src/Makefile.</blockquote>
|
|
|
|
<blockquote>You should consider changing any existing old steppermotor
|
|
records to the new EPICS motor record module supported by Beamline
|
|
Controls and Data Acquisition at APS.</blockquote>
|
|
|
|
<h3>
|
|
RecDynLink.o and devPtSoft changes</h3>
|
|
|
|
<blockquote>recDynLink.o and devPtSoft.o are no longer in EPICS base and
|
|
now exist as separate EPICS modules.You must now add the appropriate module
|
|
full path definitions to your application config/RELEASE file, and change
|
|
<tt>LIBOBJS</tt>
|
|
location definition <tt>$(EPICS_BASE_BIN)</tt> to the module definition
|
|
bin directory in your application src directory files. See "Hardware
|
|
support changes" below for instructions.</blockquote>
|
|
|
|
<h3>
|
|
Hardware support changes</h3>
|
|
|
|
<blockquote>All hardware support (dev, drv and dbd files) except soft support
|
|
has been unbundled from base R3.14. This support includes the files symb.dbd,
|
|
drvHp1404a.o, drvEpvxiMsg.o, and drvEpvxi.o. If these are not used by your
|
|
application, comment out references to them in base.dbd.</blockquote>
|
|
|
|
<blockquote>Hardware support now exists as separate EPICS modules. The
|
|
hardware support for your site should be downloaded and built with base
|
|
R3.14 by your EPICS administrator. You must now add the appropriate module
|
|
full path definitions to your application config/RELEASE file, and change
|
|
<tt>LIBOBJS</tt>
|
|
location from <tt>$(EPICS_BASE_BIN) </tt>to the module bin directory
|
|
in your application src directory files.
|
|
<p>For example, remove</blockquote>
|
|
|
|
<blockquote> <tt>LIBOBJS+=$(EPICS_BASE_BIN)/symb</tt></blockquote>
|
|
|
|
<blockquote>from baseLIBOBJS and add</blockquote>
|
|
|
|
<blockquote> <tt>LIBOBJS+=$(SYMB_BIN)/symb</tt></blockquote>
|
|
|
|
<blockquote>to your application src/Makefile,
|
|
<br>and add the line</blockquote>
|
|
|
|
<blockquote>
|
|
<blockquote><tt>SYMB=<full path definition for the built module SYMB></tt></blockquote>
|
|
</blockquote>
|
|
|
|
<blockquote>into your application config/RELEASE file .</blockquote>
|
|
|
|
<h3>
|
|
dbLoadtemplate tool changes</h3>
|
|
|
|
<blockquote>The host tool dbLoadTemplate has been replace by a new EPICS
|
|
extension, msi, which should be downloaded and built with base R3.14 by
|
|
your EPICS administrator. dbLoadTemplate is still supported on iocs.
|
|
If, in your application, db files are created from template and substitution
|
|
files you should add the definition
|
|
<p> <tt>EPICS_EXTENSIONS=<full
|
|
path name to epics extensions directory></tt>
|
|
<p>to your application config/RELEASE file.</blockquote>
|
|
|
|
<blockquote>
|
|
<blockquote> </blockquote>
|
|
|
|
<blockquote>
|
|
<pre></pre>
|
|
</blockquote>
|
|
</blockquote>
|
|
|
|
<br>
|
|
</body>
|
|
</html>
|