From 803f0bccbb45fdb1b66f178ca7dac560499f4fca Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 22 Jul 2003 19:48:35 +0000 Subject: [PATCH] Name the registerRecordDeviceDriver subroutine after the dbd file it was created from; allows applications to be split up and loaded separately. --- src/makeBaseApp/top/iocBoot/ioc/st.cmd@Common | 16 +++++---- src/makeBaseApp/top/iocBoot/ioc/st.cmd@RTEMS | 16 +++++---- .../top/iocBoot/ioc/st.cmd@vxWorks | 36 ++++++++++--------- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Common b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Common index c88ea0018..7b4deae9a 100644 --- a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Common +++ b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@Common @@ -1,14 +1,16 @@ #!../../bin/_ARCH_/_APPNAME_ -## The names of the binary above and .dbd file below will be incorrect -## unless you used the same names for the ioc and the app directory. -# create and register all record/device/driver/registrar support -dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0) -registerRecordDeviceDriver(pdbbase) -## Load record definitions as necessary like this: +## You may have to change _APPNAME_ to something else +## everywhere it appears in this file + +## Register all support components +dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0) +_APPNAME__registerRecordDeviceDriver(pdbbase) + +## Load record instances #dbLoadRecords("../../db/xxx.db","user=_USER_Host") iocInit() -## To start a local sequence program: +## 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 6a1dfa408..f0b1d01ae 100644 --- a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@RTEMS +++ b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@RTEMS @@ -1,12 +1,16 @@ -# Simple startup script +## Example RTEMS startup script -# You may have to change _APPNAME_ to something else -# everywhere it appears in this file +## You may have to change _APPNAME_ to something else +## everywhere it appears in this file -# create and register all record/device/driver/registrar support -dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0) -registerRecordDeviceDriver(pdbbase) +## Register all support components +dbLoadDatabase("dbd/_APPNAME_.dbd",0,0) +_APPNAME__registerRecordDeviceDriver(pdbbase) +## Load record instances dbLoadRecords("../../db/_APPNAME_.db","user=_USER_") + iocInit() + +## Start any sequence programs #seq snc_APPNAME_,"user=_USER_" diff --git a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@vxWorks b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@vxWorks index 992122151..0ebceec12 100644 --- a/src/makeBaseApp/top/iocBoot/ioc/st.cmd@vxWorks +++ b/src/makeBaseApp/top/iocBoot/ioc/st.cmd@vxWorks @@ -1,25 +1,29 @@ -# Example vxWorks startup file -#Following must be added for many board support packages -#cd _TOP_/iocBoot/_IOC_ +## Example vxWorks startup file + +## The following is needed if your board support package doesn't at boot time +## automatically cd to the directory containing its startup script +#cd "_TOP_/iocBoot/_IOC_" < cdCommands - #< ../nfsCommands cd topbin -# You may have to change _APPNAME_ to something else -# everywhere it appears in this file +## You may have to change _APPNAME_ to something else +## everywhere it appears in this file -#ld < _APPNAME_Lib +ld < _APPNAME_.munch + +## Register all support components +cd top +dbLoadDatabase("dbd/_APPNAME_.dbd",0,0) +_APPNAME__registerRecordDeviceDriver(pdbbase) + +## Load record instances +#dbLoadRecords("db/_APPNAME_.db","macro=value") +#dbLoadTemplate("db/_APPNAME_.substitutions") cd startup -# create all record/device/driver/registrar support -dbLoadDatabase("../../dbd/_APPNAME_.dbd") -registerRecordDeviceDriver(pdbbase) +iocInit() -#load record instances -#dbLoadRecords("../../db/_APPNAME_.db") -#dbLoadTemplate("../../db/_APPNAME_.substitutions") - -iocInit -#seq & +## Start any sequence programs +#seq &sncExample,"user=_USER_"