From 000aaea550b72512d445c01f004b68b63d5c6873 Mon Sep 17 00:00:00 2001
From: Marty Kraimer 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. Remove any
- Remove any
-1) Include the registration support header files:
-
1) Include the registration support header files: Converting an EPICS R3.14.1 application to R3.14.2
Converting an EPICS R3.14.1 application to R3.14.2
+
-
This document describes how to convert a R3.14.1 application
-so that it builds with release R3.14.2. Gnumake clean uninstall
+
+
+
+Gnumake clean uninstall
-First do a "gnumake clean uninstall" in the application's
-root directory to remove all files created by earlier builds.
-
+ First do a "gnumake clean uninstall" in the application's root
+ directory to remove all files created by earlier builds.
+
+INSTALL_LOCATION_APP
- INSTALL_LOCATION_APP
-If your application is NOT being installed into $(TOP),
-move your INSTALL_LOCATION_APP definition to the configure/RELEASE file.
-
-
+ If your application is NOT being installed into $(TOP), move your
+ INSTALL_LOCATION_APP definition to the configure/RELEASE file.
Building db files from templates changed
-
-Now if the template needed to build <name>.db is not named <name>*.template
-add the line
+ Now if the template needed to build <name>.db is not named
+ <name>*.template add the line
+
-
-to the *Db/Makefile.
-
- <name>_template = <templatename>
-
-
-
-definitions from your <name>App/*Db/Makefile files;
-these definitions are no longer used.
-
-USES_TEMPLATE =
-
-
+
+ to the *Db/Makefile.
+
+ <name>_template = <templatename>
+
+
+ definitions from your <name>App/*Db/Makefile files; these definitions
+ are no longer used.
USES_TEMPLATE =
+ File base.dbd no longer needed
-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.
-
+ 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.
-
-Record support
-
-Add the following line after all existing #includes
+
+ Record support
-
+ Add the following line after all existing #includes
-The structure rset is now a typedef so change
-
-#include "epicsExport.h"
-
-
-
-to
-
-struct rset
-
-
-and add the following line after the "rset <recordname>RSET=" definition.
-
-rset
-
-
-
-epicsExportAddress(rset,xxxRSET);
-
-
+
+ The structure rset is now a typedef so change
+ #include "epicsExport.h"
+
+
+ to
+
+ struct rset
+
+
+ and add the following line after the "rset <recordname>RSET="
+ definition.
+
+ rset
+
+
+
epicsExportAddress(rset,xxxRSET);
+ Device support
-
-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 dset dev<devname> definition
+
+ #include "epicsExport.h"
+
+
+epicsExportAddress(dset,dev<devname>);
+ Driver support
-
-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>);
-
-
+
+ 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 changed
-
-Registration code for application specific functions, e.g. subroutine
-record init and process functions, has been changed as follows
-
-
-
-
-2) Include the export definitions header file after including all
-other header files:
+ Registration code for application specific functions, e.g. subroutine
+ record init and process functions, has been changed as follows
-
-#include "dbDefs.h"
-#include "registryFunction.h"
-
-
-
+
-#include "epicsExport.h"
-
-
+
+ 2) Include the export definitions header file after including all other
+ header files:
-#include "dbDefs.h"
+#include "registryFunction.h"
+
-
+
-static long mySubInit(subRecord *precord,processMethod process)
-static long mySubProcess(subRecord *precord)
-
-
+
+ 3) Make the application specific functions static functions, e.g.
-4) Define a registryFunctionRef array of the application specific
-functions to be registered, 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.
-5) Add a new function to do the registration of the registryFunctionRef
-array elements, e.g.
-
-
-static registryFunctionRef mySubRef[] = {
+
+
+
+};static registryFunctionRef mySubRef[] = {
{"mySubInit",(REGISTRYFUNCTION)mySubInit},
{"mySubProcess",(REGISTRYFUNCTION)mySubProcess}
-};
-
-
-
+ 6) Call the epicsExportRegistrar with the new registration function: e.g.
-6) Call the epicsExportRegistrar with the new registration function: e.g.
+
-void mySub(void)
+
+
+
+}void mySub(void)
{
registryFunctionRefAdd(mySubRef,NELEMENTS(mySubRef));
-}
-
-
+
+ 7) Remove the existing function lines in <appname>Include.dbd: e.g.
+ remove
-epicsExportRegistrar(mySub);
+
-
-
-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")
-
-
+
+ 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")
+ <name>App/src/Makefile changed and simplified
-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
+ 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
-
+
+
+
-
-
-
-
-
-
-
-
+
+
diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
index 39b2c11d1..bfec6e348 100644
--- a/documentation/RELEASE_NOTES.html
+++ b/documentation/RELEASE_NOTES.html
@@ -24,7 +24,8 @@ The good news is that the rules for support and ioc applications
are now greatly simplified. The bad news is that it does mean
changes for existing 3.14.1 applications. Please see:
-
+
-ca_DIR = $(EPICS_BASE_LIB)
-Com_DIR = $(EPICS_BASE_LIB)
-
-
+
+ 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
-2) Libraries from EPICS_BASE do not have to be specified individually.
+ <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.
-For HOST products and libraries specify the following
-<myiocprodorlib>_LIBS += $(EPICS_BASE_IOC_LIBS)
+
-
-
-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
+
+
-
-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)
-
-
+exampleIoc_LIBS += $(EPICS_BASE_IOC_LIBS)
+
+ PROD_IOC = example
+
+ example_LIBS += exampleIoc
+ example_LIBS += $(EPICS_BASE_IOC_LIBS)
-PROD_IOC = example
-example_LIBS += exampleIoc
-example_LIBS += $(EPICS_BASE_IOC_LIBS)
-
ConvertingR3.14.1AppsToR3.14.2
-for details.
+for details. If you are using the function DBD keyword it no +longer exists. Please read this conversion document for details.
Application Developer's Guide
The old chapter "New Feature's for 3.14" has been replaced by @@ -62,8 +63,8 @@ is processed (analagous to setting ADEL/MDEL=-1 for numeric record types).
epicsStdio and errlogPrintf
A new facility has been added to libCom described by epicsStdio.h. It contains the functions epicsSnprintf and epicsVsnprintf. -These are like the C99 functions snprintf and vsnprintf. -These are like printf except that thet accept a argument +These are like the C99 functions snprintf and vsnprintf, +which are like sprintf and vsprintf except that they accept a argument limiting the number of characters written.
The errlogPrintf facility has been modified to use this facility. Thus it is not longer subject to a possible buffer overflow.