- Hardware & Machines
- Computers and Hardware
- BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
31 Jul 2021 14:39 #216454
by Cncninja
Replied by Cncninja on topic BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
Do not use Remora, I spent time and money and got it all set up and running only to find out it can only do 25khz step rate (confirmed). The built-in RPI4 I/O can do better, not much but still no point.
Please Log in or Create an account to join the conversation.
31 Jul 2021 18:54 #216474
by Bari
Replied by Bari on topic BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
Seems a bit overly dramatic. Remora just needs some adjustments to step at higher rates.
Your earlier post even points that out. forum.linuxcnc.org/18-computer/42276-rem...spi?start=170#216453
Your earlier post even points that out. forum.linuxcnc.org/18-computer/42276-rem...spi?start=170#216453
Please Log in or Create an account to join the conversation.
31 Jul 2021 20:01 - 31 Jul 2021 20:03 #216480
by MalteS
Replied by MalteS on topic BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
At the time when I started the lathe project I considered Mesa but by reading the manuals I figured that I need at least two cards for the number of encoder inputs:
2 Glasscales
2 MPGs
1 Spindle Encoder
Plus the usual stuff on a lathe (Pwmgen for 2 Steppers, inputs for limit switches, PWM for Spindle Speed, some inputs for hardware buttons)
I got rid of the Glassscales meanwhile so it seems I can get away with a single 7i76. I just quickly checked the Remora and I don't think it would provide the number of inputs I need.
But I'm not on this route yet as I have not fully used the time set by my timebox of porting the code.
I did look at the code here: github.com/SebKuzminsky/hostmot2-firmware-beaglebone and believe this is an attempt to load FW to the PRUs via hostmod2. There are some hard coded valued in the main.c and my impression is that this was an attempt but is far away from the functionality provided by the machinekit driver (e.g. it seems to do only PWM out on hard coded PINs)
BR,
Malte
2 Glasscales
2 MPGs
1 Spindle Encoder
Plus the usual stuff on a lathe (Pwmgen for 2 Steppers, inputs for limit switches, PWM for Spindle Speed, some inputs for hardware buttons)
I got rid of the Glassscales meanwhile so it seems I can get away with a single 7i76. I just quickly checked the Remora and I don't think it would provide the number of inputs I need.
But I'm not on this route yet as I have not fully used the time set by my timebox of porting the code.
I did look at the code here: github.com/SebKuzminsky/hostmot2-firmware-beaglebone and believe this is an attempt to load FW to the PRUs via hostmod2. There are some hard coded valued in the main.c and my impression is that this was an attempt but is far away from the functionality provided by the machinekit driver (e.g. it seems to do only PWM out on hard coded PINs)
BR,
Malte
Last edit: 31 Jul 2021 20:03 by MalteS.
Please Log in or Create an account to join the conversation.
31 Jul 2021 20:04 #216481
by Cncninja
Replied by Cncninja on topic BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
Your right, it's a great project, and big thanks to the devs, just in my case I need something better than the 20khz, I just built up a whole control and now need to find something else, like the H3. setting back my ship dates, im stuck in a position i cant wait even tho this has great future potential. I was hoping to ship with a SBC all included control system v.s. ext like Mach and acorn(ext PC) VS (internal RPI).
Please Log in or Create an account to join the conversation.
01 Aug 2021 15:20 - 01 Aug 2021 15:21 #216617
by andypugh
Replied by andypugh on topic BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
If you want to experiment with the PRU driver then I created a test branch of LinuxCNC with it included.
If you are building from source then just:
git checkout andypugh/bb_pru
And compile as usual.
I haven't tested it which is why it has not yet been merged with the LinuxCNC mainline.
If you are building from source then just:
git checkout andypugh/bb_pru
And compile as usual.
I haven't tested it which is why it has not yet been merged with the LinuxCNC mainline.
Last edit: 01 Aug 2021 15:21 by andypugh.
Please Log in or Create an account to join the conversation.
01 Aug 2021 16:04 #216620
by andypugh
Replied by andypugh on topic BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
I found a BBB on a shelf. What's the easiest route to get an RT kernel on there?
Please Log in or Create an account to join the conversation.
01 Aug 2021 17:05 - 01 Aug 2021 17:20 #216631
by cakeslob
Replied by cakeslob on topic BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
Most of the time the easiest way is using machinekit image by robert nelson, he is still generating bbb images, but I think they have an issue with buster according to their git, so he hasnt made any for buster, just stretch
elinux.org/Beagleboard:BeagleBoneBlack_D...l_Revs.29_Machinekit
I havent tried any iof the non machinekit images in a long time, so dont know for sure, but this one seems rt, or some of the ROS images appear to be rt kernels
elinux.org/Beagleboard:BeagleBoneBlack_D...line_.285.4.x_lts.29
edit, also I think newer images come with the graphics driver installed, but they have to also be a TI kernel, so -ti -rt kernel image
here is some info on the graphics driver if you feel up to it, my hope is with the driver installed, axis wont be so bogged down by software generated graphics, but I have not completed the install with driver, as i ran into xrandr issues. here are some links about it
very.busted.systems/PowerVR-SGX-on-the-beaglebone-black-in-2019
elinux.org/BeagleBoneBlack/SGX_%2B_Qt_EG...ston#The_NEW_Version
elinux.org/Beagleboard:BeagleBoneBlack_D...l_Revs.29_Machinekit
I havent tried any iof the non machinekit images in a long time, so dont know for sure, but this one seems rt, or some of the ROS images appear to be rt kernels
elinux.org/Beagleboard:BeagleBoneBlack_D...line_.285.4.x_lts.29
edit, also I think newer images come with the graphics driver installed, but they have to also be a TI kernel, so -ti -rt kernel image
here is some info on the graphics driver if you feel up to it, my hope is with the driver installed, axis wont be so bogged down by software generated graphics, but I have not completed the install with driver, as i ran into xrandr issues. here are some links about it
very.busted.systems/PowerVR-SGX-on-the-beaglebone-black-in-2019
elinux.org/BeagleBoneBlack/SGX_%2B_Qt_EG...ston#The_NEW_Version
Last edit: 01 Aug 2021 17:20 by cakeslob.
Please Log in or Create an account to join the conversation.
02 Aug 2021 01:54 #216663
by cakeslob
ahh it was in a separate repo, this one looks like a machinekit port correct?
Replied by cakeslob on topic BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
ahh good to knowI did look at the code here: github.com/SebKuzminsky/hostmot2-firmware-beaglebone and believe this is an attempt to load FW to the PRUs via hostmod2. There are some hard coded valued in the main.c and my impression is that this was an attempt but is far away from the functionality provided by the machinekit driver (e.g. it seems to do only PWM out on hard coded PINs)
If you want to experiment with the PRU driver then I created a test branch of LinuxCNC with it included.
If you are building from source then just:
git checkout andypugh/bb_pru
And compile as usual.
I haven't tested it which is why it has not yet been merged with the LinuxCNC mainline.
ahh it was in a separate repo, this one looks like a machinekit port correct?
Please Log in or Create an account to join the conversation.
02 Aug 2021 08:37 #216675
by andypugh
Yes, it is the Machinekit driver merged in to LinuxCNC. It will only get compiled if the platform is BBB, I think.
Which is why I didn't test it at the time. And then the user who asked for it didn't test it either...
Replied by andypugh on topic BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
ahh it was in a separate repo, this one looks like a machinekit port correct?If you want to experiment with the PRU driver then I created a test git checkout andypugh/bb_pru
Yes, it is the Machinekit driver merged in to LinuxCNC. It will only get compiled if the platform is BBB, I think.
Which is why I didn't test it at the time. And then the user who asked for it didn't test it either...
Please Log in or Create an account to join the conversation.
02 Aug 2021 19:10 - 02 Aug 2021 19:25 #216737
by MalteS
Replied by MalteS on topic BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
Thanks Andy
I managed to compile your branch on the BBB and Linuxcnc starts if not supplied with a config file.
The hal_pru_generic driver is not build by default and I figured that I need to define TARGET_PLATFORM_BEAGLEBONE and set PASM to point to the pru assembler. I got the assembler off github and compiled that for the BBB.
So running:
make TARGET_PLATFORM_BEAGLEBONE=1 PASM="/home/machinekit/experiment/am335x_pru_package/pru_sw/utils/pasm"
Results in the output below that I'm not yet quite able to interpret.
If there are good ideas let me know. Otherwise I'll continue in the next days.
[/code]
I managed to compile your branch on the BBB and Linuxcnc starts if not supplied with a config file.
The hal_pru_generic driver is not build by default and I figured that I need to define TARGET_PLATFORM_BEAGLEBONE and set PASM to point to the pru assembler. I got the assembler off github and compiled that for the BBB.
So running:
make TARGET_PLATFORM_BEAGLEBONE=1 PASM="/home/machinekit/experiment/am335x_pru_package/pru_sw/utils/pasm"
Results in the output below that I'm not yet quite able to interpret.
If there are good ideas let me know. Otherwise I'll continue in the next days.
Reading 198/198 dependency files
Done reading dependencies
Reading 214/214 realtime dependency files
Done reading realtime dependencies
Assembling PRU code objects/hal/drivers/hal_pru_generic/pru_generic.bin
PRU Assembler Version 0.87
Copyright (C) 2005-2013 by Texas Instruments Inc.
[code]pru.h:1: Error: Invalid opcode
pru.h:1: Warning: Using default code origin of 8
pru.h:2: Error: Syntax error in Cmd/Opcode
pru.h:3: Error: Invalid opcode
pru.h:4: Error: Syntax error in Cmd/Opcode
pru_generic.p:96: Error: Can not use .setcallreg after code generation
pru_generic.p:140: Error: .origin value is less than current offset
pru_generic.p:174: Error: Instruction illegal with specified core version
pru_generic.p:177: Error: Operand 2 invalid constant table entry 'CONST_PRUCFG'
pru_generic.p:179: Error: Operand 2 invalid constant table entry 'CONST_PRUCFG'
pru_generic.p:217: Error: Instruction illegal with specified core version
pru_wait.p:87: Error: Instruction illegal with specified core version
pru_wait.p:147: Error: Operand 2 invalid constant table entry 'CONST_IEP'
pru_wait.p:173: Error: Operand 2 invalid constant table entry 'CONST_IEP'
pru_wait.p:175: Error: Operand 2 invalid constant table entry 'CONST_IEP'
pru_wait.p:215: Error: Operand 2 'State.GPIO0_CLR_ADDR' invalid register or register mode
pru_wait.p:216: Error: Operand 2 'State.GPIO1_CLR_ADDR' invalid register or register mode
pru_wait.p:217: Error: Operand 2 'State.GPIO2_CLR_ADDR' invalid register or register mode
pru_wait.p:218: Error: Operand 2 'State.GPIO3_CLR_ADDR' invalid register or register mode
pru_deltasigma.p:53: Error: Operand 2 'GState.State_reg2' invalid register or register mode
pru_deltasigma.p:65: Error: Operand 1 'Output' invalid register or register mode
pru_deltasigma.p:65: Error: Illegal SIZE/OFFSET operand 'Output'
pru_deltasigma.p:65: Error: Error in struct parsing parameter 4
pru_deltasigma.p:68: Error: Operand 2 'Output.Value' invalid register or register mode
pru_deltasigma.p:69: Error: Operand 1 'Output.Integrate' invalid register or register mode
pru_deltasigma.p:72: Error: Operand 2 'Output.Integrate' invalid register or register mode
Aborting...
Aborting...
Aborting...
Aborting...
Aborting...
Aborting...
Aborting...
Last edit: 02 Aug 2021 19:25 by MalteS.
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Computers and Hardware
- BeagleBone Black and PRU Driver for Linuxcnc? Or switch to RP-4 / Mesa?
Time to create page: 0.175 seconds