Charles was right, I was missing the name :) This now loads the pru: loadrt hal_pru_generic prucode=/usr/lib/linuxcnc/rt-preempt/pru_generic.bin pru=0 halname=hpg
Thank you all for your help and fast response Regards Klemen On Fri, 12 May 2023 at 21:47, John Allwine <j...@pentamachine.com> wrote: > Maybe symlinking the other file would work? > sudo ln -s /usr/lib/linuxcnc/rt-preempt/hal_pru_generic.so > /usr/lib/linuxcnc/rt-preempt/pru_generic.so > > Also, maybe specify the specific file for your prucode, which includes the > .bin? > loadrt prucode=/usr/lib/linuxcnc/rt-preempt/pru_generic.bin pru=0 > halname=hpg > > <https://www.pentamachine.com> > > > > John Allwine > > Principal Software Engineer > > 1.406.451.3799 > > https://www.pentamachine.com > > > > <https://www.pentamachine.com> > > > > On Fri, May 12, 2023 at 12:50 PM Charles Steinkuehler < > char...@steinkuehler.net> wrote: > >> You are missing the name of the HAL driver. The loadrt command expects >> a driver name, then the arguments. The error in your first command >> shows the HAL system trying to load the HAL driver named: >> >> "prucode=/usr/lib/linuxcnc/rt-preempt/hal_pru_generic" >> >> ...you need something like: >> >> loadrt hal_pru_generic <options> >> >> >> On 5/12/2023 1:06 PM, klemen dovrtel wrote: >> > Thank you for your reply, >> > >> > I tried both options, but with no luck: >> > 1. loadrt prucode=/usr/lib/linuxcnc/rt-preempt/hal_pru_generic pru=0 >> > halname=hpg >> > >> > returns >> > >> > msgd:0 stopped >> > rtapi:0 stopped >> > rtapi_msgd command: /usr/libexec/linuxcnc/rtapi_msgd --instance=0 >> > --rtmsglevel=1 --usrmsglevel=1 --debug=1 --halsize=524288 >> > rtapi_app command: /usr/libexec/linuxcnc/rtapi_app_rt-preempt >> --instance=0 >> > --debug=1 >> > stat: No such file or directory >> > prutest.hal:6: insmod failed, returned -1: >> > do_load_cmd: dlopen: >> > prucode=/usr/lib/linuxcnc/rt-preempt/hal_pru_generic.so: cannot open >> shared >> > object file: No such file or directory >> > rpath=/usr/lib/linuxcnc/rt-preempt >> > >> > 2. loadrt prucode=/usr/lib/linuxcnc/rt-preempt/pru_generic.bin pru=0 >> > halname=hpg >> > >> > returns >> > >> > msgd:0 stopped >> > rtapi:0 stopped >> > rtapi_msgd command: /usr/libexec/linuxcnc/rtapi_msgd --instance=0 >> > --rtmsglevel=1 --usrmsglevel=1 --debug=1 --halsize=524288 >> > rtapi_app command: /usr/libexec/linuxcnc/rtapi_app_rt-preempt >> --instance=0 >> > --debug=1 >> > stat: No such file or directory >> > prutest.hal:6: insmod failed, returned -1: >> > do_load_cmd: dlopen: prucode=/usr/lib/linuxcnc/rt-preempt/ >> pru_generic.bin.so: >> > cannot open shared object file: No such file or directory >> > >> > Regards >> > Klemen >> > >> > >> > >> > >> > On Fri, 12 May 2023 at 17:25, Charles Steinkuehler < >> char...@steinkuehler.net> >> > wrote: >> > >> >> Your output indicates dlopen is looking for "pru_generic.so" but your >> >> filesystem only has "hal_pru_generic.so". >> >> >> >> You need to fix the script(s) trying to load the PRU HAL module or make >> >> a symlink or something so the file dlopen is looking for actually >> exists. >> >> >> >> On 5/12/2023 9:38 AM, fogl wrote: >> >>> Hello everybody, >> >>> >> >>> I am stuck with machinekit and pru. I am running a single line .hal >> file: >> >>> loadrt prucode=/usr/lib/linuxcnc/rt-preempt/pru_generic pru=0 >> halname=hpg >> >>> >> >>> This returns: >> >>> msgd:0 stopped >> >>> rtapi:0 stopped >> >>> rtapi_msgd command: /usr/libexec/linuxcnc/rtapi_msgd --instance=0 >> >>> --rtmsglevel=1 --usrmsglevel=1 --debug=1 --halsize=524288 >> >>> rtapi_app command: /usr/libexec/linuxcnc/rtapi_app_rt-preempt >> >> --instance=0 >> >>> --debug=1 >> >>> stat: No such file or directory >> >>> prutest.hal:6: insmod failed, returned -1: >> >>> do_load_cmd: dlopen: >> prucode=/usr/lib/linuxcnc/rt-preempt/pru_generic.so: >> >>> cannot open shared object file: No such file or directory >> >>> rpath=/usr/lib/linuxcnc/rt-preempt >> >>> >> >>> Even though the file is actually there: >> >>> $ ls /usr/lib/linuxcnc/rt-preempt | grep pru >> >>> hal_pru.so >> >>> hal_pru_generic.so >> >>> hal_prudebug.so >> >>> pru_decamux.bin >> >>> pru_decamux.dbg >> >>> pru_generic.bin >> >>> pru_generic.dbg >> >>> >> >>> This is my linuxcnc.log (export DEBUG=5): >> >>> May 12 14:19:23 beaglebone rtapi:0: do_load_cmd: dlopen: >> >>> prucode=/usr/lib/linuxcnc/rt-preempt/pru_generic.so: cannot open >> shared >> >>> object file:$ >> >>> May 12 14:19:23 beaglebone rtapi:0: rpath=/usr/lib/linuxcnc/rt-preempt >> >>> May 12 14:19:23 beaglebone rtapi:0: 1:rtapi_app:4613:user do_load_cmd: >> >>> dlopen: prucode=/usr/lib/linuxcnc/rt-preempt/pru_generic.so: cannot >> op$ >> >>> May 12 14:19:23 beaglebone rtapi:0: 1:rtapi_app:4613:user >> >>> rpath=/usr/lib/linuxcnc/rt-preempt >> >>> May 12 14:19:24 beaglebone msgd:0: rtapi_app exit detected - scheduled >> >>> shutdown >> >>> May 12 14:19:26 beaglebone msgd:0: msgd shutting down >> >>> May 12 14:28:07 beaglebone rtapi:0: do_load_cmd: dlopen: >> >>> prucode=/usr/lib/linuxcnc/rt-preempt/pru_generic.so: cannot open >> shared >> >>> object file:$ >> >>> May 12 14:28:07 beaglebone rtapi:0: rpath=/usr/lib/linuxcnc/rt-preempt >> >>> May 12 14:28:07 beaglebone rtapi:0: 1:rtapi_app:4766:user do_load_cmd: >> >>> dlopen: prucode=/usr/lib/linuxcnc/rt-preempt/pru_generic.so: cannot >> op$ >> >>> May 12 14:28:07 beaglebone rtapi:0: 1:rtapi_app:4766:user >> >>> rpath=/usr/lib/linuxcnc/rt-preempt >> >>> May 12 14:28:08 beaglebone msgd:0: rtapi_app exit detected - scheduled >> >>> shutdown >> >>> May 12 14:28:10 beaglebone msgd:0: msgd shutting down >> >>> >> >>> >> >>> $ uname -a >> >>> Linux beaglebone 4.19.120-bone-rt-r50 #1stretch PREEMPT RT Fri May 8 >> >>> 22:45:31 UTC 2020 armv7l GNU/Linux >> >>> >> >>> Every help would be very much appreciated, >> >>> Regards, >> >>> Klemen >> >>> >> >> >> >> -- >> >> Charles Steinkuehler >> >> char...@steinkuehler.net >> >> >> > >> >> -- >> Charles Steinkuehler >> char...@steinkuehler.net >> >> -- >> 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 machinekit+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/machinekit/c4be3f48-84e6-d3ad-1660-4d5252849489%40steinkuehler.net >> . >> > -- 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 machinekit+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/machinekit/CAAD%3DYA%3DSvEXnkL1h4xAvJR17izwDHJ2kdCvn--xntmJG1gsniA%40mail.gmail.com.