EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: record support not found
From: Eric Bjorklund <[email protected]>
To: EPICS tech-talk <[email protected]>
Date: Wed, 1 Sep 2010 18:56:51 -0600
Hello Wang Lin,

Well, it is clear that you are successfully loading the event generator driver code, otherwise you would not be able to call the EgConfigure function.  However, it also appears that the driver and device support entry tables for the event generator code are not being registered -- which is puzzling.  

I note that you are loading both mrfEgLib.munch and mrfErLib.munch -- which are each complete stand-alone EPICS applications -- and calling each of their registration routines.  I'm wondering if maybe the second registration routine (mrfEr_registerRecordDeviceDriver) is overriding or obscuring the registrations done by the first routine (mrfEg_registerRecordDeviceDriver).  Or possibly it is the load-time initializations in mrfEgLIb.munch and mrfErLib.munch.

There is a simple way to test this hypothesis.  Try reversing the order of the "registerRecordDeviceDriver" calls (and also maybe the order of the loads).  If my hypothesis is correct, then the event generator initialization should work and the event receiver initialization should fail.

Either way,  I would recommend building a single .munch file for your test IOC using the mrfEg, mrfEr, and mrfCommon libraries.  The Makefile for the IOC would have lines like:

=============================

PROD_IOC = timing

DBD += timing.dbd
# timing.dbd will be made up from these files:
timing_DBD += mrfEg.dbd
timing_DBD += mrfEr.dbd

# timing_registerRecordDeviceDriver.cpp will be created from timing.dbd
timing_SRCS += timingDev_registerRecordDeviceDriver.cpp
timing_SRCS_DEFAULT += timingMain.cpp

#add a definition for each support application used by this application
timing_LIBS += mrfEg
timing_LIBS += mrfEr
timing_LIBS += mrfCommon

=============================

Where timingMain.cpp is the code that is automatically generated when makeBaseApp.pl creates an IOC directory.

Then in your startup file replace the two loads with:

ld < bin/vxWorks-ppc604_long/timing.munch

and replace the two "register" calls with:

timing_registerRecordDeviceDriver(pdbbase)


Hopefully, this will work better for you.

Regards,

-Eric Bjorklund.

On Aug 30, 2010, at 2:07 AM, çæ wrote:

Hi All,
I am doing an experiment about global event timing system with the source code from this websitehttp://epics.svn.sourceforge.net/viewvc/epics/applications/trunk/mrfEventSystem/ ,my target is mvme5100 and server is RHEL4 with a vxWorks5.5.1 cross-compiler environment,the hardware is Event Generator 230 and Event Receiver 230.First I want to use mrfApp application to achieve the basic function of the timing system,but when loading the startup script,errors occur.It seems that he record/device support for EVG can't be recognized,while the supports for EVR are all right. 
 
The error information is :
-> </home/wanglin/timingApp/iocBoot/iocmrf/st.cmd
## 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 "/home/wanglin/timingApp/iocBoot/iocmrf"
 
#< cdCommands
#< ../nfsCommands
 
cd "/home/wanglin/timingApp"
value = 0 = 0x0
## You may have to change mrf to something else
## everywhere it appears in this file
 
ld < bin/vxWorks-ppc604_long/mrfEgLib.munch
sysAtReboot not found. epicsExit will not be called by reboot.
value = 518713200 = 0x1eeaef70
ld < bin/vxWorks-ppc604_long/mrfErLib.munch
sysAtReboot not found. epicsExit will not be called by reboot.
value = 516383168 = 0x1ec761c0
rebootHookAdd (epicsExitCallAtExits)
value = 0 = 0x0
 
## This drvTS initializer is needed if the IOC has a hardware event system
#TSinit
 
## Register all support components
dbLoadDatabase("dbd/mrfEg.dbd")
value = 0 = 0x0
dbLoadDatabase("dbd/mrfEr.dbd")
value = 0 = 0x0
#dbLoadDatabase("dbd/mrfbase.dbd")
 
mrfEg_registerRecordDeviceDriver(pdbbase)
value = 0 = 0x0
mrfEr_registerRecordDeviceDriver(pdbbase)
value = 0 = 0x0
 
## Load record
 
## Set this to see messages from mySub
#mySubDebug = 1
 
dbLoadRecords("db/csnsEvg.db","SUBSYS=timing, DEVICE=test, CardNo=3")
value = 0 = 0x0
dbLoadRecords("db/csnsEvr.db", "SUBSYS=timing, DEVICE=test, No=0, PulseWidth=200
")
value = 0 = 0x0
#dbLoadRecords("db/dbExample2.db","user=epics,no=1,scan=1 second")
#dbLoadRecords("db/dbExample2.db","user=epics,no=2,scan=2 second")
#dbLoadRecords("db/dbExample2.db","user=epics,no=3,scan=5 second")
 
EgConfigure(0, 3, 0x280000)
value = 0 = 0x0
ErConfigureVME(0, 5, 0x300000, 0x62, 4)
value = 0 = 0x0
 
iocInit()
Starting iocInit
############################################################################
###  EPICS IOC CORE built on Aug 15 2010
###  EPICS R3.14.8.2 $R3-14-8-2$ $2006/01/06 15:55:13$
############################################################################
iocInit: driver drvMrf200Eg not found
iocInit record support for eg not found
iocInit record support for egevent not found
device support devEg not found
device support devEgEvent not found
missing record support entry table PV: timing:test:eg dbProcess
missing record support entry table PV: timing:test:egEvt:gunT dbProcess
missing record support entry table PV: timing:test:egEvt:ram0 dbProcess

iocInit: All initialization complete
value = 0 = 0x0
 
## Start any sequence programs
#seq &sncExample,"user=wanglin"
-> iocClockSyncWithNTPserver: sntpcTimeGet errno = 0x710003
 
-> dbl
timing:test:eg
timing:test:egEvt:gunT
timing:test:egEvt:ram0
timing:test:er
timing:test:erEvt:bkt0
timing:test:erEvt:gunT
timing:test:erEvt:kck
timing:test:erEvt:kly
timing:test:erEvt:ram0
value = 0 = 0x0
->
 
 
 
 
The Makefile in mrfApp/src/ is :
#------------------------------------------------------------------------------
# $(TIMING)/mrfApp/src/Makefile
#
# Author:  Eric Bjorklund
# Date:    19 December 2005
#
#------------------------------------------------------------------------------
# This file contains the EPICS make rules and definitions for making and
# installing the driver support modules for the Micro-Research Finland
# Series 200 event receiver module.
#
#------------------------------------------------------------------------------
# Modification History:
#
# 19 Dec 2005   Bjo     Original Release
# 21 Aug 2006   Saa     Changes to build on RTEMS too.
# 30 Aug 2006   Bjo     Add host-side fractional synthesizer routines.
#
#------------------------------------------------------------------------------
 
#---------------------
# Set up the Environment
#
TOP = ../..
SOURCE_DIR := $(patsubst %../.., %., $(TOP))
 
include $(TOP)/configure/CONFIG
include $(SOURCE_DIR)/MRF_CONFIG
 
INCLUDES += -I../os/$(OS_CLASS)
 
#USR_CFLAGS += -pedantic
USR_CFLAGS += -DDEBUG_PRINT
 
ifeq ($(EPICS_HOST_ARCH),$(T_A))
    USR_CFLAGS += -DHOST_BUILD
endif
 
#---------------------
# Only build for "hardware" IOC's
#
ifneq ($(findstring Host, $(VALID_BUILDS)),)
    VALID_BUILDS = Host
endif
 
#---------------------
# List all custom menu headers
#
CUSTOM_MENUS += menuACSync.h
CUSTOM_MENUS += menuEventClockSrc.h
CUSTOM_MENUS += menuEventEnable.h
CUSTOM_MENUS += menuLinkStatus.h
CUSTOM_MENUS += menuPolarity.h
CUSTOM_MENUS += menuSeqMode.h
CUSTOM_MENUS += menuSeqRam.h
CUSTOM_MENUS += menuTimeUnit.h
 
#---------------------
# Build the record support modules
#
CUSTOM_RECORDS += egRecord
CUSTOM_RECORDS += egeventRecord
CUSTOM_RECORDS += erRecord
CUSTOM_RECORDS += ereventRecord
 
#---------------------
# Install DBD files
#
DBD += mrfCommon.dbd
 
# wanglin 20100830
DBD += devMrfEgEvent.dbd
 
DBD += drvMrfEg.dbd
DBD += devMrfEg.dbd
DBD += mrfEg.dbd
 
DBD += drvMrfEr.dbd
DBD += devMrfEr.dbd
DBD += mrfEr.dbd
 
# wanglin 20100819
DBD += mrfbase.dbd
mrfbase_DBD += base.dbd
 
#---------------------
# Install DBD Header Files
#
DBDINC += $(CUSTOM_RECORDS)
DBDINC += $(CUSTOM_MENUS)
 
#---------------------
# Build the MRF Common Library
#
LIBRARY_IOC   += mrfCommon
 
mrfCommon_OBJS += mrfFracSynth
mrfCommon_OBJS += mrfVme64x
mrfCommon_OBJS += $(CRCSR_PROBE_NAME)
 
OBJS_IOC += $(mrfCommon_OBJS)
 
#---------------------
# Build the Event Generator Library
#
PROD_IOC_vxWorks += mrfEgLib
LIBRARY_IOC      += mrfEg
 
mrfEg_OBJS += drvMrfEg
mrfEg_OBJS += devMrfEg
#mrfEg_OBJS += devMrfEgEvent
 
mrfEg_OBJS += egRecord
mrfEg_OBJS += egeventRecord
 
mrfEgLib_OBJS += $(mrfEg_OBJS)
mrfEgLib_OBJS += $(mrfCommon_OBJS)
mrfEgLib_SRCS += mrfEg_registerRecordDeviceDriver.cpp
 
mrfEgLib_LIBS += $(EPICS_BASE_IOC_LIBS)
 
OBJS_IOC += $(mrfEg_OBJS)
 
#---------------------
# Build the Event Receiver Library
#
PROD_IOC_vxWorks += mrfErLib
LIBRARY_IOC      += mrfEr
 
mrfEr_OBJS += drvMrfEr
mrfEr_OBJS += mrfPmc
mrfEr_OBJS += mrfPmcOSD
mrfEr_OBJS += devMrfEr
mrfEr_OBJS += erRecord
mrfEr_OBJS += ereventRecord
 
mrfErLib_OBJS += $(mrfEr_OBJS)
mrfErLib_OBJS += $(mrfCommon_OBJS)
mrfErLib_SRCS += mrfEr_registerRecordDeviceDriver.cpp
 
mrfErLib_LIBS += $(EPICS_BASE_IOC_LIBS)
 
OBJS_IOC += $(mrfEr_OBJS)
 
#---------------------
# Build the host-side utilities for creating and analyzing
# the fractional synthesizer control words.
#
PROD_HOST += FracSynthAnalyze
PROD_HOST += FracSynthControlWord
 
FracSynthAnalyze_OBJS += FracSynthAnalyze
FracSynthAnalyze_OBJS += mrfFracSynth
 
FracSynthControlWord_OBJS += FracSynthControlWord
FracSynthControlWord_OBJS += mrfFracSynth
 
#---------------------
# Install include files
#
INC += mrfCommon.h
INC += mrfVme64x.h
INC += mrfFracSynth.h
 
INC += drvMrfEg.h
INC += drvMrfEr.h
INC += devMrfEr.h
 
INC += debugPrint.h
 
#=======================================================================#
#                               RULES                                   #
#=======================================================================#
 
#---------------------
# Generic EPICS build rules
#
include $(TOP)/configure/RULES
 
 
 
The start script st.cmd is :
## 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 "/home/wanglin/timingApp/iocBoot/iocmrf"
 
#< cdCommands
#< ../nfsCommands
 
cd "/home/wanglin/timingApp"
## You may have to change mrf to something else
## everywhere it appears in this file
 
ld < bin/vxWorks-ppc604_long/mrfEgLib.munch
ld < bin/vxWorks-ppc604_long/mrfErLib.munch
rebootHookAdd (epicsExitCallAtExits)
 
## This drvTS initializer is needed if the IOC has a hardware event system
#TSinit
 
## Register all support components
dbLoadDatabase("dbd/mrfEg.dbd")
dbLoadDatabase("dbd/mrfEr.dbd")
#dbLoadDatabase("dbd/mrfbase.dbd")
 
mrfEg_registerRecordDeviceDriver(pdbbase)
mrfEr_registerRecordDeviceDriver(pdbbase)
 
## Load record
 
## Set this to see messages from mySub
#mySubDebug = 1
 
dbLoadRecords("db/csnsEvg.db","SUBSYS=timing, DEVICE=test, CardNo=3")
dbLoadRecords("db/csnsEvr.db", "SUBSYS=timing, DEVICE=test, No=0, PulseWidth=20
")
#dbLoadRecords("db/dbExample2.db","user=epics,no=1,scan=1 second")
#dbLoadRecords("db/dbExample2.db","user=epics,no=2,scan=2 second")
#dbLoadRecords("db/dbExample2.db","user=epics,no=3,scan=5 second")
 
EgConfigure(0, 3, 0x280000)
ErConfigureVME(0, 5, 0x300000, 0x62, 4)
 
iocInit()
 
## Start any sequence programs
#seq &sncExample,"user=wanglin"
 
 
 
In additional :
[wanglin@timinglinux1 src]$ grep epicsExportAddress egRecord.c
epicsExportAddress (rset, egRSET);
[wanglin@timinglinux1 src]$ grep epicsExportAddress egeventRecord.c
epicsExportAddress (rset, egeventRSET);
[wanglin@timinglinux1 src]$ grep epicsExportAddress devMrfEg.c
epicsExportAddress (dset, devEg);
epicsExportAddress (dset, devEgEvent);
[wanglin@timinglinux1 src]$ grep epicsExportAddress drvMrfEg.c
epicsExportAddress (drvet, drvMrf200Eg);
 
 
I have checked the database definition and record/device support files,but cant't find any problems.Does anyone know what may result in such errors?
 
Thanks,
Wang Lin
 



<><><><><><><><><><><><><><><><><><><><><><><><><><><><>

Eric BjÃrklund

Los Alamos Neutron Science Center (LANSCE)


phone: 505-667-6031                                                     email:  [email protected]

<><><><><><><><><><><><><><><><><><><><><><><><><><><><>

"The universe is full of magical things,

patiently waiting for our wits to grow sharper"

 -- Eden Phillpotts                                                           TSPA ::DUSA=ADTO



References:
record support not found 王林

Navigate by Date:
Prev: RE: areaDetector video (Was: network video) Mark Rivers
Next: RE: BOY Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: record support not found 王林
Next: Windows XP Cygwin cannot find -lCom M . VERDIER
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·