diff --git a/documentation/ConvertingR3.14.1AppsToR3.14.2.html b/documentation/ConvertingR3.14.1AppsToR3.14.2.html new file mode 100644 index 000000000..1d589908f --- /dev/null +++ b/documentation/ConvertingR3.14.1AppsToR3.14.2.html @@ -0,0 +1,274 @@ +
+ + + + + + +
This document describes how to convert a R3.14.1 application
+so that it builds with release R3.14.2.
+First do a "gnumake clean uninstall" in the application's +root directory to remove all files created by earlier builds. ++ +
+If your application is NOT being installed into $(TOP), +move your INSTALL_LOCATION_APP definition to the configure/RELEASE file. ++ + +
+Now if the template needed to build <name>.db is not named <name>*.template +add the line + ++ + +++to the *Db/Makefile. ++ <name>_template = <templatename> ++Remove any +
++definitions from your <name>App/*Db/Makefile files; +these definitions are no longer used. ++USES_TEMPLATE = ++
+You now can add the line include "base.dbd" to your <appname>Include.dbd +file and remove the file <name>App/src/base.dbd from your src directory. +The base.dbd from R3.14.2 base/dbd will be included. However, if you only +want a subset of record definitions from base you should keep your base.dbd +file. ++ + +
+Add the following line after all existing #includes + ++ + +++ +The structure rset is now a typedef so change ++#include "epicsExport.h" ++++to ++struct rset+RSET={ ... + ++and add the following line after the "rset <recordname>RSET=" definition. ++rset+RSET={ ... + +++epicsExportAddress(rset,xxxRSET); ++
+Add the following line after all existing #includes ++ + +++and add the following line after the dset dev<devname> definition ++#include "epicsExport.h" +++++epicsExportAddress(dset,dev<devname>); ++
+Add the following line after all existing #includes ++and add the following line after the drvet dev<devname> definition ++#include "epicsExport.h" +
+epicsExportAddress(drvet,drv<devname>); ++ + + +
+Registration code for application specific functions, e.g. subroutine +record init and process functions, has been changed as follows + ++ ++1) Include the registration support header files: + + +
++ +2) Include the export definitions header file after including all +other header files: + ++#include "dbDefs.h" +#include "registryFunction.h" ++++ +3) Make the application specific functions static functions, e.g. + ++#include "epicsExport.h" ++++ +4) Define a registryFunctionRef array of the application specific +functions to be registered, e.g. + ++static long mySubInit(subRecord *precord,processMethod process) +static long mySubProcess(subRecord *precord) ++++ +5) Add a new function to do the registration of the registryFunctionRef +array elements, e.g. + ++static registryFunctionRef mySubRef[] = { + {"mySubInit",(REGISTRYFUNCTION)mySubInit}, + {"mySubProcess",(REGISTRYFUNCTION)mySubProcess} +}; ++++ +6) Call the epicsExportRegistrar with the new registration function: e.g. + ++void mySub(void) +{ + registryFunctionRefAdd(mySubRef,NELEMENTS(mySubRef)); +} ++++ +7) Remove the existing function lines in <appname>Include.dbd: e.g. +remove + ++epicsExportRegistrar(mySub); ++++ +8) Add a registrar statement to <name>Include.dbd with the new +registration function as parameter: e.g. +add + ++function("mySubInit") +function("mySubProcess") ++++ ++registrar("mySub") ++
+1) Libraries from support modules defined in configure/RELEASE +no longer need the <libname>_DIR definitions. You can remove lines like the +following from your src/Makefile + ++ + + + + + + +++ + +2) Libraries from EPICS_BASE do not have to be specified individually. + +For HOST products and libraries specify the following ++ca_DIR = $(EPICS_BASE_LIB) +Com_DIR = $(EPICS_BASE_LIB) ++++ +For IOC products and libraries specify the following ++<myhostprodorlib>_LIBS += $(EPICS_BASE_HOST_LIBS) ++++ +3) All record, device, and driver support must now exist in shared libraries. + +You will need to create an IOC library containing your application specific support. + ++<myiocprodorlib>_LIBS += $(EPICS_BASE_IOC_LIBS) ++++ +4) Add your new record, device, and driver support library to your ioc +product's libraries: e.g. + ++LIBRARY_IOC += exampleIoc + +exampleIoc_SRCS += xxxRecord.c +exampleIoc_SRCS += devXxxSoft.c +exampleIoc_SRCS += dbSubExample.c +exampleIoc_LIBS += $(EPICS_BASE_IOC_LIBS) +++++PROD_IOC = example + +example_LIBS += exampleIoc +example_LIBS += $(EPICS_BASE_IOC_LIBS) +