Can the OPI5 be Configured to Run LCNC?

More
2 years 4 months ago #302627 by royka
To improve the latency by the way, you could add the following to /boot/armbianEnv.txt :
extraargs=cma=128M isolcpus=5,7

I've just tried to compile it and it seems to work fine, do you have the following file?
/usr/lib/linuxcnc/modules/hal_op5_io.so

In case you don't have that file you could try to copy the already compiled file (hal_op5_io.so from the zip file) to "/usr/lib/linuxcnc/modules/"

Please Log in to join the conversation.

More
2 years 4 months ago #302663 by Hossein74Majidi
Yeah, I do have the hal_op5_io.so file in that directory.
Now I'm getting this error:
Thread 'base-thread' not found.
does it mean something wrong with my hal_op5_io?

Please Log in to join the conversation.

More
2 years 4 months ago #302664 by Cant do this anymore bye all
Means there's an issue with your config, could be a typo.

Posting hal & ini helps.

Please Log in to join the conversation.

More
2 years 4 months ago #302665 by Hossein74Majidi
Here's my hal and ini file.
The whole error is attached too.
 

Please Log in to join the conversation.

More
2 years 4 months ago #302672 by Cant do this anymore bye all
Your hal file in missing the lines that load the base & servo thread. And few other bits & pieces.
At the start of your hal file you'll need something like this
Code:
# first load all the RT modules that will be needed # kinematics loadrt [KINS]KINEMATICS # motion controller, get name and thread periods from INI file loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS

And you need to sort out the issue with
Code:
mv: cannot stat 'dev/ttyFIQ0'
This could be the file not existing or you don't have the correct permissions to access the file. Unfortunately as the whole error log isn't there, just a screenshot or a small part, I can't comment any further.

Please Log in to join the conversation.

More
2 years 4 months ago #302676 by Hossein74Majidi
Yes Thanks a lot. That was the problem
and also after correcting that, "mv: cannot stat 'dev/ttyFIQ0'" doesn't show up anymore too.
Thank u

Please Log in to join the conversation.

More
2 years 1 month ago #310047 by briansm
Thanks for the excellent work @royka! Your deb files are exceptionally good.
I've experimented with various PREEMPT_RT patches for kernels 6.6 and 6.1, but haven't been able to achieve the impressively low real-time latency that you did for kernel 5.10.160 (testing with OrangePi5 Plus and OrangePi5 Max).
Could you share some insights for us to learn from? Or do you have the kernel patch/source that I can use to reproduce your build for kernel 5.10.160? I'd like to learn and apply the same techniques for a board with a Cortex A35 processor.

Please Log in to join the conversation.

More
2 years 1 month ago #310090 by royka
Because the source was not mainlined the bsp source was necessary. At the beginning I used the already rt patched source of Rockchip, because the bsp source seems to be cherry picked updated so applying the rt patch yourself won't work.
Then I created a rt patch by comparing the "original" rockchip source by the rt source.

After that, Orange Pi published a rt patched source, to compile that source see:
forum.linuxcnc.org/18-computer/48079-can...cnc?start=310#298309

The config in the attachment (copied from the Rockchip source and added a few things) works well with the RK3588.
So you could try to use that as a reference for the timers/schedulers.

Please Log in to join the conversation.

More
2 years 1 month ago #310094 by briansm
Thanks Royka!
FYR, I left the board run overnight. The max latency was less than 1us. Normally, it's 50 or 100us with other kernel rt patches:


In The cyclictest, the isolated cores (5, 7) have latency less than 3us

Please Log in to join the conversation.

More
2 years 1 month ago #310108 by royka
That's a pretty impressive result! From which board is this?

Please Log in to join the conversation.

Time to create page: 0.201 seconds
Powered by Kunena Forum