Experimental Physics and Industrial Control System
Subject: |
[Bug 1841692] [NEW] Non-VME RTEMS targets should define pdevLibVME |
From: |
Andrew Johnson via Core-talk <[email protected]> |
To: |
[email protected] |
Date: |
Tue, 27 Aug 2019 23:43:27 -0000 |
Public bug reported:
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?
** Affects: epics-base
Importance: Medium
Assignee: Andrew Johnson (anj)
Status: In Progress
** Affects: epics-base/7.0
Importance: Medium
Assignee: Andrew Johnson (anj)
Status: In Progress
** Also affects: epics-base/7.0
Importance: Medium
Assignee: Andrew Johnson (anj)
Status: In Progress
--
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
- Replies:
- [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME mdavidsaver via Core-talk
- [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME Andrew Johnson via Core-talk
- [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME mdavidsaver via Core-talk
- [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME Andrew Johnson via Core-talk
- [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME Andrew Johnson via Core-talk
- [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME mdavidsaver via Core-talk
- [Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME Andrew Johnson via Core-talk
- Navigate by Date:
- Prev:
Re: Strange behavior of async calcout with CPP input link Johnson, Andrew N. 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
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
[Bug 1841634] Re: CP link triggers lost when record is async 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
<2019>
2020
2021
2022
2023
2024