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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Fwd: RE: MAXvConfig() error in st.cmd |
From: | Ron Sluiter <[email protected]> |
To: | Mark Rivers <[email protected]> |
Cc: | EPICS <[email protected]> |
Date: | Mon, 16 Jul 2012 12:26:54 -0500 |
Hello Mark, Our communications went off-line. Nia did find an error in the drvMAXv.cc code (the MAXvConfig declaration is wrong) that, I believe, only shows up with the RTEMS shell. Not sure why. I have checked the correction into the SVN repository here. Ron -------- Original Message --------
I'm running a st.cmd file on RTEMS-beatnik. Nia Fong Instrumentation & Controls Software 650-926-6215 [email protected] ________________________________________ From: Ron Sluiter [[email protected]] Sent: Friday, July 13, 2012 2:38 PM To: Fong, Nia W. Subject: Re: MAXvConfig() error in st.cmd Hello Nia, You are right. The MAXvConfig declaration is wrong. I not sure why the compiler did not catch this. Possibly, because of the extern "C" { . What shell are you using when you invoke MAXvConfig? Thanks for catching this error. Ron On 7/13/2012 3:50 PM, Fong, Nia W. wrote: > Hi Ron, > > I did a diff and this (https://subversion.xor.aps.anl.gov/synApps/motor/tags/R6-7-1/motorApp/OmsSrc/drvMAXv.cc) is the same file that I have. > > In this file, the function declaration only has 2 parameter, while the function definition has 3 parameters. Shouldn't they match? > > ------------------------------------------------------------------ > MAXvConfig() function declaration with 2 parameters : > ------------------------------------------------------------------ > /* Common local function declarations. */ > extern "C" { > RTN_VALUES MAXvConfig(int, const char *); > } > > ---------------------------------------------------------------- > MAXvConfig() function definition with 3 parameters : > ---------------------------------------------------------------- > RTN_VALUES MAXvConfig(int card, /* number of card being configured */ > const char *initstr, /* configuration string */ > int config) /* initialization configuration */ > { > .... > } > > > > Thanks, > > Nia Fong > Instrumentation& Controls Software > 650-926-6215 > [email protected] > ________________________________________ > From: Ron Sluiter [[email protected]] > Sent: Friday, July 13, 2012 12:29 PM > To: Fong, Nia W. > Subject: Re: MAXvConfig() error in st.cmd > > Hello Nia, > > This (the incorrect registration of MAXvConfig) was fixed > with motor module R6-7-1. You can get a copy of drvMAXv.cc > from R6-7-1 here<https://subversion.xor.aps.anl.gov/synApps/motor/tags/R6-7-1/motorApp/OmsSrc/drvMAXv.cc>. > > Ron > > On 7/13/2012 2:11 PM, Fong, Nia W. wrote: > > Hi, > > I just installed a new OMS MAXv VME card and was getting an error when calling MAXvConfig() in st.cmd : > > MAXvSetup(1, 16, 0xF000, 200, 5, 10) > 0x00000000 (0) > #config0="AX LH PSO" > MAXvConfig(0, "AX LH PSO", 0x00) > Cexp syntax error: syntax error, unexpected '(', expecting '=' or '\n' > > Passing 2 parameters returned the same error : > > MAXvSetup(1, 16, 0xF000, 200, 5, 10) > 0x00000000 (0) > #config0="AX LH PSO" > MAXvConfig(0, "AX LH PSO") > Cexp syntax error: syntax error, unexpected '(', expecting '=' or '\n' > > It looks like MAXvConfig() expects three parameters in the rest of the code, but it's function definition only defines 2 in drvMAXv.cc. > > I recompiled with the small change and no longer get the error. However, I'm just setting everything up first the first time and don't yet have a motor connected so am not sure if this is the correct fix. Could anyone with more experience provide more insight? > > All jumpers are default factory settings except for J13. > Jumper J13 is set for A16 supervisory access (0x2D or 101101) > > -------------------------- > Original drvMAXv.cc: > -------------------------- > /* Common local function declarations. */ > extern "C" { > RTN_STATUS MAXvSetup(int, int, unsigned int, unsigned int, int, int); > RTN_VALUES MAXvConfig(int, const char *); > } > > --------------------------- > Modified drvMAXv.cc: > --------------------------- > /* Common local function declarations. */ > extern "C" { > RTN_STATUS MAXvSetup(int, int, unsigned int, unsigned int, int, int); > RTN_VALUES MAXvConfig(int, const char *, int); > } > > > Thanks, > Nia > |