Non-VME RTEMS targets should define pdevLibVME
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
EPICS Base | Status tracked in 7.0 | |||||
7.0 |
Fix Released
|
Medium
|
Andrew Johnson |
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(
We could make life much easier for module authors by adding this:
diff --git a/modules/
index 0a96bad..b8f79e7 100644
--- a/modules/
+++ b/modules/
@@ -350,7 +350,12 @@ static void unsolicitedHand
);
}
-#endif /* defined(__PPC__) && defined(mpc750) */
+#else /* !defined(__PPC__) && !defined(
+
+/* No known VME interface here, provide a dummy */
+devLibVME *pdevLibVME;
+
+#endif /* defined(__PPC__) || defined(
/*
* 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?
Nope. I was of the same mind.
https:/ /github. com/epics- modules/ devlib2/ blob/38c3e3ebc8 ff34cff37b9acd9 05a270507263ea1 /vmeApp/ os/RTEMS/ devLibVMEOSD. c#L354- L358