Xenomai-3: RTDM with Mercury?
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? For starters, can I access the 16550 RTDM driver from mercury?
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,
Jeff
Quoted 8 lines · Jeff Webb
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.
Quoted 8 lines
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?
Yes, basically.
Does the translation happen at compile
Quoted 1 line
time or run-time?
Compile-time.
Is there documentation on how I can write an RTDM
Quoted 1 line
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
http://xenomai.org/migrating-from-xenomai-2-x-to-3-x/#Driver_API
For
Quoted 2 lines
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.
Quoted 5 lines
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.
Signature · 1 line
Philippe.
Quoted 55 lines · Philippe Gerum
Quoted 8 lines · Jeff Webb
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.Quoted 8 lines
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?Yes, basically.
Does the translation happen at compile
Quoted 1 line
time or run-time?
Compile-time.
Is there documentation on how I can write an RTDM
Quoted 1 line
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_waitqueueshave been introduced to support the patterns whereRTDM_EXECUTE_ATOMICALLY()was usually involved in.
This is discussed at
http://xenomai.org/migrating-from-xenomai-2-x-to-3-x/#Driver_APIFor
Quoted 2 lines
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.
Quoted 5 lines
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.
Quoted 5 lines
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.
Thanks, Philippe. That explanation clears things up. I think Xenomai is headed in a great direction.
-Jeff