Table of Contents
Previous Chapter The environment described here is fine for small applications and for testing. If you have a large application there is an extension product (Application Source/Release Control System) that provides a much more complete environment.
mkdir <appdir> cd <appdir>You will need a vxWorks startup script file. The following is a sample:
# vxWorks startup script to load and execute system (iocCore) software. ld < targetmv167/iocCore ld < targetmv167/drvSup ld < targetmv167/devSup ld < targetmv167/recSup ld < src/O.mv167/myobj1.o ld < src/O.mv167/myobj2.o dbLoad "default.dctsdr" dbLoadRecords "<app1>.db" dbLoadRecords "<app2>.db" iocLogDisable=1 iocInit<app1>.db and <app2>.db are database files created in gdct database format.
<epics_path>/base/tools/getrel <epics_path> <iocarch> [<iocarch>]where <epics_path> is the location of an EPICS tree. For example if you want release 3.12 and you have an mv167 IOC processor then issue the command:
/usr/local/epics/R3.12/base/tools/getrel /usr/local/epics/R3.12 mv167After issuing this command issue the ls command. You will see that getrel created several soft links for you. These links allow you to:
boot device : ei processor number : 0 host name : <boot host name> file name : <full path name to your app dir>/vxWorksmv167 inet on ethernet (e) : <inet address of ioc>:ffffff00 inet on backplane (b): host inet (h) : <inet address of host> gateway inet (g) : user (u) : <userid for ioc> ftp password (pw) (blank = use rsh): <password for ioc> flags (f) : 0x0 target name (tn) : startup script (s) : st.cmdmv167 other (o) :
"my"
"my" VME_IO "devMy" "My Private Device Support"
"drvMy"
makesdrThis command creates the file default.dctsdr which contains the information from all the ASCII files including yours. It also creates a directory sdrH/rec, which contains all the record type header files.
Components for all site supported architectures will be built in automatically generated O.<arch> subdirectories via the command "gmake" from the src directory.
The Makefiles for building the private source files have the same structure and features as the Makefiles described in Chapter 6, Section "Using EPICS Makefiles" on page 24 and Chapter 6, Section "Creating High-level Makefiles" on page 25, except that the default rule has been set to "build" instead of "install" because "install" is not meaningful when in an application directory.
EPICS=.. include $(EPICS)/config/CONFIG_BASE default: build include $(EPICS)/config/RULES_ARCHS
EPICS=../..
include Target.include
include $(EPICS)/config/CONFIG_BASE
USR_INCLUDES = -I$(EPICS)/replace_ascii -I$(EPICS)/cat_ascii \
-I$(EPICS)/sdrH/rec -I$(EPICS)/include/rec
SRCS.C = ../<src1>.c ../<src2>.c ../<src3>.c ../<src4>.c
TARGETS = <src1>.o <src2>.o <src3>.o <src4>.o
default: build
include $(EPICS)/config/RULES.Vx
EPICS=../..
include Target.include
include $(EPICS)/config/CONFIG_BASE
DEPLIBS = $(EPICS_BASE_LIB)/libca.a $(EPICS_BASE_LIB)/libCom.a
USR_LDLIBS = -lca -lCom
SRCS.c = ../src1.c ../src2.c ../src3.c
OBJS = obj1.c obj2.c obj3.c
TARGETS = target
default: build
include $(EPICS)/config/RULES.Unix
target: $(OBJS) $(DEPLIBS)
$(RM) $@
$(LINK.c) -o $@ ${OBJS} $(LDLIBS)
Table of Contents
Next Chapter