EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME
From: Andrew Johnson via Core-talk <[email protected]>
To: [email protected]
Date: Wed, 28 Aug 2019 16:23:50 -0000
Thanks, I will commit that change.

When we were developing devLib we noted that linkers see a difference
between

  devLibVME *pdevLibVME = NULL;

and

  devLibVME *pdevLibVME;

The latter is better because you can link the second compiled definition
with another object file that contains

  devLibVME *pdevLibVME = { ... };

whereas using the first definition the linker could object to the
redefinition. Not sure if that's still the case, but it's good to be
aware of the deliberate difference. The only place we have the first one
is in the cygwin32 implementation, which will never talk to a real
VMEbus.

-- 
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1841692

Title:
  Non-VME RTEMS targets should define pdevLibVME

Status in EPICS Base:
  In Progress
Status in EPICS Base 7.0 series:
  In Progress

Bug description:
  Support modules that build IOCs with drivers that call devLib routines
  can't be compiled on non-VME RTEMS targets such as RTEMS-pc386 since
  the linker fails to find the symbol pdevLibVME. The build *only* fails
  for RTEMS targets though, other non-VME targets such as Windows or
  darwin will quite happily compile and link the IOC code. This makes
  the authors of support modules have to jump through hoops to ensure
  they don't build IOCs for targets that will fail, or to just let the
  build fail (many sites don't build for RTEMS anyway).

  The RTEMS implementation of devLibVMEOSD.c uses pre-processor
  conditionals to only define the devLibVME *pdevLibVME pointer inside
  #if defined(__PPC__) || defined(__mcf528x__)

  We could make life much easier for module authors by adding this:

  diff --git a/modules/libcom/src/osi/os/RTEMS/devLibVMEOSD.c b/modules/libcom/src/osi/os/RTEMS/devLibVMEOSD.c
  index 0a96bad..b8f79e7 100644
  --- a/modules/libcom/src/osi/os/RTEMS/devLibVMEOSD.c
  +++ b/modules/libcom/src/osi/os/RTEMS/devLibVMEOSD.c
  @@ -350,7 +350,12 @@ static void unsolicitedHandlerEPICS(int vectorNumber)
           );
   }
   
  -#endif /* defined(__PPC__) && defined(mpc750) */
  +#else /* !defined(__PPC__) && !defined(__mcf528x__) */
  +
  +/* No known VME interface here, provide a dummy */
  +devLibVME *pdevLibVME;
  +
  +#endif /* defined(__PPC__) || defined(__mcf528x__) */
   
   /*
    * Some vxWorks convenience routines

  With that change (which is identical to the osi/os/default version),
  the non-VME RTEMS targets will build exactly the same as the
  workstation OS targets; an IOC that calls devLib will now compile,
  although it obviously won't actually work if booted.

  
  Any objections?

To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1841692/+subscriptions

References:
[Bug 1841692] [NEW] Non-VME RTEMS targets should define pdevLibVME Andrew Johnson via Core-talk

Navigate by Date:
Prev: [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME mdavidsaver via Core-talk
Next: [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME mdavidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME mdavidsaver via Core-talk
Next: [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME mdavidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 28 Aug 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·