diff --git a/configure/RULES.Db b/configure/RULES.Db index 7a504a19a..862f48088 100644 --- a/configure/RULES.Db +++ b/configure/RULES.Db @@ -276,7 +276,7 @@ dbInstalls: $(DB_INSTALLS) %_registerRecordDeviceDriver.cpp: %.dbd @$(RM) $@ - $(REGISTERRECORDDEVICEDRIVER) $< > $@ + $(REGISTERRECORDDEVICEDRIVER) $< $(basename $@) > $@ .PRECIOUS: %_registerRecordDeviceDriver.cpp diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index f98029b86..3dd73de02 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -18,6 +18,31 @@

Changes since 3.14.2

+

registerRecordDeviceDriver output subroutine renamed

+ +

The registration routine generated by the registerRecordDeviceDriver.pl +perl script now includes the name of the application, thus requiring a +one-line change to any IOC startup files produced with earlier R3.14 releases +of base. The actual name is taken from a second command line argument +supplied to the script by the modified make rules, and is derived from the +name of the fully expanded dbd file from which the necessary information is +extracted. The change needed to every startup script involves using this new +name in place of the old registerRecordDeviceDriver. Assuming +that your application's fully expanded dbd file is called +example.dbd you would modify the lines

+ +
+
dbLoadDatabase("dbd/example.dbd",0,0)
+registerRecordDeviceDriver(pdbbase)
+
+ +

to become

+ +
+
dbLoadDatabase("dbd/example.dbd",0,0)
+example_registerRecordDeviceDriver(pdbbase)
+
+

dbExpand -o outfile option

A commandline option -o has been added to the dbExpand diff --git a/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@Common b/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@Common index 821a24780..8ab524ded 100644 --- a/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@Common +++ b/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@Common @@ -5,7 +5,7 @@ ## Register all support components dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0) -registerRecordDeviceDriver(pdbbase) +_APPNAME__registerRecordDeviceDriver(pdbbase) ## Load record instances dbLoadRecords("../../db/dbExample1.db","user=_USER_Host") diff --git a/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@RTEMS b/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@RTEMS index 7381875ce..4eb832fed 100644 --- a/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@RTEMS +++ b/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@RTEMS @@ -5,7 +5,7 @@ ## Register all support components dbLoadDatabase("dbd/_APPNAME_.dbd",0,0) -registerRecordDeviceDriver(pdbbase) +_APPNAME__registerRecordDeviceDriver(pdbbase) ## Load record instances dbLoadRecords("db/dbExample1.db","user=_USER_") diff --git a/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@vxWorks b/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@vxWorks index 3d63d48d7..1152cf406 100644 --- a/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@vxWorks +++ b/src/makeBaseApp/top/exampleBoot/ioc/st.cmd@vxWorks @@ -19,7 +19,7 @@ ld < _APPNAME_.munch ## Register all support components cd top dbLoadDatabase("dbd/_APPNAME_.dbd",0,0) -registerRecordDeviceDriver(pdbbase) +_APPNAME__registerRecordDeviceDriver(pdbbase) ## Load record instances dbLoadRecords("db/dbExample1.db","user=_USER_") diff --git a/src/registry/registerRecordDeviceDriver.pl b/src/registry/registerRecordDeviceDriver.pl index 1967f87c3..77c84d2a6 100755 --- a/src/registry/registerRecordDeviceDriver.pl +++ b/src/registry/registerRecordDeviceDriver.pl @@ -10,7 +10,7 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- # in file LICENSE that is included with this distribution. #************************************************************************* -$file = $ARGV[0]; +($file, $subname) = @ARGV; $numberRecordType = 0; $numberDeviceSupport = 0; $numberDriverSupport = 0; @@ -157,7 +157,7 @@ if (@variables) { #Now actual registration code. print << "END" ; -int registerRecordDeviceDriver(DBBASE *pbase) +int $subname(DBBASE *pbase) { int i; @@ -230,10 +230,10 @@ static const iocshArg registerRecordDeviceDriverArg0 = static const iocshArg *registerRecordDeviceDriverArgs[1] = {®isterRecordDeviceDriverArg0}; static const iocshFuncDef registerRecordDeviceDriverFuncDef = - {"registerRecordDeviceDriver",1,registerRecordDeviceDriverArgs}; + {"$subname",1,registerRecordDeviceDriverArgs}; static void registerRecordDeviceDriverCallFunc(const iocshArgBuf *) { - registerRecordDeviceDriver(pdbbase); + $subname(pdbbase); } } // ext C