From 7284b808294da2c0149974e217c44211e162d3b6 Mon Sep 17 00:00:00 2001
From: Marty Kraimer First do a gnumake clean uninstall in the application's root directory to
+remove all files created by earlier builds. Copy definitions of external modules excluding EPICS_BASE and
+TEMPLATES_TOP from old application RELEASE file. SNCSEQ =<full path to seq module top> Change "include $(TOP)/config/CONFIG_APP" to "include
+$(TOP)/configure/CONFIG" Change " include $(TOP)/config/RULES_DIRS" to "include
+$(TOP)/configure/RULES_DIRS" Remove existing Makefile Change "TOP=../../.." to "TOP=../.." Change "include $(TOP)/config/CONFIG_APP" to "include
+$(TOP)/configure/CONFIG" Change "include $(TOP)/config/RULES.Db" to "include
+$(TOP)/configure/RULES" Place all definitions between the include lines. Place any rules after the last include line. This is the hardest step. The definitions in Makefile.Host and Makefile.Vx
+must be manually converted to the new configure definitions. First replace Makefile with a template Makefile from base. This new Make file has comments explaining how to build the various host
+and ioc products. Lets consider some examples Makefile.Host contains definitions like: In Makefile these are: Makefile.Host (or perhaps Makefile.Vx) contains: In Makefile this is: Makefile.Host (or perhaps Makefile.Vx) contains: In Makefile this is: NOTES: Change exampleApp.dbd to example.dbd in all st.cmd files. Also
+ this definition assumes that file exampleInclude.dbd exists. Makefile.Vx contains statements like: In Makefile these become: After these changes are made the following files are no longer needed:
+baseLIBOBS, Makefile.Host, and Makefile.Vx Change " include $(TOP)/config/CONFIG_APP" to "include
+$(TOP)/configure/CONFIG" You can remove the newly created exampleApp directory now. Remove the line "DIRS += $(wildcard *ioc*" Change "include $(TOP)/config/RULES.iocBoot" to "include
+$(TOP)/configure/RULES.iocBoot" Change "include $(TOP)/config/CONFIG_APP" to "include
+$(TOP)/configure/CONFIG" Change include ARCH = <old arch specification e.g. mv167> Change include $(TOP)/config/RULES_DIRS
- to "include ARCH = <new arch specification e.g.
+vxWorks-68040>" Change TOP=../../..
- Change include $(TOP)/config/CONFIG_APP
- Change include $(TOP)/config/RULES.Db
- Place all definitions between the include lines.
- Place any rules after the last include line. Change "include $(TOP)/config/RULES.ioc" to "include
+$(TOP)/configure/RULES.ioc" If it exists remove the line Change TOP=../../..
- Change include $(TOP)/config/CONFIG_APP
- Change include $(TOP)/config/RULES.Host
- Change PROD_LIBS = <name>
- Change library name Db to dbStaticHost.
- Change USER_DBDFLAGS
- Change RECTYPES += xxxRecord.h
- Change DBDNAME = <name>App.dbd
- Remove all DBDEXPAND lines.
- Change PROD = <prodname>
- Change SRCS.c += <name>
- Add the contents of Makefile.Vx to Makefile removing the include lines
-and the TOP definition. buildInstall: cdCommands Remove line -include ../baseLIBOBJS
- Remove line INSTALLS = iocCore seq
- Change all SRCS.c += ../<name>.c lines
- Change all *OBJS += <name>.o
-lines
- Remove any duplicate prodname>_SRCS definitions.
- Change LIBOBJS += <seq_program_name>.o
-lines
- Add the lines
- #The following adds support from base/src/vxWorks
- #<name>_LIBS += seq
- <name>_LIBS += recIoc
- Place all macro definitions between the include lines.
- Place any rules after the last include line.
- Remove the file Makefile.Vx. Remove the lines Remove the line DIRS += $(wildcard *ioc*)
- Change include $(TOP)/config/RULES.iocBoot
- Change "ld < <libname>Lib" to "ld <
+<libname>.munch" Change the statement: Change include ARCH = <old arch specification e.g. mv167>
- Add the following macro definition
- Place all macro definitions between the include lines.
- Change include $(TOP)/config/RULES.ioc
- If it exists, remove the line
- Change load statements for db and dbd files from
- dbLoadDatabase("../../dbd/exampleApp.dbd") If any source file makes calls to recGbl routines make sure it has "#include "recGbl.h". If it doesn't the
+compiler will issue warning messages and the ioc may issue the message:
+"undefined symbol: _recGblSetSevr". For example add The steppermotor, scan, and pid records are no longer in base. If these
+records are not used in your application, comment out references to them in
+base.dbd. If these record types are used at your site, they should be
+downloaded and built with base R3.14 by your EPICS administrator. To update
+the R3.14 location of these record types in your application you must add
+appropriate module definitions to your application's config/RELEASE file and
+change the LIBOBJS definitions. to config/RELEASE.
- For example add from baseLIBOBJS, and add PID=<full path to modules directory>/pid to config/RELEASE. LIBOBJS += $(EPICS_BASE_BIN)/pidRecord.o from baseLIBOBJS, and add LIBOBJS += $(PID_BIN)/pidRecord.o You should consider changing any existing old steppermotor records to the
+new EPICS motor record module supported by Beamline Controls and Data
+Acquisition at APS. recDynLink.o and devPtSoft.o are no longer in EPICS base and now exist as
+separate EPICS modules.You must now add the appropriate module full path
+definitions to your application config/RELEASE file, and change
+LIBOBJS location definition $(EPICS_BASE_BIN) to the module
+definition bin directory in your application src directory files. See
+"Hardware support changes" below for instructions. All hardware support (dev, drv and dbd files) except soft support has been
+unbundled from base R3.14. This support includes the files symb.dbd,
drvHp1404a.o, drvEpvxiMsg.o, and drvEpvxi.o. If these are not used by your
-application, comment out references to them in base.dbd and baseLIBOBJS.
-Converting an EPICS R3.13 application to R3.14.0.beta2
Converting an EPICS R3.13 application to R3.14.0.beta2
+
-
This document describes how to convert a R3.13 vxWorks application
-so that it builds with release R3.14.0beta2. It describes procedures
-such that:
+
+This document describes how to convert a R3.13 vxWorks application so that it
+builds with release R3.14.0beta2. It describes procedures such that:
-
+
+
+Gnumake clean uninstall
+
+Create a new R3.14 application
+mkdir <top>
+cd <top>
+<full path to 3.14 base>/bin/<host_arch>/makeBaseApp.pl -t example junk
+/bin/rm -fr junkApp
+
+Copy all *App and iocBoot directories and files to the new <top>
+directory
+cd <oldtop>
+find *App iocBoot -print | cpio -pvmd <fullpath name to new top>
+
+Modify <top>/configure/RELEASE
+
+
+If sequence programs (*.st or *.stt files) exist in your application, add the
+SNCSEQ location definition for the R3.14 seq external moduleModify the Makefiles in <top>/*App directories.
+
+Modify the Makefiles in <top>/*App/*Db directories.
+
+
+Rename Makefile.Host to Makefile
+Modify Makefile as follows:Modify the Makefiles in <top>/*App/src directories.
+
+rm Makefile
+cp <base>/templates/makeBaseApp/top/exampleApp/src/Makefile .
+
+
-
-PROD += caExample
+caExample_SRCS += caExample.c
+
+ PROD_HOST += caExample
+caExample_SRCS += caExample.c
+caExample_LIBS += ca
+caExample_LIBS += Com
+
+ RECTYPES += xxxRecord.h
+
+ DBDINC += xxxRecord
+
+ DBDEXPAND = exampleInclude.dbd
+DBDNAME = exampleApp.dbd
+
+ DBD += example.dbd
+
+ SRCS.c += ../xxxRecord.c
+SRCS.c += ../devXxxSoft.c
+
+LIBOBJS += xxxRecord.o
+LIBOBJS += devXxxSoft.o
+LIBOBJS += sncExample.o
+
+include ../baseLIBOBJS
+
+LIBNAME = exampleLib
+INSTALLS += iocCore seq
+
+ PROD_IOC_vxWorks = example
+example_SRCS += xxxRecord.c
+example_SRCS += devXxxSoft.c
+example_SRSC += sncExample.stt
+example_SRCS += example_registerRecordDeviceDriver.cpp
+example_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
+
+#The following are for sequence programs
+example_LIBS += seq
+example_LIBS += pv
+seq_DIR = $(SNCSEQ_LIB)
+pv_DIR = $(SNCSEQ_LIB)
+
+example_LIBS += recIoc
+example_LIBS += softDevIoc
+example_LIBS += testDevIoc
+example_LIBS += iocsh
+example_LIBS += miscIoc
+example_LIBS += rsrvIoc
+example_LIBS += dbtoolsIoc
+example_LIBS += asIoc
+example_LIBS += dbIoc
+example_LIBS += registryIoc
+example_LIBS += dbStaticIoc
+example_LIBS += ca
+example_LIBS += Com
+
+
-Gnumake clean uninstall
+First do a gnumake clean uninstall in the application's root
-directory to remove all files created by earlier builds.
+Modify the Makefiles in <top>/iocBoot directory.
-
-Create a new R3.14 application
+mkdir <top>
-
+
cd <top>
-
<full path to R3.14.0beta2 base>/bin/<host_arch>/makeBaseApp.pl
--t example example
-
-Copy all *App and iocBoot directories and files to the new <top> directory
+cd <oldtop>
-
+
find *App iocBoot -print | cpio -pvmd <fullpath name to new
-top>Modify the Makefiles in <top>/iocBoot/ioc* directories.
-
-Modify <top>/configure/RELEASE
+Copy definitions of external modules excluding EPICS_BASE and
-TEMPLATES_TOP from old application RELEASE file.
-
+
If sequence programs (*.st or *.stt files) exist in your application,
-add the SNCSEQ location definition for the R3.14 seq external module
-SNCSEQ =<full path to seq module top>
-The R3.14 seq module must exist and be built with EPICS base R3.14.0beta2.
-Modify the Makefiles in <top>/*App directories.
+Change include $(TOP)/config/CONFIG_APP
-
+
to include $(TOP)/configure/CONFIG
-
to include $(TOP)/configure/RULES_DIRS
-Modify the Makefiles in <top>/*App/*Db directories.
+Remove existing Makefile
-
+
Rename Makefile.Host to Makefile
-
Modify Makefile as follows:
-
to TOP=../..
-
to include $(TOP)/configure/CONFIG
-
to include $(TOP)/configure/RULES
-
-Modify the Makefiles in <top>/*App/src directories.
+Remove existing Makefile
-
+
Rename Makefile.Host to Makefile
-
Modify Makefile as follows:
-
to TOP=../..
-
to include $(TOP)/configure/CONFIG
-
to include $(TOP)/configure/RULES
-
to <prod name>_LIBS = dbStaticHost
-
where <prod name> is a specified product to be built.
-
Change PROD_LIBS = Db
-
to <prodname>_LIBS += dbStaticHost
-
and Db_DIR = $(EPICS_BASE_LIB)
-
to dbStaticHost_DIR = $(EPICS_BASE_LIB)
-
to USR_DBDFLAGS
-
to DBDINC += xxxRecord
-
to DBD += <name>.dbd
-
to PROD_HOST = <prodname>
-
to <prodname>_SRCS += <name>
-
or <libname>_SRCS += <name>
-Change LIBNAME = <libname>Lib
-
+
to PROD_vxWorks = <libname>
-
to <prodname>_SRCS += <name>.c
-
if the source files exist in the current directory.
-
to <prodname>_SRCS += <name>.c
-
or <prodname>_SRCS += <name>.cc
-
if the c/c++ source files exist in the current directory.
-
to <prodname>_SRCS += <seq_program_name>.stt
-
or <prodname>_SRCS += <seq_program_name>.st
-# <name>_registerRecordDeviceDriver.cpp will be created
-from <name>.dbd
-
-where <name> is the name in the PROD_vxWorks
-definition, and uncomment the first four lines if you have sequence programs
-(.st or .stt files) in the current directory.
-
<name>_SRCS += <name>_registerRecordDeviceDriver.cpp
-
<name>_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
-
#<name>_LIBS += pv
-
#seq_DIR = $(SNCSEQ_LIB)
-
#pv_DIR = $(SNCSEQ_LIB)
-
<name>_LIBS += softDevIoc
-
<name>_LIBS += testDevIoc
-
<name>_LIBS += iocsh
-
<name>_LIBS += miscIoc
-
<name>_LIBS += rsrvIoc
-
<name>_LIBS += dbtoolsIoc
-
<name>_LIBS += asIoc
-
<name>_LIBS += dbIoc
-
<name>_LIBS += registryIoc
-
<name>_LIBS += dbStaticIoc
-
<name>_LIBS += ca
-
<name>_LIBS += ComModify st.cmd in <top>/iocBoot/ioc* directories.
-
-Modify the Makefiles in <top>/iocBoot directory.
+ld < seq
+ld < iocCore
-Change include $(TOP)/config/CONFIG_APP
-
+
to include $(TOP)/configure/CONFIG
-
to include $(TOP)/configure/RULES.iocBoot
-Modify the Makefiles in <top>/iocBoot/ioc* directories.
+Change include $(TOP)/config/CONFIG_APP
-
-
-
to include $(TOP)/configure/CONFIG
-
to include ARCH = <new arch specificatio
-e.g. vxWorks-68040>
-
TARGETS = cdCommands
-
to include $(TOP)/configure/RULES.ioc
-
buildInstall: cdCommands
-
-Modify st.cmd in <top>/iocBoot/ioc* directories.
-
-Remove the lines
-
-
-
+
-
-Change ld < <libname>Lib
-ld < seq
-
-ld < iocCore
-
to ld < <libname>.munch
-cd startup
-
+
dbLoadDatabase("../../dbd/<name>App.dbd")
+cd top
-
-Add the following line immediately after the dbLoadDatabase lines.
-
dbLoadDatabase("dbd/<name>.dbd")
-
registerRecordDeviceDriver(pdbbase)
-Change all
-dbLoadRecords("../../db/<name>.db)
-lines to
-dbLoadRecords("db/<name>.db)
-
-
dbLoadDatabase("../../dbd/<name>.dbd")
+registerRecordDeviceDriver(pdbbase)
-
-recGbl calls
+recGbl calls
-You will need to add the line "#include "recGbl.h" to
-any source files that have recGbl* calls so that the file will compile
-without "implicit declaration of function" warnings and the library will
-load in the ioc without "undefined symbol: _recGblSetSevr" errors.
+
-Record support changes
+Record support changes
-The steppermotor, scan, and pid records are no longer in base.
-If these records are not used in your application, comment out references
-to them in base.dbd. If these record types are used at your site, they
-should be downloaded and built with base R3.14 by your EPICS administrator.
-To update the R3.14 location of these record types in your application
-you must add appropriate module definitions to your application's
-config/RELEASE file and change the LIBOBJS definitions.
-
+ PID=<full
-path to modules directory>/pid
-
+
Remove LIBOBJS
-+= $(EPICS_BASE_BIN)/pidRecord.o
-
+
-
+LIBOBJS += $(PID_BIN)/pidRecord.o
-to your application src/Makefile.
+RemoveYou should consider changing any existing old steppermotor
-records to the new EPICS motor record module supported by Beamline
-Controls and Data Acquisition at APS.
+
-RecDynLink.o and devPtSoft changes
+recDynLink.o and devPtSoft.o are no longer in EPICS base and
-now exist as separate EPICS modules. If these are not used in your application,
-comment out references to them in base.dbd and baseLIBOBJS. If they are
-used, you must now add the appropriate module full path definitions to
-your application config/RELEASE file, and change
-LIBOBJS location
-definition $(EPICS_BASE_BIN) to the module definition bin directory
-in your application src directory files. See "Hardware support changes"
-below for instructions.
+
-
-Hardware support changes
+All hardware support (dev, drv and dbd files) except soft support
-has been unbundled from base R3.14. This support includes the files symb.dbd,
+
+application, comment out references to them in base.dbd.RecDynLink.o and devPtSoft changes
+
+Hardware support changes
+
+
Hardware support now exists as separate EPICS modules. The -hardware support for your site should be downloaded and built with base -R3.14 by your EPICS administrator. You must now add the appropriate module -full path definitions to your application config/RELEASE file, and change -LIBOBJS -location from $(EPICS_BASE_BIN) to the module bin directory -in your application src directory files. -+For example, remove
Hardware support now exists as separate EPICS modules. The hardware +support for your site should be downloaded and built with base R3.14 by your +EPICS administrator. You must now add the appropriate module full path +definitions to your application config/RELEASE file, and change +LIBOBJS location from $(EPICS_BASE_BIN) to the module bin +directory in your application src directory files.
-LIBOBJS+=$(EPICS_BASE_BIN)/symb+
For example, remove
-from baseLIBOBJS and add+
LIBOBJS+=$(EPICS_BASE_BIN)/symb
-LIBOBJS+=$(SYMB_BIN)/symb+
from baseLIBOBJS and add
-to your application src/Makefile, -+
and add the line
LIBOBJS+=$(SYMB_BIN)/symb
--+SYMB=<full path definition for the built module SYMB>-
to your application src/Makefile,
+and add the line
into your application config/RELEASE file .+
SYMB=<full path definition for the built module SYMB>
-into your application config/RELEASE file .
-The host tool dbLoadTemplate has been replace by a new EPICS -extension, msi, which should be downloaded and built with base R3.14 by -your EPICS administrator. dbLoadTemplate is still supported on iocs. -If, in your application, db files are created from template and substitution -files you should must have the msi executable in your path.+
-++The host tool dbLoadTemplate has been replace by a new EPICS extension, +msi, which should be downloaded and built with base R3.14 by your EPICS +administrator. dbLoadTemplate is still supported on iocs. If, in your +application, db files are created from template and substitution files you +should add the definition
-- --
EPICS_EXTENSIONS=<full path name to epics extensions +directory>
-to your application config/RELEASE file.
+