More editing for beta12
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; HP-UX B.10.20 9000/778) [Netscape]">
|
||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; U; SunOS 5.5.1 sun4u) [Netscape]">
|
||||
<TITLE>EPICS: IOC Applications: Building and Source Release Control</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
@@ -15,20 +15,21 @@ Source Release Control</H1></CENTER>
|
||||
|
||||
<CENTER>
|
||||
<H2>
|
||||
Marty Kraimer and Janet Anderson <BR>
|
||||
Argonne National Laboratory, Advanced Photon Source <BR>
|
||||
June 12, 1998 <BR>
|
||||
Marty Kraimer, Janet Anderson , and Ralph Lange<BR>
|
||||
June 15, 1998 <BR>
|
||||
EPICS Release 3.13.0.beta12</H2></CENTER>
|
||||
|
||||
<CENTER>
|
||||
<H2>
|
||||
Acknowledgements</H2></CENTER>
|
||||
Changes since beta11</H2></CENTER>
|
||||
Between release 3.13.0.beta11 and 3.13.0.beta12 makeBaseApp was changed
|
||||
from one very long perl script to a four page perl script plus template
|
||||
files. It supports templates in addition to those supplied with EPICS base.
|
||||
Other improvements were made including support for capfast. The following
|
||||
people contributed to this effort: Ralph Lange (BESSY), Rozelle Wright
|
||||
(LANL) and Thomas Birke (BESSY).
|
||||
Other improvements were made including support for capfast. The primary
|
||||
developer of the new version of makeBaseApp was Ralph Lange (BESSY). Rozelle
|
||||
Wright (LANL) and Thomas Birke (BESSY) contributed to this development.
|
||||
In addition no soft links are required so that makeBaseApp works on winXX
|
||||
hosts.
|
||||
<CENTER>
|
||||
<H2>
|
||||
Quick Start</H2></CENTER>
|
||||
@@ -384,8 +385,7 @@ to meet these needs.
|
||||
<H3>
|
||||
Overview of Application Source Release Control</H3>
|
||||
The application directory structure appears as follows:
|
||||
<PRE> iocsys/
|
||||
<top>/
|
||||
<PRE> <top>/
|
||||
config/
|
||||
xxxApp/
|
||||
src/
|
||||
@@ -414,10 +414,12 @@ developers as needed. The iocBoot directory contains a subdirectory for
|
||||
each IOC that belongs to that <<TT>top</TT>> area. No IOC belongs to
|
||||
more than one <<TT>top</TT>> area. All software components needed by
|
||||
IOCs are built in the xxxApp directories. Each IOC is booted from <TT>bin/<target_arch>
|
||||
</TT>and uses a startup file from it's subdirectory under iocBoot. The
|
||||
only important source file in a boot directory is the <TT>st.cmd</TT> file
|
||||
which is executed after vxWorks is started on an IOC. The <TT>st.cmd </TT>file
|
||||
loads various files built in the xxxApp directories.
|
||||
</TT>(actually from any directory containing a vxWorks and vxWorks.sym
|
||||
compatible with the version of vxWorks against which the target was built)
|
||||
and uses a startup file from a subdirectory under iocBoot. The only important
|
||||
source file in a boot directory is the <TT>st.cmd</TT> file which is executed
|
||||
after vxWorks is started on an IOC. The <TT>st.cmd </TT>file loads various
|
||||
files built in the xxxApp directories.
|
||||
|
||||
<P>Application developers decide what constitutes a <<TT>top</TT>>.
|
||||
For example, at APS, the Linac is completely contained in a single <<TT>top</TT>>
|
||||
@@ -467,11 +469,17 @@ If it is necessary to obtain a bug fix or enhancement to a single module
|
||||
from EPICS base or a <TT>share</TT> release, the application developer
|
||||
has at least two choices. The first is to build a new release of base or
|
||||
<TT>share</TT>. A second choice is to copy the source module to an appropriate
|
||||
<TT>src</TT> directory and build it there. In this case you should do something
|
||||
so that you remember to use the version from <TT>share</TT> after <TT>share</TT>
|
||||
is rebuilt.
|
||||
<TT>src</TT> directory and build it there. In this case the developer must
|
||||
remember to use the version from <TT>share</TT> after <TT>share</TT> is
|
||||
rebuilt.
|
||||
|
||||
<P><B>Note: </B>Other software packages can be handled like <TT>share</TT>.
|
||||
<H2>
|
||||
templates</H2>
|
||||
The makeBaseApp.pl utility creates new application areas. It does this
|
||||
by copying and transforming directory trees from a template area. EPICS
|
||||
base provides templates for a simple application and for an example application.
|
||||
Each site can, however, create their own set of templates.
|
||||
<H3>
|
||||
Tools</H3>
|
||||
The following tools are used:
|
||||
@@ -532,8 +540,10 @@ Structure</H3>
|
||||
RULES_ARCHS
|
||||
RULES_DIRS
|
||||
RULES_TOP
|
||||
makeDbDepends.pl
|
||||
makeIocCdCommands.pl
|
||||
xxxApp/
|
||||
replaceVAR.pl
|
||||
xxxApp/ or xxxapp
|
||||
src/ or xxxSrc or xxxsrc
|
||||
Makefile
|
||||
* Makefile.Host
|
||||
@@ -541,16 +551,17 @@ Structure</H3>
|
||||
* base.dbd
|
||||
* baseLIBOBJS
|
||||
* <app>Include.dbd
|
||||
* <example and/or user supplied code>
|
||||
* <example and/or user supplied state programs>
|
||||
* <user menu, recordtype, device, driver database defs>
|
||||
Db/ or xxxDb or xxxdb
|
||||
* <source code>
|
||||
* <state programs>
|
||||
* < menu, recordtype, device, driver database defs>
|
||||
Db/ or db or xxxDb or xxxdb
|
||||
Makefile
|
||||
* <record instance files>
|
||||
* <record template and substitution files>
|
||||
privately managed directories
|
||||
iocBoot/
|
||||
iocBoot/ or iocboot
|
||||
Makefile
|
||||
Makefile.Host
|
||||
nfsCommands
|
||||
iocxxx/
|
||||
* Makefile
|
||||
@@ -558,6 +569,8 @@ Structure</H3>
|
||||
** cdCommands
|
||||
** dbd/
|
||||
<installed database description files>
|
||||
** db/
|
||||
<installed record instance files>
|
||||
** include/
|
||||
<installed include files>
|
||||
** bin/
|
||||
@@ -566,9 +579,7 @@ Structure</H3>
|
||||
<ioc_arch>
|
||||
<installed IOC products>
|
||||
...
|
||||
** lib/
|
||||
** man/
|
||||
** db/</PRE>
|
||||
** lib/</PRE>
|
||||
Files marked with an "*" are user created and/or edited. Each such file
|
||||
is discussed in this section.
|
||||
|
||||
@@ -586,12 +597,12 @@ The directories are:
|
||||
Directory containing configuration files for gnumake.</DD>
|
||||
|
||||
<DT>
|
||||
<TT>xxxApp</TT></DT>
|
||||
<TT>xxxApp or xxxapp</TT></DT>
|
||||
|
||||
<DD>
|
||||
Directory containing source files and database files. An arbitrary number
|
||||
of <TT>xxxApp</TT> directories are allowed. Each must have <TT>App</TT>
|
||||
appended to the name because Makefile looks for it.</DD>
|
||||
or <TT>app </TT>appended to the name because Makefile looks for it.</DD>
|
||||
|
||||
<DL>
|
||||
<DT>
|
||||
@@ -614,7 +625,7 @@ substitution files or the equivalent CapFast schematics.</DD>
|
||||
</DL>
|
||||
|
||||
<DT>
|
||||
<TT>iocBoot</TT></DT>
|
||||
<TT>iocBoot or iocboot</TT></DT>
|
||||
|
||||
<DD>
|
||||
Directory containing a subdirectory for each IOC.</DD>
|
||||
@@ -657,13 +668,6 @@ Library Directory. This directory contains a subdirectory for the host
|
||||
architecture and for each target architectiure. These are the directories
|
||||
in which libraries are installed.</DD>
|
||||
|
||||
<DT>
|
||||
<TT>man</TT></DT>
|
||||
|
||||
<DD>
|
||||
Man pages Directory. This directory contains a subdirectory for each section
|
||||
of the Unix style man pages. This is where man pages are installed.</DD>
|
||||
|
||||
<DT>
|
||||
<TT>db</TT></DT>
|
||||
|
||||
@@ -688,9 +692,19 @@ This is the file in which you add to or modify make variables in EPICS
|
||||
base. A useful definition to override is:</DD>
|
||||
|
||||
<PRE> CROSS_COMPILER_TARGET_ARCHS =</PRE>
|
||||
|
||||
<DD>
|
||||
This specifies the vxWorks architecture to build. If your site builds base
|
||||
for multiple target architectures but your IOCs only use a single architecture,
|
||||
overriding this variables saves build time.
|
||||
overriding this variables saves build time.</DD>
|
||||
|
||||
<DD>
|
||||
If you are using capfast you may want to add the definition:</DD>
|
||||
|
||||
<DL>
|
||||
<PRE>DB_OPT = YES</PRE>
|
||||
</DL>
|
||||
|
||||
<DT>
|
||||
<TT>CONFIG_APP</TT></DT>
|
||||
|
||||
@@ -962,7 +976,6 @@ EPICS_MBA_TEMPLATE_TOP Template top directory</PRE>
|
||||
<PRE> mkdir <top> # If <top> does not exist
|
||||
cd <top>
|
||||
<base>/bin/<arch>/makeBaseApp -t <apptype> <app> ...
|
||||
or
|
||||
<base>/bin/<arch>/makeBaseApp -i -t <apptype> <ioc> ...</PRE>
|
||||
makeBaseApp does the following:
|
||||
<UL>
|
||||
@@ -1020,7 +1033,12 @@ If <TT>-t </TT>is specified it is used.</LI>
|
||||
If <TT>EPICS_MBA_DEF_APP_TYPE </TT>is defined it is used.</LI>
|
||||
|
||||
<LI>
|
||||
The application type is set equal to <TT>default</TT>.</LI>
|
||||
If template <TT>defaultApp </TT>exists, the application type is set equal
|
||||
to <TT>default</TT>.</LI>
|
||||
|
||||
<LI>
|
||||
If template <TT>exampleApp </TT>exists, the application type is set equal
|
||||
to <TT>example</TT>.</LI>
|
||||
</UL>
|
||||
|
||||
<LI>
|
||||
@@ -1125,7 +1143,6 @@ For each <TT><app></TT> specified on the command line a directory <TT><app
|
||||
is created and populated with the directory tree from the template (with
|
||||
<TT>ReplaceLine()</TT> tag replacement).</LI>
|
||||
|
||||
<UL>
|
||||
<UL>
|
||||
<UL>
|
||||
<H2>
|
||||
@@ -1135,7 +1152,6 @@ with base</H2>
|
||||
</UL>
|
||||
</UL>
|
||||
</UL>
|
||||
</UL>
|
||||
EPICS base supplies the following sets of template files
|
||||
<UL>
|
||||
<LI>
|
||||
@@ -1173,6 +1189,7 @@ contains the following files.
|
||||
baseLIBOBJS
|
||||
Db/
|
||||
Makefile
|
||||
Makefile.Host
|
||||
dbExample1.db
|
||||
dbExample2.template
|
||||
dbExample2.substitutions</PRE>
|
||||
@@ -1254,7 +1271,7 @@ This is another example of record instances. The database is generated
|
||||
from a template database, which is instantiated using the entries in the
|
||||
substitutions file. Each name is proceeded by <TT><userid></TT>, which
|
||||
is the userid of the person who executed makeBaseApp. Each line in the
|
||||
substitutions file creates a two record database, whose records are desribed
|
||||
substitutions file creates a two record database, whose records are described
|
||||
above (aiExample and calcExample).</DD>
|
||||
|
||||
<DT>
|
||||
@@ -1283,8 +1300,9 @@ synchronous support for the record support.</DD>
|
||||
<CENTER>
|
||||
<H2>
|
||||
<A NAME="ST.CMD"></A>st.cmd</H2></CENTER>
|
||||
NOTE: The commands dbLoadDatabase, dbExpand, and dbLoadRecords are described
|
||||
in Chapter 4, "Database Definition" of the Application Developer's Guide.
|
||||
NOTE: The commands dbLoadDatabase, dbExpand, dbLoadRecords, and dbLoadTemplate
|
||||
are described in chapter , "Database Definition" of the Application Developer's
|
||||
Guide.
|
||||
|
||||
<P>This file is the vxWorks startup file. The version created by makeBaseApp
|
||||
is:
|
||||
@@ -1409,11 +1427,25 @@ the CVS directories excluded.</UL>
|
||||
<TT>xxxApp</TT></DT>
|
||||
|
||||
<DD>
|
||||
The most useful command at this level is</DD>
|
||||
Two useful commands at this level are</DD>
|
||||
|
||||
<PRE> gnumake rebuild</PRE>
|
||||
which is the same as issuing "gnumake rebuild" in each subdirectory of
|
||||
<TT>xxxApp</TT>.
|
||||
<DD>
|
||||
</DD>
|
||||
|
||||
<DL>
|
||||
<DL>
|
||||
<PRE>gnumake</PRE>
|
||||
|
||||
<PRE>or</PRE>
|
||||
|
||||
<PRE>gnumake rebuild</PRE>
|
||||
</DL>
|
||||
</DL>
|
||||
|
||||
<DD>
|
||||
which is the same as issuing the command in each subdirectory of <TT>xxxApp</TT>.</DD>
|
||||
|
||||
<BR>
|
||||
<DT>
|
||||
<TT>xxxApp/src</TT> or <TT>xxxApp/xxxSrc</TT></DT>
|
||||
|
||||
@@ -1423,20 +1455,56 @@ Running the command:</DD>
|
||||
<PRE> gnumake</PRE>
|
||||
|
||||
<DD>
|
||||
in a <TT>src</TT> directory builds and installs all out of date Host and
|
||||
IOC components described by the files <TT>Makefile.Host</TT> and <TT>Makefile.Vx</TT>.
|
||||
The builds are performed in subdirectories <TT>O.<arch></TT>.</DD>
|
||||
which is the same as executing "<TT>gnumake install</TT>" builds
|
||||
and installs all out of date Host and IOC components described by the files
|
||||
<TT>Makefile.Host</TT> and <TT>Makefile.Vx</TT>. The builds are performed
|
||||
in subdirectories <TT>O.<arch></TT>.</DD>
|
||||
|
||||
<BR>
|
||||
<DD>
|
||||
It is possible to build for a single architecture via the command:</DD>
|
||||
|
||||
<P>It is possible to build for a single architecture via the command:
|
||||
<DL>
|
||||
<PRE> gnumake <arch></PRE>
|
||||
</DL>
|
||||
|
||||
<DD>
|
||||
For example, if your IOC is an MV167 system, then the directory is <TT>O.mv167</TT>,
|
||||
and the make command is:
|
||||
and the make command is:</DD>
|
||||
|
||||
<DL>
|
||||
<PRE> gnumake mv167</PRE>
|
||||
Another useful command is:
|
||||
</DL>
|
||||
|
||||
<DD>
|
||||
Another useful command is:</DD>
|
||||
|
||||
<DL>
|
||||
<PRE> gnumake clean</PRE>
|
||||
</DL>
|
||||
|
||||
<DD>
|
||||
This removes the host and target architecture directories created by make.
|
||||
".<arch>" can be appended to invoke clean for a particular architecture.
|
||||
".<arch>" can be appended to invoke clean for a particular architecture.</DD>
|
||||
|
||||
<DD>
|
||||
</DD>
|
||||
|
||||
<DD>
|
||||
The command:</DD>
|
||||
|
||||
<DL>
|
||||
<DL>
|
||||
<PRE>gnumake rebuild</PRE>
|
||||
</DL>
|
||||
</DL>
|
||||
|
||||
<DD>
|
||||
is the same as "<TT>gnumake clean install</TT>".</DD>
|
||||
|
||||
<DD>
|
||||
</DD>
|
||||
|
||||
<DT>
|
||||
<TT>xxxApp/xxxDb</TT></DT>
|
||||
|
||||
@@ -1444,19 +1512,28 @@ This removes the host and target architecture directories created by make.
|
||||
Executing gnumake in this directory generates and installs database instance
|
||||
files, template and substitution files plain sources or CapFast schematics.</DD>
|
||||
|
||||
<DD>
|
||||
</DD>
|
||||
|
||||
<DT>
|
||||
<TT>iocBoot</TT></DT>
|
||||
|
||||
<DD>
|
||||
The most useful command at this level is</DD>
|
||||
Executing</DD>
|
||||
|
||||
<PRE> gnumake</PRE>
|
||||
which is the same as issuing "gnumake" in each subdirectory of <TT>iocBoot</TT>.
|
||||
|
||||
<DD>
|
||||
is the same as issuing "gnumake" in each subdirectory of <TT>iocBoot</TT>.</DD>
|
||||
|
||||
<DD>
|
||||
</DD>
|
||||
|
||||
<DT>
|
||||
<TT>iocBoot/iocxxx</TT></DT>
|
||||
|
||||
<DD>
|
||||
Running <TT>gnumake </TT>in this directory creates the <TT>cdCommands</TT>
|
||||
Executing <TT>gnumake</TT> in this directory creates the <TT>cdCommands</TT>
|
||||
file.</DD>
|
||||
</DL>
|
||||
|
||||
@@ -1935,7 +2012,7 @@ specified in <TT>DB</TT>), must be specified:
|
||||
USES_TEMPLATE += $(SHARE)/installDb/zzz.template</PRE>
|
||||
</UL>
|
||||
If specified with a path (full or relative), the templates will be soft
|
||||
linked (UNIX) resp. copied (WIN) into the <TT>O.<arch></TT> directory.
|
||||
linked (UNIX) or copied (WIN) into the <TT>O.<arch></TT> directory.
|
||||
After the first make run, template dependencies will be generated automatically.
|
||||
|
||||
<P>If there is no *.substitutions source for a needed substitutions file,
|
||||
@@ -1943,6 +2020,10 @@ but a variable defining a script name (like <TT>CREATESUBSTITUTIONS=CreateSubst.
|
||||
this script will be called with the prefix of the substitution file name
|
||||
to be generated.
|
||||
|
||||
<P>NOTE: If (and only if) there are script generated substitutions files,
|
||||
the prefix of any inflated database's name may not equal the prefix of
|
||||
the name of any template used within the directory.
|
||||
|
||||
<P>Other definitions:
|
||||
<PRE>E2DB_FLAGS e2db options
|
||||
SCH2EDIF_FLAGS sch2edif options</PRE>
|
||||
@@ -2025,9 +2106,10 @@ CVSROOT</H3>
|
||||
Your environment variable CVSROOT should point to the CVS repository for
|
||||
IOC Applications. The following command displays the location of CVSROOT:
|
||||
<PRE> echo $CVSROOT</PRE>
|
||||
At APS/ASD the command should show:
|
||||
For example, at APS/ASD the command should show:
|
||||
<PRE> /usr/local/iocapps/cvsroot</PRE>
|
||||
|
||||
At APS all <TT><top></TT> applications are stored under <TT>$CVSROOT/iocsys</TT>.
|
||||
Other sites may use a different convention.
|
||||
<H3>
|
||||
Commands</H3>
|
||||
This section gives a brief description of the CVS commands. Wherever <filename>
|
||||
@@ -2046,53 +2128,21 @@ Typing</DD>
|
||||
|
||||
<PRE> cvs help</PRE>
|
||||
gives overall cvs help.
|
||||
<DT>
|
||||
<B>Initial Checkout</B></DT>
|
||||
|
||||
<DD>
|
||||
Each user performs application development in his/her private area. The
|
||||
developer must checkout <TT>iocsys/ascf.</TT> Then entire <TT><top></TT>
|
||||
areas can be checked out or else just a subset of a <TT><top> </TT>area.</DD>
|
||||
|
||||
|
||||
<P>The first step is to checkout ascf. The easiest way is to create the
|
||||
application area with a high level directory called <TT>iocsys</TT>. The
|
||||
following commands are issued:
|
||||
<PRE> cd <anywhere>
|
||||
cvs checkout iocsys/ascf</PRE>
|
||||
<TT>iocsys</TT> will appear as a subdirectory of <TT><anywhere></TT>.
|
||||
If <TT><anywhere></TT> is null then <TT>iocsys</TT> appears in the user's
|
||||
home directory.
|
||||
<BR>
|
||||
<DT>
|
||||
<B>Checkout Entire <TT><top></TT> Area</B></DT>
|
||||
|
||||
<DD>
|
||||
To check out an entire <TT><top></TT> area issue the commands:</DD>
|
||||
|
||||
<PRE> cd <anywhere>
|
||||
cvs checkout iocsys/<top></PRE>
|
||||
<PRE>cd <anywhere>
|
||||
cvs checkout iocsys/<top></PRE>
|
||||
|
||||
<DD>
|
||||
<TT>iocsys/<top></TT> appears under <TT><anywhere></TT></DD>
|
||||
|
||||
<DT>
|
||||
<B>Checkout Subset of <TT><top></TT> Area</B></DT>
|
||||
|
||||
<DD>
|
||||
It is possible to checkout a subset of the the <TT>xxxApps</TT> and a subset
|
||||
of the <TT>iocBoot</TT> directories. The commands to accomplish this are:</DD>
|
||||
|
||||
<PRE> cd <anywhere>
|
||||
cvs checkout iocsys/<top>/Makefile
|
||||
cvs checkout iocsys/<top>/config
|
||||
cvs checkout iocsys/<top>/xxxApp
|
||||
...</PRE>
|
||||
The entire iocBoot directory can be checked out via the command:
|
||||
<PRE> cvs checkout iocsys/<top>/iocBoot</PRE>
|
||||
A subset of the iocBoot directory can be checked out via the commands:
|
||||
<PRE> cvs checkout iocsys/<top>/iocBoot/Makefile
|
||||
cvs checkout iocsys/<top>/iocBoot/iocxxx
|
||||
...</PRE>
|
||||
<TT></TT></DD>
|
||||
|
||||
<DT>
|
||||
<B>watch</B></DT>
|
||||
|
||||
Reference in New Issue
Block a user