Files
pcas/READMEconvertingR3.13AppsToR3.14.0alpha2.html
Marty Kraimer 22df1fb68a new files
2001-04-09 19:45:51 +00:00

264 lines
10 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>
<h2>
Converting an EPICS R3.13 application to R3.14.0alpha2</h2>
This document describes how to convert a R3.13 vxWorks application so that
it builds with release R3.14.0alpha2.&nbsp; 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>
First do a gnumake clean uninstall in the application's root directory
to remove all files created by earlier builds.
<h3>
Create a new R3.14 application</h3>
<blockquote>mkdir &lt;top>
<br>cd &lt;top>
<br>/home/phoebus/JBA/epics/base/bin/solaris-sparc/makeBaseApp.pl -t example
example</blockquote>
<h3>
Copy all *App and iocBoot directories and files to the new &lt;top> directory</h3>
<blockquote>cd &lt;oldtop>
<br>find *App iocBoot -print | cpio -pvmd &lt;fullpath name to new top></blockquote>
<h3>
Modify &lt;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>SNCSEQ =&lt;full path to seq top></blockquote>
The R3.14 seq module must exist and be built with EPICS base R3.14.0alpha2.</blockquote>
<h3>
Modify the Makefiles in &lt;top>/*App directories.</h3>
<blockquote>Change&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/config/CONFIG_APP
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/configure/CONFIG
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/config/RULES_DIRS
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/configure/RULES_DIRS</blockquote>
<h3>
Modify the Makefiles in &lt;top>/*App/*Db directories.</h3>
<blockquote>Remove existing Makefile
<br>Rename Makefile.Host to Makefile
<br>Modify Makefile as follows:
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; TOP=../../..
<br>to&nbsp;&nbsp;&nbsp;&nbsp; TOP=../..
<p>Change&nbsp;&nbsp;&nbsp; include $(TOP)/config/CONFIG_APP
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/configure/CONFIG
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/config/RULES.Db
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/configure/RULES
<p>Place all definitions between the include lines.
<p>Place any rules after the last include line.</blockquote>
<h3>
Modify the Makefiles in &lt;top>/*App/src directories.</h3>
<blockquote>Remove existing Makefile
<br>Rename Makefile.Host to Makefile
<br>Modify Makefile as follows:
<p>Change TOP=../../..
<br>to&nbsp;&nbsp;&nbsp;&nbsp; TOP=../..
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/config/CONFIG_APP
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/configure/CONFIG
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/config/RULES.Host
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/configure/RULES
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; PROD_LIBS = Db
<br>to&nbsp;&nbsp;&nbsp;&nbsp; PROD_LIBS = dbStaticHost
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; Db_DIR = $(EPICS_BASE_LIB)
<br>to&nbsp;&nbsp;&nbsp;&nbsp; dbStaticHost_DIR = $(EPICS_BASE_LIB)
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; USER_DBDFLAGS
<br>to&nbsp;&nbsp;&nbsp;&nbsp; USR_DBDFLAGS
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; RECTYPES +=&nbsp; xxxRecord.h
<br>to&nbsp;&nbsp;&nbsp;&nbsp; DBDINC += xxxRecord
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; DBDNAME = &lt;name>.dbd
<br>to&nbsp;&nbsp;&nbsp;&nbsp; DBD += &lt;name>.dbd
<p>Remove all DBDEXPAND&nbsp; lines.
<p>Add the contents of Makefile.Vx to Makefile removing the include lines
and the TOP definition.</blockquote>
<blockquote>Change&nbsp;&nbsp;&nbsp;&nbsp; LIBNAME = &lt;libname>
<br>to&nbsp;&nbsp;&nbsp;&nbsp; LIBRARY_vxWorks = &lt;libname>
<p>Add the line&nbsp;&nbsp; &lt;libname>_OBJS = $(LIBOBJS)
<p>Change&nbsp;&nbsp;&nbsp;&nbsp; INSTALLS = iocCore seq
<br>to
<blockquote>&lt;libname>_OBJS_vxWorks += $(EPICS_BASE_BIN)/iocCoreLibrary
<br>&lt;libname>_OBJS_vxWorks += $(SNCSEQ_BIN)/seqLibrary
<br>&lt;libname>_OBJS_vxWorks += $(SNCSEQ_BIN)/pvLibrary
<br>&lt;libname>_OBJS_vxWorks += $(SNCSEQ_BIN)/pvCaLibrary</blockquote>
Change&nbsp;&nbsp;&nbsp;&nbsp; include ../baseLIBOBJS
<br>to&nbsp;&nbsp;&nbsp;&nbsp; -include ../baseLIBOBJS
<p>Change&nbsp;&nbsp;&nbsp; SRCS +=&nbsp; &lt;srcname>.c
<br>to&nbsp;&nbsp;&nbsp;&nbsp; &lt;libname>_SRCS += &lt;srcname>.c
<p>Rename your sequence programs from &lt;name>.st to &lt;name>.stt&nbsp;
if they do not need&nbsp; c preprocessing before conversion.
<p>Change&nbsp;&nbsp;&nbsp; LIBOBJS += &lt;seq_program_name>.o&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lines
<br>to&nbsp;&nbsp; &lt;libname>_SRCS += &lt;seq_program_name>.stt
<br>or&nbsp; &lt;libname>_SRCS += &lt;seq_program_name>.st
<p>Place all macro definitions between the include lines.
<p>Place any rules after the last include line.</blockquote>
<h3>
Modify the Makefiles in &lt;top>/iocBoot directory.</h3>
<blockquote>Change include $(TOP)/config/CONFIG_APP
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/configure/CONFIG
<p>Remove the line DIRS += $(wildcard *ioc*)
<p>Change include $(TOP)/config/RULES.iocBoot
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/configure/RULES.iocBoot</blockquote>
<h3>
Modify the Makefiles in &lt;top>/iocBoot/ioc* directories.</h3>
<blockquote>Change include $(TOP)/config/CONFIG_APP
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/configure/CONFIG
<p>Change include ARCH = &lt;old arch specification e.g. mv167>
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include ARCH = &lt;new arch specificatio
e.g. vxWorks-68040>
<p>Change include $(TOP)/config/RULES.ioc
<br>to&nbsp;&nbsp;&nbsp;&nbsp; include $(TOP)/configure/RULES.ioc</blockquote>
<h3>
Modify st.cmd in &lt;top>/iocBoot/ioc* directories.</h3>
<blockquote>Remove the lines</blockquote>
<blockquote>
<blockquote>
<pre>ld &lt; seq</pre>
<pre>ld &lt; iocCore</pre>
</blockquote>
Change&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ld &lt; &lt;libname>
<br>to&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ld &lt; &lt;libname>Library.munch
<p>Change&nbsp; load statements&nbsp; for db and dbd files from
<blockquote>cd startup
<br>dbLoadDatabase("../../dbd/exampleApp.dbd")
<br>dbLoadRecords("../../db/dbExample1.db","user=jba")
<br>dbLoadRecords("../../db/dbExample2.db")</blockquote>
to
<blockquote>cd top
<br>dbLoadDatabase("dbd/example.dbd")
<br>registerRecordDeviceDriver(pdbbase)
<br>dbLoadRecords("db/dbExample1.db","user=jba")
<br>dbLoadRecords("db/dbExample2.db")</blockquote>
</blockquote>
<h3>
Record support changes</h3>
<blockquote>The steppermotor, scan, and pid records are no longer in base.
If these record types are used at your site, they&nbsp; 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&nbsp; add appropriate
module definitions to your application's config/RELEASE file and change
the LIBOBJS definitions.
<p>For example add</blockquote>
<blockquote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PID=&lt;full
path to modules directory>/pid
<p>to config/RELEASE.
<br>Remove</blockquote>
<blockquote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LIBOBJS +=
$(EPICS_BASE_BIN)/pidRecord.o
<br>from baseLIBOBJS,
<br>and add</blockquote>
<blockquote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LIBOBJS +=
$(PID_BIN)/pidRecord.o
<br>to your application src/Makefile.</blockquote>
<blockquote>You should consider changing any existing old steppermotor
records to the new EPICS&nbsp; motor record&nbsp; 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
LIBOBJS location definition $(EPICS_BASE_BIN) to the module definition
bin directory in your application src directory files.&nbsp; 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.</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
LIBOBJS location from $(EPICS_BASE_BIN) to the module&nbsp; bin directory
in your application src directory files.
<p>For example, remove</blockquote>
<blockquote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LIBOBJS+=$(EPICS_BASE_BIN)/symb</blockquote>
<blockquote>from baseLIBOBJS and add</blockquote>
<blockquote>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LIBOBJS+=$(SYMB_BIN)/symb</blockquote>
<blockquote>to your application src/Makefile,
<br>and add the line</blockquote>
<blockquote>
<blockquote>SYMB=&lt;full path definition for the built module SYMB></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.&nbsp;
If, in your application, db files are created from template and substitution
files you should&nbsp; add the definition
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EPICS_EXTENSIONS=&lt;full
path name to epics extensions directory>
<p>to your application config/RELEASE file.</blockquote>
<blockquote>
<blockquote>&nbsp;</blockquote>
<blockquote>
<pre></pre>
</blockquote>
</blockquote>
<br>&nbsp;
</body>
</html>