[Xenomai] Xenomai-3: RTDM with Mercury?
rpm at xenomai.org
Thu Aug 28 15:05:50 CEST 2014
On 08/27/2014 07:41 PM, Jeff Webb wrote:
> From the recent traffic on the mailing list, and the website makeover,
> it sounds like Xenomai 3 is close to maturity, so I am trying to become
> familiar with the new technology. I am very interested in the idea of
> having one code base that can be used in Linux, PREEMPT-RT, and
> dual-kernel applications. Even with Xenomai 2, I have moved close to
> this goal by using the POSIX skin and using compiler directives to build
> my code as a standard linux application, or a real-time Xenomai version.
> The main thing I am missing now is a unified interface to hardware
> devices, and it sounds like Xenomai 3 might be able to provide that.
> From the introduction on the web site (
> http://xenomai.org/introducing-xenomai-3/ ), it sounds like I should be
> able to use RTDM drivers with the standard linux kernel through the
> Mercury core. How does this work? Figure 3 shows a "native RTDM"
> block. Is this block a kernel module that translates RTDM-specific
> calls into standard linux calls?
Does the translation happen at compile
> time or run-time?
Is there documentation on how I can write an RTDM
> driver that will work with both the Cobalt and Mercury cores?
Not yet, but the rule of thumb is to avoid the legacy
RTDM_EXECUTE_ATOMICALLY() construct (or the newest
cobalt_atomic_enter/leave the same way) to keep compatibility.
rtdm_waitqueues have been introduced to support the patterns where
RTDM_EXECUTE_ATOMICALLY() was usually involved in.
This is discussed at
> starters, can I access the 16550 RTDM driver from mercury?
16550 should be mercury-ready, I don't see any non-portable pattern in
this code. But I never tried it in a single kernel configuration, see below.
> I apologize if all of this is documented, and I've just missed it. I
> also realize that Xenomai 3 is a work in progress and you haven't gotten
> to everything yet. The documentation you have is very good, and I
> appreciate all the work you have put into it.
Thanks. Regarding RTDM over Mercury, Wolfgang (Grandegger) published a
proof-of-concept implementation which dates back to 2008 or so, but
since we never received any feedback, I'm assuming that the current user
base of this code is either small, reserved or terribly shy.
In any case, it has not been reworked over Xenomai 3 yet, at the very
least for supporting the latest RTDM API changes/features. However, this
is certainly high on the todo list now, as we direly need this component
to close the loop.
More information about the Xenomai