Can the OPI5 be Configured to Run LCNC?
31 May 2023 14:44 #272571
by royka
Replied by royka on topic Can the OPI5 be Configured to Run LCNC?
Yes the GPIO pins. I had it connected with a small speaker wire with dupont connectors. If you solder the wires, a shrink tubing won't hurt.
The following user(s) said Thank You: echristley
Please Log in or Create an account to join the conversation.
10 Jun 2023 15:05 #273269
by buzzFab
Replied by buzzFab on topic Can the OPI5 be Configured to Run LCNC?
OPi5+ show up yesterday, I guess I should have paid more attention to the details, I figured I could power it with 12v like the NANO-PC T6 but it needs 5v 4a through USB-C or the header pins I guess. I ordered a Meanwell MDR-40-5 DIN mount PSU but wont be here for like a week. I will see if I have a wall charger that I can use temporarily
I see that Orangepi-Xunlong released some official images of Debian Bullseye and Bookwork which I will test out first before trying the Armbian Jammy image that Royka built .
Eric
I see that Orangepi-Xunlong released some official images of Debian Bullseye and Bookwork which I will test out first before trying the Armbian Jammy image that Royka built .
Eric
Please Log in or Create an account to join the conversation.
12 Jun 2023 21:03 #273419
by royka
Replied by royka on topic Can the OPI5 be Configured to Run LCNC?
Nice, mine should have arrived Saturday according to the local delivery service, hopefully it will come this week. Yup that's a downside of the opi5 indeed, but that Meanwell psu looks nice, better than the steel ones.
Joshua Riek has made some commits for the Opi5+ which I'll copy:
github.com/Joshua-Riek/ubuntu-rockchip/commits/main
Tip, to make a patch out of a commit:
first git clone ... then in that directory
git format-patch 012a366^..012a366 --stdout > ../name.patch
Joshua Riek has made some commits for the Opi5+ which I'll copy:
github.com/Joshua-Riek/ubuntu-rockchip/commits/main
Tip, to make a patch out of a commit:
first git clone ... then in that directory
git format-patch 012a366^..012a366 --stdout > ../name.patch
Please Log in or Create an account to join the conversation.
13 Jun 2023 03:05 - 13 Jun 2023 03:16 #273438
by buzzFab
Replied by buzzFab on topic Can the OPI5 be Configured to Run LCNC?
@royka, I tried to dl you image you made but its too big, i got 96% which took like 45 mins to download then it stopped saying I'm over the daily limit and if I will have to pay to get the rest.
In the thread on the armbian forum Efe Çetin posted an image but even when i link to the correct .dtb file it fails to boot properly,
I tried the official orangepi bookwork release so I could just apt install linuxcnc-uspace but it wouldn't finish the install and errored out.
i already downloaded github.com/Joshua-Riek/ubuntu-rockchip/r...orangepi5plus.img.xz but have not yet tried to boot it up.
I am also trying to download your op5 bookwork image you made on mega.nz but i think it will also get cut off. that site just want me to open my wallet for them.
If I have to use ubuntu I would prefer kintec kudu as linuxcnc-uspace is in the kintec repos like debian bookworm.
I guess I need to learn more about git, github, building armbian images, patches and rt-kernal. I installed ubuntu on a amd64 pc so I can try to build an image.
In the thread on the armbian forum Efe Çetin posted an image but even when i link to the correct .dtb file it fails to boot properly,
I tried the official orangepi bookwork release so I could just apt install linuxcnc-uspace but it wouldn't finish the install and errored out.
i already downloaded github.com/Joshua-Riek/ubuntu-rockchip/r...orangepi5plus.img.xz but have not yet tried to boot it up.
I am also trying to download your op5 bookwork image you made on mega.nz but i think it will also get cut off. that site just want me to open my wallet for them.
If I have to use ubuntu I would prefer kintec kudu as linuxcnc-uspace is in the kintec repos like debian bookworm.
I guess I need to learn more about git, github, building armbian images, patches and rt-kernal. I installed ubuntu on a amd64 pc so I can try to build an image.
Last edit: 13 Jun 2023 03:16 by buzzFab.
Please Log in or Create an account to join the conversation.
- echristley
- Offline
- Premium Member
Less
More
- Posts: 99
- Thank you received: 23
14 Jun 2023 02:27 #273526
by echristley
Replied by echristley on topic Can the OPI5 be Configured to Run LCNC?
Progress report:
- I got all the hardware rounded up and installed in a box.
- I've verified that the OPi5 can ping the Mesa7i96s. Don't have mesaflash on the Pi, so I wasn't able to get a report from the card.
- I've run through PncConf, but so far I've not been able to get any of the motors to move. I have everything except the Pulse and Dir of each motor disconnected for now.
Please Log in or Create an account to join the conversation.
14 Jun 2023 03:36 #273529
by rodw
Replied by rodw on topic Can the OPI5 be Configured to Run LCNC?
mesaflash is in the debian bookworm repos
sudo apt install mesaflash
alternatively, its simple to build from source.
github.com/LinuxCNC/mesaflash
sudo apt install mesaflash
alternatively, its simple to build from source.
github.com/LinuxCNC/mesaflash
Please Log in or Create an account to join the conversation.
14 Jun 2023 21:37 #273554
by Guglielmi
Replied by Guglielmi on topic Can the OPI5 be Configured to Run LCNC?
Hi, as promised, I finalized and tested the gpio driver for OPI5.
It is based on wiringPi provided with wiringOP.
In my first release I cut & paste functions on my driver in order to have all in one but finally I though it could be a big advantage to
keep wiringPi mostly as it is so in future someone else could take last official release and attach to my code easily..
I accept suggestions here... in order to complete this step, I renamed 2 files xxx.c to xxx_c.h, including them in my .c driver.
I don't know other way to include the c part with functions implementation. I commented step by step in the driver how to do.
Attached driver.c and file.so already built.
I tested with oscilloscope and IN and OUT are working as expected.
Another couple of doubts are related to permissions to set for uart, I'm configuring them into the driver.. for me it's ok... and the debug port that I don't know way but I'm not able to have in the system with correct name ttyS2 so it works renaming it.
WiringIp allows to use uart, 1wire, i2c.. so in future it's possible to extend the driver with some new interfaces for linuxcnc..
It is based on wiringPi provided with wiringOP.
In my first release I cut & paste functions on my driver in order to have all in one but finally I though it could be a big advantage to
keep wiringPi mostly as it is so in future someone else could take last official release and attach to my code easily..
I accept suggestions here... in order to complete this step, I renamed 2 files xxx.c to xxx_c.h, including them in my .c driver.
I don't know other way to include the c part with functions implementation. I commented step by step in the driver how to do.
Attached driver.c and file.so already built.
I tested with oscilloscope and IN and OUT are working as expected.
Another couple of doubts are related to permissions to set for uart, I'm configuring them into the driver.. for me it's ok... and the debug port that I don't know way but I'm not able to have in the system with correct name ttyS2 so it works renaming it.
WiringIp allows to use uart, 1wire, i2c.. so in future it's possible to extend the driver with some new interfaces for linuxcnc..
// how to build the driver:
// 1. clone linuxcnc branch on opi5
// 2. copy this file inside linuxcnc/src/hal/drivers
// 3. clone next branch of wiringOP
// 4. create a folder linuxcnc/src/hal/drivers/opi5
// 5. copy wiringPi folder and version.h file included into wiringOP package into opi5
// 6. inside opi5/wiringPi find and rename file: wiringPi.c --> wiringPi_c.h
// 7. inside opi5/wiringPi find and rename file: piHiPri.c --> piHiPri_c.h
// 8. build the driver "sudo halcompile --install /home/USER/WhereLinuxCNCWasCloned/linuxcnc/src/hal/drivers/hal_op5_io.c"
/* How to use in hal:
copy and paste this piece of text
# ========= GPIO -> WiringPI pins =======================
# The number of pin correspond to the number of wPi in the table calling "gpio readall", for opi5 0-16
# 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
# 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
#
# 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 1 0 1 --> 51333 // dir [bin to dec] mask (0 = IN, 1 = OUT)
# 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 --> 24 // exclude [bin to dec] mask (0 = used, 1 = Excluded)
# excluded pins for serial (modbus)
# using uart1 for modbus, wpi 3-4 should be excluded.
loadrt hal_op5_io dir=51333 exclude=24
# --- begin addf s
addf hal_op5_io.read base-thread # <== read task
addf stepgen.make-pulses base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf hal_op5_io.write base-thread # <== write task
# --- end addf s
# The number of pin correspond to the number of wPi in the table calling "gpio readall"
net xstep stepgen.0.step => hal_op5_io.pin-02-out
net ystep stepgen.1.step => hal_op5_io.pin-11-out
net zstep stepgen.2.step => hal_op5_io.pin-15-out
*/
Please Log in or Create an account to join the conversation.
15 Jun 2023 02:10 - 15 Jun 2023 02:19 #273568
by buzzFab
Replied by buzzFab on topic Can the OPI5 be Configured to Run LCNC?
OPi5 Plus,
I built a bookwork server image, EDGE isn't an option only LEGACY. It booted up without and problems.
I then did this
upon reboot I xfce was working so I then did
added this line to isolate cpus
then installed linuxcnc with
but the jitter is horrible.
see attached screenshot
I built a bookwork server image, EDGE isn't an option only LEGACY. It booted up without and problems.
I then did this
sudo apt update && sudo apt upgrade
sudo apt install tasksel -y
sudo tasksel install xfce-desktop
sudo reboot
upon reboot I xfce was working so I then did
sudo nano /boot/armbianEnv.txt
added this line to isolate cpus
extraargs=isolcpus=4,5,6,7
then installed linuxcnc with
sudo apt-get install linuxcnc-uspace linuxcnc-uspace-dev mesaflash
but the jitter is horrible.
see attached screenshot
Attachments:
Last edit: 15 Jun 2023 02:19 by buzzFab.
Please Log in or Create an account to join the conversation.
15 Jun 2023 02:18 #273569
by pippin88
Replied by pippin88 on topic Can the OPI5 be Configured to Run LCNC?
Is it really Realtime kernel?
Please Log in or Create an account to join the conversation.
15 Jun 2023 02:26 #273570
by rodw
Replied by rodw on topic Can the OPI5 be Configured to Run LCNC?
I don't think so. MAybe somebody with more armbian experience might know. sudo apt install linux-image-rt-arm64 (If I typed that right)
Installs the RT kernel but it does not boot into it. Perhpas there are some ARM specific steps to follow.
Otherwise when you build hte kernel you need to select preempt_rt and patch it
Installs the RT kernel but it does not boot into it. Perhpas there are some ARM specific steps to follow.
Otherwise when you build hte kernel you need to select preempt_rt and patch it
Please Log in or Create an account to join the conversation.
Time to create page: 0.122 seconds