Here is a new version. It's been languishing in my directory for some
time now.
----------------------------------------------------------------------
----------------------------------------------------------------------
Mark Ito
September 17, 1996
Getting Started with baseB
==========================
This is an introduction to the use of a set of new directories in the
Physics EPICS tree on the cebafb/e/h cluster. These contain all of the
EPICS base files that we (Hall B) have developed. Note that the
original files are undisturbed, in their original locations.
The motivation for making this new directory tree is to allow
concurrent development of our software by multiple users. Up to this
point we have been using the original directory structure, not as
intended, but as one large repository, with all of us changing or
rebuilding the same copies of the core software potentially and
actually affecting the behavior of others' programs. In addition, one
is reluctant to jump into the production source area and play with the
code, trying new things, since everybody else would then have to deal
with test versions of the code, or wait for the (hopefully error free)
restoration all files back to their original condition. This new
structure addresses these problems.
To get a private version of the Hall B EPICS core software:
> setup epics_physics/hallb # Our standard setup.
> setenv BASEB <workdir>/baseB # where <workdir> is an arbitrary
# directory of your choosing. The baseB
# tree will be rooted in this directory.
> setenv TARGET <target_arch> # where <target_arch> is either mv162
# or mv167.
> cd <workdir>
> cvs checkout baseB # Get the current version of the
# software from cvs. The directory
# baseB will appear in
# <workdir>. (You'll need ~1.5 MB)
> cd baseB # Go to the new directory.
> install_baseB # Runs a cshell script that will
# install versions of the Hall B device
# support and record support. Messages
# that contain "Error 0" are OK.
The install step creates the following files:
$BASEB/bin/$TARGET/devSupB
$BASEB/bin/$TARGET/drvSupB
$BASEB/bin/$TARGET/recSupB
$BASEB/rec/default.dctsdr
$BASEB/rec/default.sdrSum
$BASEB/rec/*.h # lots of these
To use these files, in your IOC load script instead of the standard:
ld < devSup
ld < drvSup
ld < recSup
do the following:
ld < devSup
ld < <workdir>/bin/<target_arch>/devSupB
ld < drvSup
ld < <workdir>/bin/<target_arch>/drvSupB
ld < recSup
ld < <workdir>/bin/<target_arch>/recSupB
Presently this will essentially overwrite the versions of the routines
that are already present in the standard device, driver and record
support.
If for example you would like to modify the routine devAiLecroy.c in
our device support:
> cd $BASEB/src/dev # go to the source directory
> emacs devAiLecroy.c # make your changes with the editor
> make # rebuild the library
A new version of $BASEB/bin/$TARGET/devSupB will be created
with your changes reflected. If you like your changes and would like
to incorporate them into the Hall B cvs repository then:
> cd $BASEB/src/dev # same directory as above
> cvs commit -m "I changed it to make it better" devAiLecroy.c
The -m option is a required comment. If you want to make a longer
comment, leave out the -m "comment text" and cvs will fire up an
editor to let you input your comment. Now all others that checkout
baseB will get your new version of the routine. And we know when the
version changed. And we know who did it. And we know why. And we can
get back to the old version if we want to.
Note the following:
o Until the "cvs commit" step in the above procedures you are free to
hack around to your heart's content without affecting anyone else.
o The directory structure under baseB is exactly the same as you find
under $EPICS/base.
o If you want to use the Hall B software without modification, then use
the files in the tree $EPICS/baseB (i. e. <workdir> = $EPICS). These
should reflect a built version of the current cvs repository. You
should not modify files here. Rather make your own copy and play with
that.
o There is more to CVS than is mentioned here obviously. See the
document in:
ftp://ftp.cebaf.gov/pub/marki/slow/cvs.ps
Of particular interest is the "cvs release" command that will let you
see which files of your local copy you have changed, or whether they
have become "obsolete" due to someone else making a change in the
repository. "cvs diff" will let you see the differences between your
local copy and the one in the repository. Also "cvs add" will allow
you to add a new file or directory to the repository.
o My final goal is for us never to go into $EPICS/base or
$EPICS/extensions to change things and just let the Accelerator
Division maintain those directories, give us updates, new versions,
etc. If we have local versions of things that are in there, we can
maintain them separately on our own tree.
o I need feedback on whether I have identified the Hall B routines and
header files correctly, or if I have left any out. Your comments here
would be appreciated.