Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 1999/Ph 514: IOC Development Environment EPICS IOC Development Environment Marty Kraimer APS.

Similar presentations


Presentation on theme: "1 1999/Ph 514: IOC Development Environment EPICS IOC Development Environment Marty Kraimer APS."— Presentation transcript:

1 1 1999/Ph 514: IOC Development Environment EPICS IOC Development Environment Marty Kraimer APS

2 2 1999/Ph 514: IOC Development Environment EPICS Reference EPICS IOC Applications Building and Source Release Control Marty Kraimer,Janet Anderson,Ralph Lange June 15, 1998

3 3 1999/Ph 514: IOC Development Environment EPICS Overview u Create and build IOC applications u databases u vxWorks startup files u SNL programs u New record, device, driver support u Access security configuration files u Other IOC code u Special Host code u Source management features u CVS can be used u IOC software is divided into areas Each is separately managed u gnumake + rules builds all components u User prerequisites u Understands C u Knows how to use a text editor u Has superficial knowledge of make

4 4 1999/Ph 514: IOC Development Environment EPICS Directory Structure / config/Configuration + Rules xxxApp/All source files except startup src/Code xxxSrc/Arbitrary number of xxxSrc Db/Databases xxxDbArbitrary number of xxxDb...May have others: adl, etc xxxApp/Arbitrary number of xxxApp iocBoot/Only one iocBoot iocxxxDirectory for each ioc … bin/install directory / …

5 5 1999/Ph 514: IOC Development Environment EPICS Install directories By default installed into / bin/Object and executables solaris/ mv167/ lib/Object libraries include/e.g. xxxRecord.h dbd/menu, recordtype, device, driver,etc db/record instances, templates, etc...

6 6 1999/Ph 514: IOC Development Environment EPICS gnumake u make (gnumake) at any level u  gnumake clean uninstall  gnumake Builds and installs everything that is not up to date u xxxApp  gnumake Same as issuing command in each subdirectory u xxxApp/xxxSrc u Builds in O. ; Installs in /  gnumake Builds and installs all out of date components u  Build only for specified architecture gnumake mv167  clean Remove all O. directories u xxxApp/xxxDb generates and installs database instance files + more u iocBoot/iocxxx Creates the cdCommands file

7 7 1999/Ph 514: IOC Development Environment EPICS config files u Files meant to be modified  CONFIG - Can override make variables CROSS_COMPILER_TARGET_ARCHS = mv167  CONFIG_APP Definitions for s referenced in RELEASE  RELEASE Location of other areas EPICS_BASE=/usr/local/epics/baseR3.13.1 u Other files  RULES.xxx Files containing make rules  *.pl Perl scripts used by make rules u Structure of shared areas u Just another u Everything intended for use by other s is installed.

8 8 1999/Ph 514: IOC Development Environment EPICS xxxApp/src files u base.dbd - definitions supplied by base u get from base or other and edit u menu, recordtype, device, driver taken from base  much support commented out include “menuGlobal.dbd”... #include “egRecord.dbd”... #device(ai,VME_IO,devAiXy566Se,”XYCOM-566 SE Scanned”) u baseLIBOBJS - objects supplied by base u get from base or other and edit u object modules for record, device, driver support u Like base.dbd much support commented out u changes made to this must match base.dbd

9 9 1999/Ph 514: IOC Development Environment EPICS base.dbd and baseLIBOBJS include "menuGlobal.dbd" include "menuConvert.dbd" include "aiRecord.dbd" #include "aaiRecord.dbd" include "aoRecord.dbd" #include "aaoRecord.dbd" device(ai,CONSTANT,devAiSoft,"Soft Channel") device(ai,CONSTANT,devAiSoftRaw,"Raw Soft Channel") #device(ai,VME_IO,devAiXy566Se,"XYCOM-566 SE Scanned") #driver(drvGpib) driver(drvBitBus) #driver(drvBb910) #LIBOBJS += $(EPICS_BASE_BIN)/aaiRecord.o #LIBOBJS += $(EPICS_BASE_BIN)/aaoRecord.o LIBOBJS += $(EPICS_BASE_BIN)/aiRecord.o LIBOBJS += $(EPICS_BASE_BIN)/aoRecord.o LIBOBJS += $(EPICS_BASE_BIN)/devAiSoft.o LIBOBJS += $(EPICS_BASE_BIN)/devAiSoftRaw.o #LIBOBJS += $(EPICS_BASE_BIN)/devAiXy566Se.o #LIBOBJS += $(EPICS_BASE_BIN)/drvBb910.o LIBOBJS += $(EPICS_BASE_BIN)/drvBitBus.o #LIBOBJS += $(EPICS_BASE_BIN)/drvGpib.o base.dbd baseLIBOBJS

10 10 1999/Ph 514: IOC Development Environment EPICS xxxApp/src continued u Makefile.Host RECTYPES += xxxRecord.h DBDEXPAND += xxxInclude.dbd DBDNAME = xxxApp.dbd u xxxInclude.dbd include “base.dbd” include “xxxRecord.dbd” device(xxx,CONSTANT,devXxxSoft,”Softchannel”) u Makefile.Vx LIBOBJS += xxxRecord.o LIBOBJS += sncExample.o include../baseLIBOBJS LIBNAME = xxxLib INSTALLS += iocCore seq PROD += xxx.o

11 11 1999/Ph 514: IOC Development Environment EPICS xxxApp/xxxDb/ Makefile.Host u databases installed into /db DB += xxx.db u Template files expanded on host u yyy.template has the format record(ai,”$(USER):aiExample$(NO)”){ … } u yyy.substitutions file yyy.template { {USER=“mrk”,NO=“1”} {USER=“mrk”,NO=“2”} } DB += yyy.db USES_TEMPLATE += yyy.template u Template files to be expanded at boot time via dbLoadTemplate() DB += zzz.template zzz.substitutions u Support for capfast generated files u Can also expand.dbd files

12 12 1999/Ph 514: IOC Development Environment EPICS iocBoot u iocBoot/Makefile Executes make in each subdirectory u iocBoot/iocxxx/Makefile Creates cdCommands. Make sure that ARCH = is defined correctly u cdCommands looks like startup=“ “ appbin=“ “ … u st.cmd looks like < cdCommands cd appbin ld < iocCore ld < xxxLib cd startup dbLoadDatabase(“../../dbd/xxxApp.dbd”) dbLoadRecords(“../../db/xxx.db”,”user=mrk”) iocInit

13 13 1999/Ph 514: IOC Development Environment EPICS makeBaseApp u Execute the commands cd ~/ioc mkdir example cd example /makeBaseApp.pl -t example example /makeBaseApp.pl -i -t example example The first command creates: / Makefile config/... exampleApp src/... Db/... The second command creates: /iocBoot Makefile iocexample/ … Each command can be issued multiple times u Look at example!!!

14 14 1999/Ph 514: IOC Development Environment EPICS Application Templates u makeBaseApp uses templates u base supplies the following /templates/makeBaseApp/top/ Makefile config exampleApp exampleBoot simpleApp simpleBoot u Application templates can be created. u /config/RELEASE contains TEMPLATE_TOP = u Templates are just like another


Download ppt "1 1999/Ph 514: IOC Development Environment EPICS IOC Development Environment Marty Kraimer APS."

Similar presentations


Ads by Google