Title: undefined symbol:MAXvSetup
Hi,
I'm not sure if this will solve your problem, but as an RTEMS user I
add
extern "C"
before the function definition because the CExp shell does not
understand C++ mangled names. See attached.
Michael
On 05/04/2012 06:23 AM, 洪春霞 wrote:
Hello,everyone.
Now I have a oms motor and a VME crate. The oms motor
application comes from
synApps_5_3/support/motor/6-3/motorApp/OmsSrc and my epics
base is 3.14.8.2. Now I use the makeBaseApp.pl to produce a
new application and copy the source file(MotorSrc and OmsSrc
and SoftMotorSrc) to the corresponding directory ,that is to
say, in the same directory with Db and src.The **App/Makefile
as follows. Now I only modify the **App/src/Makefile, and I
have not change anything about MotorSrc and OmsSrc and
SoftMotorSrc and their Makefile. The compile is ok.
But when I download st.cmd to the VME crate, there are some
problems. It is said the MAXvSetup is an undefined symbol. The
error message is as follows.
Can anyone help with this problem please?
Thank you very much.
----------------------**App/Makefile-------------------------------------------------------------------------------
TOP = ..
include $(TOP)/configure/CONFIG
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *src*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Src*))
DIRS += MotorSrc
DIRS += OmsSrc
DIRS += SoftMotorSrc
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*))
include $(TOP)/configure/RULES_DIRS
----------------------**App/src/Makefile------------------------------------------------------------------------------
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#==================================================
# Build an IOC support library
LIBRARY_IOC += xxxSupport
# xxxRecord.h will be created from xxxRecord.dbd
DBDINC += xxxRecord
# install devXxxSoft.dbd into <top>/dbd
DBD += xxxSupport.dbd
# The following are compiled and added to the Support library
xxxSupport_SRCS += xxxRecord.c
xxxSupport_SRCS += devXxxSoft.c
xxxSupport_LIBS += $(EPICS_BASE_IOC_LIBS)
#=============================
# build an ioc application
PROD_IOC = bisaxsioc
# bisaxsioc.dbd will be created and installed
DBD += bisaxsioc.dbd
# bisaxsioc.dbd will be made up from these files:
bisaxsioc_DBD += base.dbd
bisaxsioc_DBD += xxxSupport.dbd
bisaxsioc_DBD += dbSubExample.dbd
bisaxsioc_DBD += bisaxsiocHello.dbd
bisaxsioc_DBD += asyn.dbd
bisaxsioc_DBD += oms.dbd
bisaxsioc_DBD += motorSupport.dbd
bisaxsioc_DBD += motorRecord.dbd
bisaxsioc_DBD += devOms.dbd
bisaxsioc_DBD += devSoftMotor.dbd
# <name>_registerRecordDeviceDriver.cpp will be created
from <name>.dbd
bisaxsioc_SRCS += bisaxsioc_registerRecordDeviceDriver.cpp
bisaxsioc_SRCS_DEFAULT += bisaxsiocMain.cpp
bisaxsioc_SRCS_vxWorks += -nil-
# Add locally compiled object code
bisaxsioc_SRCS += dbSubExample.c
bisaxsioc_SRCS += bisaxsiocHello.c
# The following adds support from base/src/vxWorks
bisaxsioc_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
bisaxsioc_LIBS += xxxSupport
bisaxsioc_LIBS += asyn
bisaxsioc_LIBS += motor
bisaxsioc_LIBS += softMotor
bisaxsioc_LIBS += oms
# NOTE: To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file
ifneq ($(SNCSEQ),)
# This builds sncExample as a component of bisaxsioc
bisaxsioc_SNCFLAGS += +r
bisaxsioc_DBD += sncExample.dbd
bisaxsioc_SRCS += sncExample.stt
bisaxsioc_LIBS += seq pv
# The following builds sncProgram as a standalone
application
PROD_HOST += sncProgram
sncProgram_SNCFLAGS += +m
sncProgram_SRCS += sncProgram.st
sncProgram_LIBS += seq pv
sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS)
endif
bisaxsioc_LIBS += $(EPICS_BASE_IOC_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
----------------------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/blctrl/bisaxs/bisaxsioc/iocBoot/iocbisaxsioc"
< cdCommands
#< ../nfsCommands
cd topbin
## You may have to change bisaxsioc to something else
## everywhere it appears in this file
#cd "/home/blctrl/bisaxs/bisaxsioc/bin/vxWorks-ppc604_long"
sysCplusEnable=1
ld < bisaxsioc.munch
## This drvTS initializer is needed if the IOC has a hardware
event system
#TSinit
## Register all support components
cd top
dbLoadDatabase("dbd/bisaxsioc.dbd")
#dbLoadDatabase("dbd/bisaxsioc.dbd",0,0)
bisaxsioc_registerRecordDeviceDriver(pdbbase)
dbLoadRecords("db/beamstop.db")
MAXvSetup(1,16,0xF000,190,5,10)
drvMAXvdebug=4
config0="AA LH1,1,1,1,1,1,1,1 PSO;AA HH1,1,1,1,1,1,1,1;AA
AF1,1,1,1,1,1,1,1;"
MAXvConfig(0, config0)
## Load record instances
#dbLoadRecords("db/dbExample1.db","user=blctrl")
#dbLoadRecords("db/dbExample2.db","user=blctrl,no=1,scan=1
second")
#dbLoadRecords("db/dbExample2.db","user=blctrl,no=2,scan=2
second")
#dbLoadRecords("db/dbExample2.db","user=blctrl,no=3,scan=5
second")
#dbLoadRecords("db/dbSubExample.db","user=blctrl")
## Set this to see messages from mySub
#mySubDebug = 1
cd startup
shellPromptSet "BL16B1> "
iocLogDisable=1
iocInit
#iocInit()
## Start any sequence programs
#seq &sncExample,"user=blctrl"
----------------------error
messages------------------------------------------------------------------------------
ld < bisaxsioc.munch
sysAtReboot not found. epicsExit will not be called by reboot.
value = 516329056 = 0x1ec68e60
## Register all support components
cd top
value = 0 = 0x0
dbLoadDatabase("dbd/bisaxsioc.dbd",0,0)
value = 0 = 0x0
bisaxsioc_registerRecordDeviceDriver(pdbbase)
value = 0 = 0x0
dbLoadRecords("db/beamstop.db")
Error Last token ")"
input line: record(motor,“X16B1:EH:BS:TRX”)
in: file db/beamstop.db line 2
db_parse returned -1
value=-1=0xffffffff
MAXvSetup(1,16,0xF000,190,5,10)
undefined symbol: MAXvSetup
filename="../dbLexRoutines.c" line number=910
Record Type does not exist dbFindRecordType
hongchunxia
===================================================
No.239 Zhangheng Road
PuDong District
Shanghai Institute of Applied Physics CAS
Shanghai, China
|
From: Michael Davidsaver <[email protected]>
Date: Thu, 30 Jul 2009 11:38:07 -0400
Subject: [PATCH] motor: iocsh functions should use C linkage
Helpful for RTEMS
---
motor/motorApp/OmsSrc/drvMAXv.cc | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/motor/motorApp/OmsSrc/drvMAXv.cc b/motor/motorApp/OmsSrc/drvMAXv.cc
index e238f76..d252f8e 100644
--- a/motor/motorApp/OmsSrc/drvMAXv.cc
+++ b/motor/motorApp/OmsSrc/drvMAXv.cc
@@ -754,6 +754,7 @@ static char *readbuf(volatile struct MAXv_motor *pmotor, char *bufptr)
/* Configuration function for module_types data */
/* areas. MAXvSetup() */
/*****************************************************/
+extern "C"
RTN_STATUS
MAXvSetup(int num_cards, /* maximum number of cards in rack */
int addrs_type, /* VME address type; 16 - A16, 24 - A24 or 32 - A32. */
@@ -895,6 +896,7 @@ MAXvSetup(int num_cards, /* maximum number of cards in rack */
return(rtncode);
}
+extern "C"
RTN_VALUES MAXvConfig(int card, /* number of card being configured */
const char *initstr) /* initialization string */
{
--
- References:
- undefined symbol:MAXvSetup 洪春霞
- Navigate by Date:
- Prev:
RE: [Scopes] BMP image record?? Chen, Xihui
- Next:
RE: undefined symbol:MAXvSetup Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
undefined symbol:MAXvSetup 洪春霞
- Next:
RE: undefined symbol:MAXvSetup Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|