g+
g+ Communities
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  2010  2011  <20122013  2014  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
<== Date ==> <== Thread ==>

Subject: RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1
From: Vesna Samardzic-Boban <Vesna.Samardzic-Boban@synchrotron.org.au>
To: Mark Rivers <rivers@cars.uchicago.edu>
Cc: EPICS tech-talk <tech-talk@aps.anl.gov>
Date: Thu, 9 Feb 2012 15:09:40 +1100
Hi Mark,

That latest Subversion version of mca (checked out version 14450) fixed the problem with my mca build (with or without use of DMA).

Thank you, Vesna

________________________________________
From: Mark Rivers [rivers@cars.uchicago.edu]
Sent: Wednesday, 8 February 2012 5:01 AM
To: Vesna Samardzic-Boban
Subject: RE: errors in vxWorks-6.9/target/h(eader) files when building base     3.14.12.1

Hi Vesna,

I figured out your problem with compiling without USE_DMA defined.  The problem is that memalign is defined in memLib.h on vxWorks.  I was never explicitly including memLib.h.  But apparently when USE_DMA was defined, and thus apsLib.h was being included, that caused memLib.h to be included somewhere in the chain as a side-effect.  But if USE_DMA was not defined memLib.h never got included, so you got the error.

What's strange is that this does not happen for me on my older vxWorks system. Even if USE_DMA is not defined somehow memLib.h is still being included.

In any event I have now fixed the problem by explicitly including memLib.h on vxWorks.

If you go to the directory where you installed mca with "svn checkout" yesterday, you can now get the latest version by just doing:

svn update

Let me know how it goes.

Thanks, Mark

-----Original Message-----
From: Vesna Samardzic-Boban [mailto:Vesna.Samardzic-Boban@synchrotron.org.au]
Sent: Tuesday, February 07, 2012 3:15 AM
To: Mark Rivers
Subject: RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1

Hi Mark,

if i build mca-7-1 + (Subversion version of mca/ trunk)  and in the file
SISSrc/Makefile
use or not use DMA, the results are as follows.


1.
 # If your system supports the APS DMA library written by Andrew Johnson uncomment this line; if not comment this line out
USR_CPPFLAGS += -DUSE_DMA

build finshes ok
only few warnings, attached LOG file mca-7-1_useDMA_vx-6-9.txt


[warnings are the same in both cases 1. and 2.]


2.
# If your system supports the APS DMA library written by Andrew Johnson uncomment this line; if not comment this line out
#USR_CPPFLAGS += -DUSE_DMA

i get errors, attached LOG file mca-7-1_noDMA_vx-6-9.txt
....
../drvSIS3820.cpp: In constructor 'drvSIS3820::drvSIS3820(const char*, int, int, int, int, int, bool, int)':
../drvSIS3820.cpp:147: error: 'memalign' was not declared in this scope
......
line 147
fifoBuffer_ = (epicsUInt32*) memalign(8, fifoBufferWords_*sizeof(epicsUInt32));


Regards,
Vesna
________________________________________
From: Mark Rivers [rivers@cars.uchicago.edu]
Sent: Tuesday, 7 February 2012 3:22 PM
To: Vesna Samardzic-Boban; Andrew Johnson
Cc: EPICS tech-talk
Subject: RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1

Hi Vesna,

Have you tried the Subversion version of mca? I believe that if you do you can comment out the line in SISSrc/Makefile and NOT get the undefined symbol errors. But I have no way to test that because my version of vxWorks does define those symbols. So I need someone like you to test it and see if the current version (which also have a new version of vmeDMA.h) fixes this problem.

Mark

________________________________________
From: Vesna Samardzic-Boban [Vesna.Samardzic-Boban@synchrotron.org.au]
Sent: Monday, February 06, 2012 9:19 PM
To: Mark Rivers; Andrew Johnson
Cc: EPICS tech-talk
Subject: RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1

Hi Mark and Andrew,


mcaR7-0
-------------
Actually I had previously built mcaR7-0 but without use of epics VME DMA driver (and without Canberra module, we do not use it).
That is why I said I had built synApps 5.5 without mca, sorry for the incorrect wording and confusion.

I had built mcaR7-0 with the line in the SISSrc/Makefile, commented out as you Mark also suggested
i.e.
# If your system supports the APS DMA library written by Andrew Johnson uncomment this line; if not comment this line out
#USR_CPPFLAGS += -DUSE_DMA

Mark, I guess I do not have to go for a newer release of mca - Please let me know what you think now.



Then in an iocApp with mca (and without epics VME DMA driver) I would get same errors as in the tech-talk msg00124
http://www.aps.anl.gov/epics/tech-talk/2004/msg00124.php
....
Undefined symbol: sysDmaStatus
Undefined symbol: sysDmaToVme
Undefined symbol: sysDmaCreate
Undefined symbol: sysDmaFromVme
.....
.....
Andrew,
Yes, I would like you to send me the newer driver for vxWorks 6.8 please.



Andrew,

nlongs
----------
Confirming - in VxWorks 6.9 nlongs is not defined as an int in the string.h , please see below.
I quoted few others as well:
....
#if _EXTENSION_WRS /* undef for ANSI */
extern int strerror_r (int __errcode, char *__buf);
extern void bcopy (const char *source, char *dest, size_t nbytes);
extern void bcopyBytes (char *source, char *dest, size_t nbytes);
extern void bcopyWords (char *source, char *dest, size_t nwords);
extern void bcopyLongs (char *source, char *dest, size_t nlongs);
....
If you would like more from this header file, please let me know.



libCom tests all pass but epicsTimeTest
------------------
epicsStdioTest now Passes, after i made the directory writable, thanks for the advice.
File 'report' was created in the running/working directory:
# This is first line of sample report
# This is second and last line of sample report

Test results:
......
With epicsTimeTest skipped, all tests now pass
.... snippet......
EPICS Test Harness Results
==========================
All tests successful.
Programs=23, Tests=1805, 465 wallclock secs



epicsTimeTest
----------------------
I have never used vxWorks debugger(s) but will try "attaching" (later in the day).
Tomorrow we are starting with our first vxWorks training so I might get help with this.
Will let you know anyway.



Thank you very much for your help!

Regards,
Vesna


________________________________________
From: Mark Rivers [rivers@cars.uchicago.edu]
Sent: Saturday, 4 February 2012 7:22 AM
To: 'Andrew Johnson'; Vesna Samardzic-Boban
Cc: EPICS tech-talk
Subject: RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1

Hi Vesna,

If you get the latest Subversion version of mca it should allow you build and run the SIS3820 without the APS DMA support by commenting out the first line in SISSrc/Makefile.

https://subversion.xor.aps.anl.gov/synApps/mca/trunk/

I'll be very interested to hear if that works for you, and if it does I can make a new release of mca.

Thanks,
Mark



-----Original Message-----
From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Andrew Johnson
Sent: Friday, February 03, 2012 12:07 PM
To: Vesna Samardzic-Boban
Cc: EPICS tech-talk
Subject: Re: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1

Hi Vesna,

On 2012-02-03 you wrote:
>
> After building the base, I also built synApps 5.5 (without mca 7-0 because
> mvme5100 BSP does not have BSP dma driver. My understanding is that I will
> need your EPICS DMA driver to be able to use mca7 and SIS3820 scaler.

The MVME5100 board uses a Universe-2 chip. A version of my DMA driver is
described at http://www.aps.anl.gov/epics/tech-talk/2004/msg00124.php for that
chip but I have a newer version for vxWorks 6.8 which I can send you if you
want it.

> Just to mention, to build the epics base, in addtion to the 4 target/h
> files, I also modified libCom/osi/devLibVME.h line 306, from void
> bcopyLongs(char *source, char *destination, int nlongs);
> to
> void bcopyLongs(char *source, char *destination, size_t nlongs);

Interesting, in vxWorks 5.5 through 6.8 the nlongs argument is defined (in
string.h) as an int, and we actually provide a version of the routine
ourselves for RTEMS. Can you confirm your new declaration above comes from
the vxWorks 6.9 version of string.h? I'll have talk to Michael Davidsaver and
Eric Norum to work out what we do about that.

> NOT all the tests pass.
> The tests actually stop / terminate at:
>
> ***** epicsTimeTest *****
> 1..195
> 0x24089b0 (tShell0): Unhandled C++ exception resulted in call to terminate

OK, that epicsTimeTest failure *is* a problem that will need fixing, and I
don't think it's the last test run, so there are other tests that you haven't
tried running yet. Can you try attaching a debugger to find out what
exception is getting thrown, where from, and why it's not getting caught? If
you want to try running the remaining tests first just comment out the line
runTest(epicsTimeTest);
from the epicsRunLibComTests() routine in epicsRunLibComTests.c

It's interesting that epicsThreadPrivateTest succeeded, the epicsThreadPrivate
code that it's checking uses the taskVar API that I thought Wind River were
going to remove; maybe they only took it out of the SMP version.

> Before this "termination", 'only' one does not pass:
>
> ***** epicsStdioTest *****
> 1..163

> not ok 156 - !fclose(stream)
> # fclose error: OK
>
> not ok 157 - (stream = fopen(report, "r")) != NULL
> # 'report' could not be opened for reading:
> S_ftpLib_REMOTE_SERVER_ERROR_550
>
> Not sure how to go from here so any help or advice would be much
> appreciated.

This epicsStdioTest failure just means that when you ran it the working
directory was not one that the IOC was allowed to write to, so this problem
you can probably ignore. To avoid it in the future make sure that you cd to a
writable directory before starting the tests - I often forget to do that
myself. I'll add a diagnostic to the test explaining the usual failure cause.

- Andrew
--
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham<br>This message and any attachments may contain proprietary or confidential information. If you are not the intended recipient or you received the message in error, you must not use, copy or distribute the message. Please notify the sender immediately and destroy the original message. Thank you.
<br>This message and any attachments may contain proprietary or confidential information. If you are not the intended recipient or you received the message in error, you must not use, copy or distribute the message. Please notify the sender immediately and destroy the original message. Thank you.
<br>This message and any attachments may contain proprietary or confidential information. If you are not the intended recipient or you received the message in error, you must not use, copy or distribute the message. Please notify the sender immediately and destroy the original message. Thank you.<br>This message and any attachments may contain proprietary or confidential information. If you are not the intended recipient or you received the message in error, you must not use, copy or distribute the message. Please notify the sender immediately and destroy the original message. Thank you.

Replies:
RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1 Mark Rivers
References:
RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1 Vesna Samardzic-Boban
RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1 Mark Rivers

Navigate by Date:
Prev: Re: Virtual circuit disconnect - caRepeater bug? Oleg Makarov
Next: RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1 Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
Navigate by Thread:
Prev: RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1 Mark Rivers
Next: RE: errors in vxWorks-6.9/target/h(eader) files when building base 3.14.12.1 Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·