Probotix PBX cape on BBB can't start linuxCNC

393 views
Skip to first unread message

Stuart Childs

unread,
May 22, 2015, 5:49:10 AM5/22/15
to machi...@googlegroups.com
Hi, tentative post up after a few days of searching and no success thus far.

I feel a bit like I'm chasing incorrect info due to state of flux / quick development that is going on - I appreciate that. So, feels like some old topics here might not be relevant to my problem, relating to disabling HDMI etc.

My setup is: PBX cape on a recent BBB (rev C I believe). Have downloaded and installed most recent MachineKit image from here: https://rcn-ee.com/rootfs/bb.org/testing/2015-05-17/machinekit/bone-debian-7.8-machinekit-armhf-2015-05-17-4gb.img.xz

Booted BBB and apt-get update / upgrade.

output from uname -a  :  Linux beaglebone 3.8.13-xenomai-r72 #1 Tue Apr 21 20:09:07 UTC 2015 armv7l GNU/Linux

output from cat /sys/devices/bone_capemgr.9/slots :

 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 6: ff:P-O-L Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
 7: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-universal



executing 'linuxcnc' opens up window to choose config. I have tried the most obvious (/ARM/BeagleBone/Probotix/*)  and after reading Mark's comments here : https://groups.google.com/forum/#!searchin/machinekit/rtapi|sort:date/machinekit/Je4EGa1wLJ4/fuF-LuvU28MJ  I tried the /ARM/BeagleBone/PMDX-432/Shapeoko configs.

Errors from the Shapeoko configs bring up the Machinekit starting splash image, then fails with:

MACHINEKIT - 0.1
Machine configuration directory is '/home/machinekit/linuxcnc/configs/ARM.BeagleBone.PMDX-432.Shapeoko'
Machine configuration file is 'GPIO-Driven.ini'
Starting Machinekit...
io started
halcmd loadusr io started
Loading BB-BLACK-LCNC-K9 overlay
X11 connection rejected because of wrong authentication.
bash: line 0: echo: write error: No such file or directory
Error loading device tree overlay file: BB-BLACK-LCNC-K9
Shapeoko.hal:28: program './setup.Shapeoko.sh' failed, returned 1
Shutting down and cleaning up Machinekit...
Cleanup done



Running with a Probotix Comet config doesn't get me as far - I have a different error:

MACHINEKIT - 0.1
Machine configuration directory is '/home/machinekit/linuxcnc/configs/ARM.BeagleBone.Probotix'
Machine configuration file is 'CometNP_Metric.ini'
Starting Machinekit...
io started
Unrecognized line skipped: POC     FMS     LEN     DIAM    COMMENT
halcmd loadusr io started
cape-universal overlay found
Comet.hal:18: insmod failed, returned -1:
rtapi_app_main(hal_pru_generic): -1 Operation not permitted

See /var/log/linuxcnc.log for more information.
Shutting down and cleaning up Machinekit...
Cleanup done


Things I am not sure about:

- should I be worried that nothing appears in 'slot 0' when I cat the capemgr file
- what to change in the configs to get linuxcnc to start up happily.
- should any of the above configs Just Work?
- if there is a definitive / up-to-date resource to help with this?

Can't seem to find anybody with the same problem.

Aim is to drive a 3-axis CNC mill using geckodrive stepper modules - got this all ready to go. Have had some experience using EMC on an old PC but wanted to go 'modern'!

Any help / thoughts appreciated.

Cheers
Stuart

Charles Steinkuehler

unread,
May 22, 2015, 12:37:59 PM5/22/15
to machi...@googlegroups.com
On 5/22/2015 4:49 AM, Stuart Childs wrote:
>
> Things I am not sure about:
>
> - should I be worried that nothing appears in 'slot 0' when I cat the
> capemgr file

No, it just means the cape EEPROM isn't programmed.

> - what to change in the configs to get linuxcnc to start up happily.
> - should any of the above configs Just Work?

The Probotix/Comet configurations should work. I've tested them on
actual Probotix hardware, but it's been a while. The PMDX HAL file
won't work with your hardware, but the ini file settings may be
helpful in crafting a Shapeoko config for the Probotix board.

The error you're seeing is when the PRU driver is loading (assuming
you've got the stock HAL file, that's what's on line 18), and I don't
think I've seen that particular error before (it's not the common
"can't find the PRU binary" problem that was fixed a while ago).

Please provide details of what's in your /var/log/linuxcnc.log file
and how you're trying to run the software (local with HDMI display,
remote via X11 tunneled through ssh, etc).

--
Charles Steinkuehler
cha...@steinkuehler.net

Kent A. Reed

unread,
May 22, 2015, 6:04:14 PM5/22/15
to machi...@googlegroups.com
On 05/22/2015 05:49 AM, Stuart Childs wrote:
X11 connection rejected because of wrong authentication.

The occurrence of this message was mentioned on this list last fall by me among others. I know some changes to the code-base were also being made at that time and IIRC the message stopped occurring. I wasn't paying close attention because I was only testing the code, not building a BBB-system. Try searching the list on just that text string.

Regards,
Kent

Charles Steinkuehler

unread,
May 22, 2015, 7:25:40 PM5/22/15
to machi...@googlegroups.com
That appears to be fallout from trying the PMDX configuration, which
can't load it's overlay because the cape-universal already got loaded.

I was worried about the error from the Probotix config (which _should_
work) complaining about line 18 of the HAL file:

halcmd loadusr io started
cape-universal overlay found
Comet.hal:18: insmod failed, returned -1:
rtapi_app_main(hal_pru_generic): -1 Operation not permitted

...but more details are needed to know exactly what's going wrong.

--
Charles Steinkuehler
cha...@steinkuehler.net

Andrew Back

unread,
May 25, 2015, 8:44:07 AM5/25/15
to machi...@googlegroups.com
Hi Charles,

I work with Stuart and since he won't be reunited with the mill until Wednesday, I thought I'd take a look at this.


On Friday, 22 May 2015 17:37:59 UTC+1, Charles Steinkuehler wrote:
On 5/22/2015 4:49 AM, Stuart Childs wrote:
>
> Things I am not sure about:
>
> - should I be worried that nothing appears in 'slot 0' when I cat the
> capemgr file

No, it just means the cape EEPROM isn't programmed.

Does it need programming, or is that just for automatic loading of overlays/drivers?

> - what to change in the configs to get linuxcnc to start up happily.
> - should any of the above configs Just Work?

The Probotix/Comet configurations should work.  I've tested them on
actual Probotix hardware, but it's been a while.  The PMDX HAL file
won't work with your hardware, but the ini file settings may be
helpful in crafting a Shapeoko config for the Probotix board.

The error you're seeing is when the PRU driver is loading (assuming
you've got the stock HAL file, that's what's on line 18), and I don't
think I've seen that particular error before (it's not the common
"can't find the PRU binary" problem that was fixed a while ago).

None of the config has been modified and it's all stock from the latest disk image and packages.

Please provide details of what's in your /var/log/linuxcnc.log file
and how you're trying to run the software (local with HDMI display,
remote via X11 tunneled through ssh, etc).

Tried both local and tunneled over SSH.

The linuxcnc.log created when attempting to start Probotix CometNP_Metric configuration from the local desktop is attached.

Regards,

Andrew
probotix_CometNP_Metric_linuxcnc.log

Charles Steinkuehler

unread,
May 25, 2015, 9:03:09 AM5/25/15
to machi...@googlegroups.com
On 5/25/2015 7:44 AM, Andrew Back wrote:
> Hi Charles,
>
> I work with Stuart and since he won't be reunited with the mill until
> Wednesday, I thought I'd take a look at this.
>
> On Friday, 22 May 2015 17:37:59 UTC+1, Charles Steinkuehler wrote:
>>
>> On 5/22/2015 4:49 AM, Stuart Childs wrote:
>>>
>>> Things I am not sure about:
>>>
>>> - should I be worried that nothing appears in 'slot 0' when I cat the
>>> capemgr file
>>
>> No, it just means the cape EEPROM isn't programmed.
>>
>
> Does it need programming, or is that just for automatic loading of
> overlays/drivers?

It's OK if the EEPROM isn't programmed. It just means the cape
overlay needs to be manually loaded instead of automatically loaded at
boot.

>> - what to change in the configs to get linuxcnc to start up happily.
>>> - should any of the above configs Just Work?
>>
>> The Probotix/Comet configurations should work. I've tested them on
>> actual Probotix hardware, but it's been a while. The PMDX HAL file
>> won't work with your hardware, but the ini file settings may be
>> helpful in crafting a Shapeoko config for the Probotix board.
>>
>> The error you're seeing is when the PRU driver is loading (assuming
>> you've got the stock HAL file, that's what's on line 18), and I don't
>> think I've seen that particular error before (it's not the common
>> "can't find the PRU binary" problem that was fixed a while ago).
>
> None of the config has been modified and it's all stock from the latest
> disk image and packages.
>
> Please provide details of what's in your /var/log/linuxcnc.log file
>> and how you're trying to run the software (local with HDMI display,
>> remote via X11 tunneled through ssh, etc).
>>
>
> Tried both local and tunneled over SSH.
>
> The linuxcnc.log created when attempting to start Probotix CometNP_Metric
> configuration from the local desktop is attached.

Thanks, that points out the problem (line 29 of the log):

> May 25 12:14:11 beaglebone msgd:0: hal_lib:1661:rt hal_pin_newfv:28 HAL error: length 49 invalid for name starting 'hal_pru_generic.stepgen.00.dbg_pos_minus_'

In summary, the HAL name for a pin is too long. The solution is to
pass a halname= parameter to the PRU driver, and change the HAL file
signal names to match.

To fix this in the Comet HAL file, append "halname=hpg" (without the
quotes) to line 18 (the loadrt line for the PRU driver). Then change
all instances of "[PRUCONF](DRIVER)" to "hpg" _except_ for the one on
line 18 (and again, without the quotes).

I'll try to get a fix checked in soon, but it will be a while until
packages are built. Holler if you run into any more problems getting
the configuration running.

--
Charles Steinkuehler
cha...@steinkuehler.net

Andrew Back

unread,
May 25, 2015, 9:05:21 AM5/25/15
to machi...@googlegroups.com
Also just tried loading the PRU HAL component via halrun:

machinekit@novamill:~$ halrun
msgd:0 stopped
rtapi:0 stopped
halcmd: loadrt hal_pru_generic prucode=/usr/lib/linuxcnc/xenomai/pru_generic.bin pru=1 num_stepgens=5
<stdin>:1: insmod failed, returned -1:

rtapi_app_main(hal_pru_generic): -1 Operation not permitted

See /var/log/linuxcnc.log for more information.

machinekit@novamill:~$ file /usr/lib/linuxcnc/xenomai/pru_generic.bin
/usr/lib/linuxcnc/xenomai/pru_generic.bin: 8086 relocatable (Microsoft)
machinekit@novamill:~$ ls -l /usr/lib/linuxcnc/xenomai/pru_generic.bin
-rw-r--r-- 1 root root 848 May 19 19:49 /usr/lib/linuxcnc/xenomai/pru_generic.bin

And in linuxcnc.log:

May 25 12:52:58 novamill rtapi:0: rtapi_app_main(hal_pru_generic): -1 Operation not permitted
May 25 12:52:58 novamill msgd:0: hal_lib:1714:rt prussdrv_init
May 25 12:52:58 novamill msgd:0: hal_lib:1714:rt prussdrv_open
May 25 12:52:58 novamill msgd:0: hal_lib:1714:rt hpg: ERROR: failed to initialize PRU
May 25 12:52:58 novamill msgd:0: rtapi_app:1714:user rtapi_app_main(hal_pru_generic): -1 Operation not permitted

Regards,

Andrew

Andrew Back

unread,
May 25, 2015, 9:34:03 AM5/25/15
to machi...@googlegroups.com
On Monday, 25 May 2015 14:03:09 UTC+1, Charles Steinkuehler wrote:
On 5/25/2015 7:44 AM, Andrew Back wrote:
> Hi Charles,
>
> I work with Stuart and since he won't be reunited with the mill until
> Wednesday, I thought I'd take a look at this.
>
> On Friday, 22 May 2015 17:37:59 UTC+1, Charles Steinkuehler wrote:
>>
>> On 5/22/2015 4:49 AM, Stuart Childs wrote:
>>>
>>> Things I am not sure about:
>>>
>>> - should I be worried that nothing appears in 'slot 0' when I cat the
>>> capemgr file
>>
>> No, it just means the cape EEPROM isn't programmed.
>>
>
> Does it need programming, or is that just for automatic loading of
> overlays/drivers?

It's OK if the EEPROM isn't programmed.  It just means the cape
overlay needs to be manually loaded instead of automatically loaded at
boot.

Right, that's good to know.
 

That did the trick, many thanks! Axis now starts up fine.

I'll try to get a fix checked in soon, but it will be a while until
packages are built.  Holler if you run into any more problems getting
the configuration running.

Thank you, it's much appreciated. We'll see how far we can get in configuring for this machine, but as complete HAL novices it's possible that other questions may crop up.

Cheers,

Andrew

Stuart Childs

unread,
May 26, 2015, 5:49:45 AM5/26/15
to machi...@googlegroups.com
Thanks for the help here, Charles. Very much appreciated.

Reply all
Reply to author
Forward
0 new messages