run Linuxcnc on xenomai with EVL(the realtime core)
I installed LinuxCNC using
sudo apt install linuxcnc-uspace linuxcnc-uspace-dev,
I'm sure my Xenomai installation was successful.
[code]pi@raspberrypi:~ $ dmesg | grep EVL
[ 1.079272] IRQ pipeline: high-priority EVL stage added.
[ 1.081776] EVL: core started
Since there are few tutorials for Xenomai 4, I'm not sure what the correct steps are. My current guess is that I need to run it in the evl environment, which means I need to run it in root mode (sudo su). However, when I tried that, LinuxCNC gave me an error and didn't allow running in root mode.
So, I'm wondering if there's a way to solve this problem, or if there are any parameter settings that can make LinuxCNC run in the real-time core of Xenomai 4.
How can I run an application using the EVL core?
Thanks a lot!
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19106
- Thank you received: 6398
-
Is there any particular reason to use Xenonai?
Probably compiling it might work, but i never tried it.
Please Log in or Create an account to join the conversation.
I'm using Xenomai for some experimental testing. I've already completed my tests on a preempt-rt system, and now I'm moving on to testing with Xenomai. Unfortunately, I've encountered a lot of difficulties, so I'm hoping to get some advice and help from everyone.
Please Log in or Create an account to join the conversation.
There maybe some notes in the docs, maybe Andy might chime in.
The packages you downloaded are for the RT kernel.
Please Log in or Create an account to join the conversation.
I just tried it. I rebuilt LinuxCNC as the documentation saidcornholio post=298547 userid=35653
You'll have to build Linuxcnc for Xenomai.
There maybe some notes in the docs, maybe Andy might chime in.
The packages you downloaded are for the RT kernel.
The most commonly used arguments are:
--with-realtime=uspaceBuild for any realtime platform, or for non-realtime. The resulting LinuxCNC executables will run on both a Linux kernel with Preempt-RT patches (providing realtime machine control) and on a vanilla (un-patched) Linux kernel (providing G-code simulation but no realtime machine control). If development files are installed for Xenomai (typically from package libxenomai-dev) or RTAI (typically from a package with a name starting "rtai-modules"), support for these real-time kernels will also be enabled.
[code], but unfortunately, it didn't work. It still gives me the message: "[b]Note: Using POSIX non-realtime." Is that normal???[/b]
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
sorry,do you mean “Real-time Is Preemptive”?If it is, I'm trying to do it like this.I take it you ran the linuxcnc as a RIP ?
According to the docs, building LinuxCNC should detect the Xenomai4 EVL real-time core, right? All my EVL tests have passed, so I'm not sure if the current setup is correct.
My current process is to build LinuxCNC according to the documentation and then start LinuxCNC. However, I get a message saying, "Note: Using POSIX non-realtime." Is this process correct? If not, what settings do I need to change to use EVL?
Please Log in or Create an account to join the conversation.
What method did you use to build Linuxcnc and then run an instance ?
When you built Linuxcnc did you have any xenomai develpoment files &\or libs installed ?
Did you build packagess & install the packages ?
Or did you just build Linuxcnc, run the script to setup the environment variables and run it from the command line ? Running from the menu will just run the prior installed package.
If you don't run the script to setup the environment variables or build and install new packages you will be running the prior version you installed.
Please Log in or Create an account to join the conversation.
RIP means Run In Place, it's mentioned in the docs.
What method did you use to build Linuxcnc and then run an instance ?
When you built Linuxcnc did you have any xenomai develpoment files &\or libs installed ?
Did you build packagess & install the packages ?
Or did you just build Linuxcnc, run the script to setup the environment variables and run it from the command line ? Running from the menu will just run the prior installed package.
If you don't run the script to setup the environment variables or build and install new packages you will be running the prior version you installed.
I uninstalled the previous LinuxCNC and rebuilt it following these steps. (By the way, I also installed all the dependencies shown by dpkg-checkbuilddeps.)
$ git clone https://github.com/LinuxCNC/linuxcnc.git linuxcnc-dev
$ cd linuxcnc-dev/src
$ ./autogen.sh
$ ./configure --with-realtime=uspace
$ make
$ sudo make setuid
$ source ../scripts/rip-environment
$ runtests
And then I did this to run linuxcnc:
$ source ../scripts/rip-environment
$ linuxcnc
As for Xenomai, I replaced the core, built and installed libevl according to the official website and other forum posts. I also passed the EVL test included with Xenomai, indicating that all Xenomai modules are successfully installed. The only issue is that the latency is slightly high, which should be due to the kernel configuration not being optimized to the fullest. However, this shouldn't have a major impact.
So, I'm currently running the latest build of LinuxCNC.
Please Log in or Create an account to join the conversation.
If using a Mesa card or other external motion control card that only requires a servo thread the latency requirements are a bit looser, and in most instances the RT-PREEMPT kernel is fine.
What I am saying is that chasing down latency gets to a point where it is of no great issue and can be more academic than performance.
In saying that it is interesting to see someone going down a different path and to see the results.
Please Log in or Create an account to join the conversation.