diff --git a/src/makeBaseApp/Makefile b/src/makeBaseApp/Makefile index 76907a97f..c7f89f8e1 100644 --- a/src/makeBaseApp/Makefile +++ b/src/makeBaseApp/Makefile @@ -23,7 +23,6 @@ TEMPLATES += top/iocApp/Makefile TEMPLATES += top/iocApp/Db/Makefile TEMPLATES += top/iocApp/src/Makefile TEMPLATES += top/iocApp/src/_APPNAME_Main.cpp -TEMPLATES += top/iocApp/src/sncExample.stt TEMPLATES += top/exampleApp/Makefile TEMPLATES += top/exampleApp/Db/Makefile diff --git a/src/makeBaseApp/top/exampleApp/src/Makefile b/src/makeBaseApp/top/exampleApp/src/Makefile index 672ed3cf1..243cd926f 100644 --- a/src/makeBaseApp/top/exampleApp/src/Makefile +++ b/src/makeBaseApp/top/exampleApp/src/Makefile @@ -48,7 +48,7 @@ _APPNAME__SRCS_DEFAULT += _APPNAME_Main.cpp _APPNAME__SRCS_vxWorks += -nil- # Add support from base/src/vxWorks if needed -_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary +#_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary # Link in the code from the support library _APPNAME__LIBS += _APPNAME_Support diff --git a/src/makeBaseApp/top/iocApp/src/Makefile b/src/makeBaseApp/top/iocApp/src/Makefile index 86f4a2d69..de6b93a5b 100644 --- a/src/makeBaseApp/top/iocApp/src/Makefile +++ b/src/makeBaseApp/top/iocApp/src/Makefile @@ -6,45 +6,34 @@ include $(TOP)/configure/CONFIG #============================= #============================= -# build an ioc application +# Build the IOC application PROD_IOC = _APPNAME_ - +# _APPNAME_.dbd will be created and installed DBD += _APPNAME_.dbd + # _APPNAME_.dbd will be made up from these files: _APPNAME__DBD += base.dbd -#include definitions for any other support applications needed + +# Include dbd files from all support applications: #_APPNAME__DBD += xxx.dbd -# _registerRecordDeviceDriver.cpp will be created from .dbd +# Add all the support libraries needed by this IOC +#_APPNAME__LIBS += xxx + +# _APPNAME__registerRecordDeviceDriver.cpp derives from _APPNAME_.dbd _APPNAME__SRCS += _APPNAME__registerRecordDeviceDriver.cpp + +# Build the main IOC entry point on workstation OSs. _APPNAME__SRCS_DEFAULT += _APPNAME_Main.cpp _APPNAME__SRCS_vxWorks += -nil- -#The following adds support from base/src/vxWorks -_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary - -#add a definition for each support application used by this application -#_APPNAME__LIBS += xxx - -#NOTES: -# 1)It is not possible to build sncExample both as a component of _APPNAME_ -# and standalone. You must choose only one. -# 2)To build sncExample SNCSEQ must be defined in /configure/RELEASE - -#The following builds sncExample as a component of _APPNAME_ -#_APPNAME__SRCS += sncExample.stt -#_APPNAME__LIBS += seq pv +# Add support from base/src/vxWorks if needed +#_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary +# Finally link to the EPICS Base libraries _APPNAME__LIBS += $(EPICS_BASE_IOC_LIBS) -#The following builds sncExample as a standalone application -#PROD_HOST += sncExample -#sncExample_SNCFLAGS += +m -#sncExample_SRCS += sncExample.stt -#sncExample_LIBS += seq pv -#sncExample_LIBS += $(EPICS_BASE_HOST_LIBS) - #=========================== include $(TOP)/configure/RULES diff --git a/src/makeBaseApp/top/iocApp/src/_APPNAME_Main.cpp b/src/makeBaseApp/top/iocApp/src/_APPNAME_Main.cpp index 319244890..ae0ecb68a 100644 --- a/src/makeBaseApp/top/iocApp/src/_APPNAME_Main.cpp +++ b/src/makeBaseApp/top/iocApp/src/_APPNAME_Main.cpp @@ -7,6 +7,7 @@ #include #include +#include "epicsExit.h" #include "epicsThread.h" #include "iocsh.h" @@ -17,5 +18,6 @@ int main(int argc,char *argv[]) epicsThreadSleep(.2); } iocsh(NULL); + epicsExit(0); return(0); } diff --git a/src/makeBaseApp/top/iocApp/src/sncExample.stt b/src/makeBaseApp/top/iocApp/src/sncExample.stt deleted file mode 100644 index 30fee6cda..000000000 --- a/src/makeBaseApp/top/iocApp/src/sncExample.stt +++ /dev/null @@ -1,28 +0,0 @@ -program sncExample -float v; -assign v to "{user}:xxxExample"; -monitor v; - -ss ss1 -{ - state low - { - when(v>5.0) - { - printf("changing to high\n"); - } state high - when(delay(.1)) - { - } state low - } - state high - { - when(v<=5.0) - { - printf("changing to low\n"); - } state low - when(delay(.1)) - { - } state high - } -} diff --git a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Common b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Common index d67da1093..68cb61934 100644 --- a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Common +++ b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Common @@ -8,14 +8,14 @@ cd ${TOP} ## Register all support components -dbLoadDatabase("dbd/_APPNAME_.dbd",0,0) -_CSAFEAPPNAME__registerRecordDeviceDriver(pdbbase) +dbLoadDatabase "dbd/_APPNAME_.dbd" +_CSAFEAPPNAME__registerRecordDeviceDriver pdbbase ## Load record instances #dbLoadRecords("db/xxx.db","user=_USER_Host") cd ${TOP}/iocBoot/${IOC} -iocInit() +iocInit ## Start any sequence programs #seq sncxxx,"user=_USER_Host" diff --git a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@RTEMS b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@RTEMS index 28046bba7..8928216c0 100644 --- a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@RTEMS +++ b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@RTEMS @@ -6,13 +6,14 @@ #< envPaths ## Register all support components -dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0) -_CSAFEAPPNAME__registerRecordDeviceDriver(pdbbase) +dbLoadDatabase "dbd/_APPNAME_.dbd" +_CSAFEAPPNAME__registerRecordDeviceDriver pdbbase ## Load record instances -dbLoadRecords("../../db/_APPNAME_.db","user=_USER_") +#dbLoadTemplate "db/_APPNAME_.substitutions" +#dbLoadRecords "db/_APPNAME_.db", "user=_USER_" -iocInit() +iocInit ## Start any sequence programs -#seq snc_APPNAME_,"user=_USER_" +#seq sncxxx, "user=_USER_" diff --git a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@vxWorks b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@vxWorks index c218339a6..d97e515f4 100644 --- a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@vxWorks +++ b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@vxWorks @@ -8,22 +8,22 @@ #< ../nfsCommands cd topbin + ## You may have to change _APPNAME_ to something else ## everywhere it appears in this file - ld < _APPNAME_.munch ## Register all support components cd top -dbLoadDatabase("dbd/_APPNAME_.dbd",0,0) -_CSAFEAPPNAME__registerRecordDeviceDriver(pdbbase) +dbLoadDatabase "dbd/_APPNAME_.dbd" +_CSAFEAPPNAME__registerRecordDeviceDriver pdbbase ## Load record instances -#dbLoadRecords("db/_APPNAME_.db","macro=value") -#dbLoadTemplate("db/_APPNAME_.substitutions") +#dbLoadTemplate "db/_APPNAME_.substitutions" +#dbLoadRecords "db/_APPNAME_.db", "user=_USER_" cd startup -iocInit() +iocInit ## Start any sequence programs -#seq &sncExample,"user=_USER_" +#seq &sncxxx, "user=_USER_"