EPICS: vxWorks IOC: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
Boiarino (talk | contribs)
Boiarino (talk | contribs)
Line 99: Line 99:
Add following to Makefile:
Add following to Makefile:


#sergey: add user source code
  iocsy527_SRCS += v288
  iocsy527_SRCS += v288
  iocsy527_SRCS += sy527
  iocsy527_SRCS += sy527
  iocsy527_SRCS += sy527epics1
  iocsy527_SRCS += sy527epics1
Type ''gmake'' - everything compiles and linked with new source files.

Revision as of 20:42, 2 October 2007

VxWorks IOCs are normally running in VME crate controllers.

standard installation

cd $EPICS_BASE
./bin/solaris-sparc/makeBaseApp.pl -b $EPICS_BASE -t ioc iocsy527
./bin/solaris-sparc/makeBaseApp.pl -b $EPICS_BASE -i -t ioc iocsy527
The following target architectures are available in base:
   solaris-sparc
   vxWorks-ppc604_long
   solaris-x86
   linux-x86
What architecture do you want to use? vxWorks-ppc604_long
The following applications are available:
   caclient
   caserver
   ioc
   ioccamac
   iocCore1
   iocCore
   iochv
   iocsy527
   ioctest
   support
What application should the IOC(s) boot?
The default uses the IOC's name, even if not listed above.
Application name? iocsy527

It creates directories iocsy527App and iocBoot/iocsy527.

cd iocsy527App
gmake

It compiles both unix and vxWorks versions.

cd ../iocBoot/iocsy527
gmake

It creates useful cdCommands file. File st.cmd' in the same directory contains an example of startup script. Uncommect followibg line

cd "/usr/local/clas/devel/R3.14.8.2/base-3.14.8.2/iocBoot/iocsy527"

and boot. Everything looks good.

Makefile, source files

Original Makefile in /usr/local/clas/devel/R3.14.8.2/base-3.14.8.2/iocsy527App/src:

TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#=============================
# build an ioc application
PROD_IOC = iocsy527
DBD += iocsy527.dbd
# iocsy527.dbd will be made up from these files:
iocsy527_DBD += base.dbd
#include definitions for any other support applications needed
#iocsy527_DBD += xxx.dbd
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
iocsy527_SRCS += iocsy527_registerRecordDeviceDriver.cpp
iocsy527_SRCS_DEFAULT += iocsy527Main.cpp
iocsy527_SRCS_vxWorks += -nil-
#The following adds support from base/src/vxWorks
iocsy527_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
#add a definition for each support application used by this application
#iocsy527_LIBS += xxx
#NOTES:
#      1)It is not possible to build sncExample both as a component of iocsy527
#        and standalone. You must choose only one.
#      2)To build sncExample SNCSEQ must be defined in <top>/configure/RELEASE
#The following builds sncExample as a component of iocsy527
#iocsy527_SRCS += sncExample.stt
#iocsy527_LIBS += seq pv
iocsy527_LIBS += $(EPICS_BASE_IOC_LIBS)
#The following builds sncExample as a standalone application
#PROD_HOST += sncExample
#sncExample_SNCFLAGS += +m
#sncExample_SRCS += sncExample.stt
#sncExample_LIBS += seq pv
#sncExample_LIBS += $(EPICS_BASE_HOST_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
#  ADD RULES AFTER THIS LINE

Copy following files here:

sy527.h
sy527epics1.h
v288.h
sy527.c
sy527_test.c
sy527epics1.c
v288.c

Add following to Makefile:

iocsy527_SRCS += v288
iocsy527_SRCS += sy527
iocsy527_SRCS += sy527epics1

Type gmake - everything compiles and linked with new source files.