This document describes how to convert a R3.14.1 application so that it builds with release R3.14.2.
MAJOR CHANGE since 3.14.1
The base supplied record and device support are now build as regular libraries rather than as just object files. This allows simplified build ruiles. The changes do require changes to:
Please read the new chapter "Getting Started" of the Application Developer's Guide for more information about building support and ioc applications.
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 lineto 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 #includesThe structure rset is now a typedef so change#include "epicsExport.h"tostruct rsetRSET={ ... and add the following line after the "rset <recordname>RSET=" definition.rsetRSET={ ... epicsExportAddress(rset,xxxRSET);
Add the following line after all existing #includesand add the following line after the dset dev<devname> definition#include "epicsExport.h"epicsExportAddress(dset,dev<devname>);
Add the following line after all existing #includesand 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 follows1) 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. removeepicsExportRegistrar(mySub);8) Add a registrar statement to <name>Include.dbd with the new registration function as parameter: e.g. addfunction("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/Makefile2) Libraries from EPICS_BASE do not have to be specified individually. For HOST products and libraries specify the followingca_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)