How build Linuxcnc with xenomai3?

More
5 years 1 week ago #223665 by SummerLotus
Kernel version: 5.4.70
Xenomai version: 3.2
Linuxcnc version: 2.8

I tried to compile linuxcnc in the above environment, and successfully compiled all programs.
But when I run latency-test, it prompts "Note: Using POSIX non-realtime"

The following are my configuration steps:
Code:
$ git clone https://github.com/LinuxCNC/linuxcnc.git -b 2.8 linuxcnc-2.8 $ cd linuxcnc-2.8/debian $ ./configure uspace xenomai (It return success) $ cd .. $ dpkg-checkbuilddeps (installed all depened) $ cd src/ $ ./autogen.sh $ ./configure --with-realtime=uspace $ make $ sudo make setuid $ source ../script/rip-enviroment

During make, the posix/pthread.h header file in the uspace_xenomai.cc file cannot be found.
I modified it to cobalt/pthread.h corresponding to xenomai3. Then compile successfully!
But as I said at the beginning, the compiled program runs in a non-real-time environment.
It is not like some people will prompt to use Xenomai POSIX **** at runtime.Of course, the results of latency-test are very bad.
By the way, I used the latency compiled by xenomai to test and achieved very good results, so my xenomai real-time kernel and environment are working.
So, did I do something wrong or should I use a special Linuxcnc branch?

Please Log in or Create an account to join the conversation.

More
5 years 1 week ago #223669 by tommylight

Please Log in or Create an account to join the conversation.

More
5 years 1 week ago #223671 by PCW
You would not use:

./configure --with-realtime=uspace

With Xenomai since realtime=uspace means POSIX realtime

I don't know but I expect LinuxCNC Xenomai support needs work.

Please Log in or Create an account to join the conversation.

More
5 years 1 week ago #223782 by SummerLotus
Kernel is:
>> Linux debian10 5.4.70-xeno3 #3 SMP PREEMPT Sat Oct 16 13:37:44 UTC 2021 aarch64 GNU/Linux

The kernel is compiled manually by myself, and the latency test under xenomai shows that the real-time work I need under the current environment is normal
 

Please Log in or Create an account to join the conversation.

More
5 years 1 week ago #224137 by andypugh

You would not use:

./configure --with-realtime=uspace

With Xenomai since realtime=uspace means POSIX realtime
 
I thought that LinuxCNC knew how to use userspace Xenomai realtime, but it has been a very long time since I tried it. 

linuxcnc.org/docs/master/html/code/build...nc.html#_build_modes

The test at the configure stage is here:  github.com/LinuxCNC/linuxcnc/blob/faab5f...rc/configure.ac#L226

There might be a clue here;  github.com/LinuxCNC/linuxcnc/blob/2e75b0...dder/README.txt#L173

Do you have a xeno-config file in the default path? 
 

Please Log in or Create an account to join the conversation.

More
5 years 1 week ago - 5 years 1 week ago #224150 by PCW
Ahh I did not realise that the somewhat misnamed:

./configure --with-realtime=uspace

Is supposed to work for RTAI and Xenomai if the proper files are present.

So, yes certainly possible configure is not finding these files so just building
POSIX realtime dependent LinuxCNC

Seems like
./configure --with-realtime=xenomai

Would be a lot clearer, and would complain about a missing Xenomai build environment
rather than buiding a mystery LinuxCNC version.
Last edit: 5 years 1 week ago by PCW.

Please Log in or Create an account to join the conversation.

Time to create page: 0.582 seconds
Powered by Kunena Forum