> On 04 Apr 2018, at 02:51, Rick Mann <[email protected]> wrote:
> 
> 
> 
>> On Apr 3, 2018, at 02:23 , Bas de Bruijn <[email protected]> wrote:
>> 
>> 
>> 
>> On 3 Apr 2018, at 10:29, Rick M <[email protected]> wrote:
>> 
>>> Bit of an update. I'm still stuck in the same issue. I re-flashed my BBB 
>>> with the latest image:
>>> 
>>>    bone-debian-9.4-machinekit-armhf-2018-03-25-4gb
>>> 
>>> And I get the same problem. Either it can't insmod because it lacks 
>>> permission, or if I run as root, I get:
>> 
>> You should not run as root. What is the error when you run normally?
>> 
>> export DEBUG=5
>> machinekit 
>> 
>> What does /var/log/linuxcnc.log say?
>> 
>> Please pastebin that session.
> 
> linuxcnc.log:         https://pastebin.com/fzc4zXuq


line 452

Apr  3 17:43:12 beaglebone rtapi:0: 1:rtapi_app:6959:user hal_pru_generic: cant 
find /home/maker/machinekit-dev.arm/configs/pru-examples/pru_generic.bin in 
/home/machinekit/machinekit/configs/pru-examples or /lib/firmware/pru/
Apr  3 17:43:12 beaglebone rtapi:0: 1:rtapi_app:6959:user hpg: ERROR: failed to 
initialize PRU

in this line 
https://github.com/machinekit/machinekit/blob/master/configs/pru-examples/pru-stepper.ini#L4
 
<https://github.com/machinekit/machinekit/blob/master/configs/pru-examples/pru-stepper.ini#L4>
 the location is
CONFIG=prucode=/home/maker/machinekit-dev.arm/configs/pru-examples/pru_generic.bin
 pru=1 num_stepgens=3 num_pwmgens=1

I very strongly doubt that’s the correct location.

sudo find / -name pru_generic.bin

that will show where it’s located to the right location. So you probably should 
have on the line above the following path ”rt-preempt/pru_generic.bin” instead 
of "/home/maker/machinekit-dev.arm/configs/pru-examples/pru_generic.bin"

similar (but not xenomai) to this:
https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/CRAMPS/CRAMPS.ini#L4
 
<https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/CRAMPS/CRAMPS.ini#L4>


> linuxcnc_print.txt:   https://pastebin.com/hrw78Hcp
> dmesg:                        https://pastebin.com/q8ausFhr
> 
> machinekit@beaglebone:~$ machinekit
> MACHINEKIT - 0.1
> Machine configuration directory is 
> '/home/machinekit/machinekit/configs/pru-examples'
> Machine configuration file is 'pru-stepper.ini'
> Starting Machinekit...
> io started
> emc/iotask/ioControl.cc 768: can't load tool table.
> <commandline>:0: Component 'iocontrol' ready
> <commandline>:0: Program 'io' started
> halcmd loadusr io started
> pru-stepper.hal:29: Realtime module 'trivkins' loaded
> pru-stepper.hal:33: Realtime module 'tp' loaded
> pru-stepper.hal:34: Realtime module 'motmod' loaded
> pru-stepper.hal:37: 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...
> <commandline>:0: Realtime threads stopped
> <commandline>:0: Realtime module 'motmod' unloaded
> <commandline>:0: Realtime module 'tp' unloaded
> <commandline>:0: Realtime module 'trivkins' unloaded
> Cleanup done
> Machinekit terminated with an error.  You can find more information in the 
> log:
>    /home/machinekit/linuxcnc_debug.txt
> and
>    /home/machinekit/linuxcnc_print.txt
> as well as in the output of the shell command 'dmesg' and in the terminal
> 
> 
> 
> 
> 
> 
>> Bas
>> 
>>> 
>>> Creating machinekit directory
>>> 
>>> MACHINEKIT - 0.1
>>> 
>>> Machine configuration directory is 
>>> '/usr/share/linuxcnc/examples/sample-configs/pru-examples'
>>> 
>>> Machine configuration file is 'pru-stepper.ini'
>>> 
>>> Starting Machinekit...
>>> 
>>> /usr/libexec/linuxcnc/rtapi_msgd: FATAL - will not run as root
>>> 
>>> rtapi_msgd startup failed - aborting
>>> 
>>> rtapi_app startup failed - aborting
>>> 
>>> halcmd: cant connect to rtapi_app: -1 (uri= 
>>> uuid=a42c8c6b-4025-4f83-ba28-dad21114744a): rtapi_rpc(): reply timeout
>>> 
>>> 
>>> Additional info:
>>> 
>>> # /opt/scripts/tools/version.sh 
>>> 
>>> git:/opt/scripts/:[70edebd65fe6ea7de16ea8efe3c48b2a4062034a]
>>> 
>>> eeprom:[A335BNLT00C04417BBBK0741]
>>> 
>>> model:[TI_AM335x_BeagleBone_Black]
>>> 
>>> dogtag:[Machinekit Debian Image 2018-03-25]
>>> 
>>> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 
>>> 2018.03-00002-g254339602c]:[location: dd MBR]
>>> 
>>> kernel:[4.14.29-ti-rt-r40]
>>> 
>>> uboot_overlay_options:[enable_uboot_overlays=1]
>>> 
>>> uboot_overlay_options:[disable_uboot_overlay_adc=1]
>>> 
>>> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
>>> 
>>> uboot_overlay_options:[enable_uboot_cape_universal=1]
>>> 
>>> pkg:[bb-cape-overlays]:[4.4.20180322.0-0rcnee0~stretch+20180322]
>>> 
>>> pkg:[bb-wl18xx-firmware]:[1.20180328-0rcnee2~stretch+20180328]
>>> 
>>> pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
>>> 
>>> cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 
>>> root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M 
>>> net.ifnames=0 quiet]
>>> 
>>> dmesg | grep pinctrl-single
>>> 
>>> [    1.468808] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 
>>> 568
>>> 
>>> dmesg | grep gpio-of-helper
>>> 
>>> [    1.481251] gpio-of-helper ocp:cape-universal: ready
>>> 
>>> END
>>> 
>>> 
>>> 
>>> On Monday, April 2, 2018 at 9:55:54 PM UTC-7, Rick M wrote:
>>> I launched machinekit and selected the pru-stepper example, but it quit 
>>> with this output: 
>>> 
>>> MACHINEKIT - 0.1 
>>> Machine configuration directory is 
>>> '/home/machinekit/machinekit/configs/pru-examples' 
>>> Machine configuration file is 'pru-stepper.ini' 
>>> Starting Machinekit... 
>>> io started 
>>> emc/iotask/ioControl.cc 768: can't load tool table. 
>>> halcmd loadusr io started 
>>> pru-stepper.hal:37: 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 
>>> Machinekit terminated with an error.  You can find more information in the 
>>> log: 
>>>    /home/machinekit/linuxcnc_debug.txt 
>>> and 
>>>    /home/machinekit/linuxcnc_print.txt 
>>> as well as in the output of the shell command 'dmesg' and in the terminal 
>>> 
>>> Does it have to run as root? 
>>> 
>>> $ sudo /opt/scripts/tools/version.sh 
>>> git:/opt/scripts/:[e307a944e0be0610ff5296e0abe4ad31a6e70daa] 
>>> eeprom:[A335BNLT00C04417BBBK0741] 
>>> model:[TI_AM335x_BeagleBone_Black] 
>>> dogtag:[Machinekit Debian Image 2018-03-05] 
>>> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 
>>> 2018.01-00002-ge9ff418fb8]:[location: dd MBR] 
>>> kernel:[4.14.20-ti-rt-r36] 
>>> uboot_overlay_options:[enable_uboot_overlays=1] 
>>> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
>>>  
>>> uboot_overlay_options:[enable_uboot_cape_universal=1] 
>>> pkg:[bb-cape-overlays]:[4.4.20180307.0-0rcnee0~stretch+20180307] 
>>> pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104] 
>>> pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830] 
>>> cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 
>>> root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M 
>>> net.ifnames=0 quiet] 
>>> dmesg | grep pinctrl-single 
>>> [    1.495063] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 
>>> 568 
>>> dmesg | grep gpio-of-helper 
>>> [    1.507259] gpio-of-helper ocp:cape-universal: ready 
>>> END 
>>> 
>>> 
>>> -- 
>>> Rick
>>> 
>>> -- 
>>> website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
>>> https://github.com/machinekit
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Machinekit" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected].
>>> Visit this group at https://groups.google.com/group/machinekit.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> -- 
>> website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
>> https://github.com/machinekit
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Machinekit" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> Visit this group at https://groups.google.com/group/machinekit.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> Rick Mann
> [email protected]
> 
> 

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to