I understand you are running your self-compiled kernel. This could be part of 
the problem. It seems the component loads work fine but the RT thread 
immediately exits which points to this cause.


first, try the kernel supplied with the SD image. It is next to impossible to 
verify you got a working kernel and I see no reason to use a self-built one, 
however that was done.

Then, can you post the following:
- output of uname -a
- output of dmesg

after boot, and after starting linuxcnc.

in case you changed anything in the config, please push that to github.



> Am 02.08.2016 um 09:04 schrieb Chen Cheng Xi <[email protected]>:
> 
> Hi, I solved BB-LCNC-BEBOPR can not loaded issue as below:
> cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G
> 
> ubuntu@arm:~/machinekit$ linuxcnc
> MACHINEKIT - 0.1
> Machine configuration directory is 
> '/home/ubuntu/machinekit/configs/ARM/BeagleBone/BeBoPr'
> Machine configuration file is 'BeBoPr.ini'
> Starting Machinekit...
> io started
> halcmd loadusr io started
> Loading BB-LCNC-BEBOPR overlay
> Loading cape-bone-iio overlay
> BeBoPr.hal:28: module 'hal_pru_generic' not loaded
> Shutting down and cleaning up Machinekit...
> <commandline>:0: error unloading realtime module 'hpg': rc=-1
> <commandline>:0: unload: 'hpg' not loaded
> 
> <commandline>:0: unloadrt failed
> <commandline>:0: error unloading realtime module 'hpg': rc=-1
> <commandline>:0: unload: 'hpg' not loaded
> 
> <commandline>:0: unloadrt failed
> Cleanup done
> Machinekit terminated with an error.  You can find more information in the 
> log:
>     /home/ubuntu/linuxcnc_debug.txt
> and
>     /home/ubuntu/linuxcnc_print.txt
> as well as in the output of the shell command 'dmesg' and in the terminal
> ubuntu@arm:~/machinekit$ export DEBUG=5
> ubuntu@arm:~/machinekit$ linuxcnc
> MACHINEKIT - 0.1
> Machine configuration directory is 
> '/home/ubuntu/machinekit/configs/ARM/BeagleBone/BeBoPr'
> Machine configuration file is 'BeBoPr.ini'
> Starting Machinekit...
> io started
> <commandline>:0: Component 'iocontrol' ready
> <commandline>:0: Program 'io' started
> halcmd loadusr io started
> BB-LCNC-BEBOPR overlay found
> cape-bone-iio overlay found
> BeBoPr.hal:10: Program './setup.sh' finished
> BeBoPr.hal:18: Realtime module 'trivkins' loaded
> BeBoPr.hal:22: Realtime module 'tp' loaded
> BeBoPr.hal:23: Realtime module 'motmod' loaded
> BeBoPr.hal:27: Realtime module 'hal_bb_gpio' loaded
> BeBoPr.hal:28: module 'hal_pru_generic' not loaded
> Shutting down and cleaning up Machinekit...
> <commandline>:0: Realtime threads stopped
> <commandline>:0: error unloading realtime module 'hpg': rc=-1
> <commandline>:0: unload: 'hpg' not loaded
> 
> <commandline>:0: Realtime module 'hal_bb_gpio' unloaded
> <commandline>:0: Realtime module 'motmod' unloaded
> <commandline>:0: Realtime module 'tp' unloaded
> <commandline>:0: Realtime module 'trivkins' unloaded
> <commandline>:0: unloadrt failed
> <commandline>:0: Realtime threads stopped
> <commandline>:0: error unloading realtime module 'hpg': rc=-1
> <commandline>:0: unload: 'hpg' not loaded
> 
> <commandline>:0: unloadrt failed
> Cleanup done
> Machinekit terminated with an error.  You can find more information in the 
> log:
>     /home/ubuntu/linuxcnc_debug.txt
> and
>     /home/ubuntu/linuxcnc_print.txt
> as well as in the output of the shell command 'dmesg' and in the terminal
> 
>  linuxcnc.log as(http://pastebin.com/hPwXU9cr).
> 
> -chengxi
>  
> 
> On Mon, Aug 1, 2016 at 11:22 PM, Chen Cheng Xi <[email protected]> 
> wrote:
> Yes, I am trying to start from a known-to-work configuration. It failed when 
> load  device tree overlay.
> ...
> Loading BB-LCNC-BEBOPR overlay
> sudo: no askpass program specified, try setting SUDO_ASKPASS
> Error loading device tree overlay file: BB-LCNC-BEBOPR
> BeBoPr.hal:10: program './setup.sh' failed, returned 1
> 
> So when i try to manually load one by one. But i can get the same result as 
> follow:
> 
> machinekit@beaglebone:~$ 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
>  8: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-bone-iio
>  But when I try to load overlay BB-LCNC-BEBOPR, it shows conflicted with 
> BB-BONE-EMMC-2G. Then i also try to disable BB-BONE-EMMC-2G as:
> cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONE-EMMC-2G
> or
> cape_disable=capemgr.disable_partno=BB-BONELT-HDMI
> cape_disable=capemgr.disable_partno=BB-BONE-EMMC-2G
>  First one only disable BB-BONELT-HDM, second only disable BB-BONE-EMMC-2G.
> So i am wondering how to disable these two and load device tree overlay 
> BB-LCNC-BEBOPR.
> Or there is any other ways to load it?
> 
> -chengxi
>  
>  
> 
> On Mon, Aug 1, 2016 at 2:41 AM, Michael Haberler <[email protected]> wrote:
> 
> > Am 31.07.2016 um 10:40 schrieb Chen Cheng Xi <[email protected]>:
> >
> > Dear Michael,
> >
> > I did export DEBUG=5. Full log as (http://pastebin.com/ySyz4eW3) .
> >
> > Cammandline as below:
> >
> > ubuntu@arm:~/machinekit$ halrun
> > msgd:0 stopped
> > rtapi:0 stopped
> > halcmd:  loadrt hal_pru_generic 
> > prucode=/home/ubuntu/machinekit/rtlib/xenomai/pru_generic.bin pru=1 
> > num_pwmgens=1
> > <stdin>:1: module 'hal_pru_generic' not loaded
> > halcmd: exit
> > <commandline>:0: Realtime threads stopped
> > <commandline>:0: Realtime threads stopped
> > <commandline>:0: error unloading realtime module 'hpg': rc=-1
> > <commandline>:0: unload: 'hpg' not loaded
> >
> > <commandline>:0: unloadrt failed
> >
> >   And also i suspect that i change too many "hal_pru_generic" to "hpg". 
> > Because it shows unload
> > hal_pru_generic when i start to load this module, but when i exit , it 
> > shows "hpg" not loaded.
> > Thanks!
> 
> I already suggested to start from a known-to-work config. Have a look at this 
> one: 
> https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/CRAMPS/CRAMPS.hal#L28
> 
> note the halname=hpg suffix
> 
> -m
> 
> >
> > -chengxi
> >
> >
> >
> > On Sat, Jul 30, 2016 at 9:40 PM, Michael Haberler <[email protected]> 
> > wrote:
> >
> > > Am 30.07.2016 um 06:11 schrieb Chen Cheng Xi <[email protected]>:
> > >
> > > Thanks, you are right. It seems almost work.
> > > ubuntu@arm:~/machinekit$ halrun
> > > msgd:0 stopped
> > > rtapi:0 stopped
> > > halcmd: loadrt hal_pru_generic 
> > > prucode=/home/ubuntu/machinekit/rtlib/xenomai/pru_generic.bin pru=1 
> > > num_stepgens=3 num_pwmgens=1
> > > <stdin>:1: module 'hal_pru_generic' not loaded
> > >
> > > /var/log/linuxcnc.log as follow:
> > >
> > > Jul 30 00:05:07 arm msgd:0: zeroconf: unregistering 'Log service on 
> > > arm.local pid 1408'
> > > Jul 30 00:05:07 arm msgd:0: log buffer hwm: 0% (17 msgs, 1215 bytes out 
> > > of 524288)
> > > Jul 30 00:05:07 arm msgd:0: normal shutdown - global segment detached
> > > Jul 30 00:05:11 arm msgd:0: startup pid=4268 flavor=xenomai rtlevel=1 
> > > usrlevel=1 halsize=524288 shm=Posix gcc=5.4.0 20160609 version=unknown
> > > Jul 30 00:05:11 arm msgd:0:  ^ MQ=4.2.0 czmq=3.0.3 protobuf=2.6.1 
> > > libwebsockets=1.5 4bc6f95
> > > Jul 30 00:05:11 arm msgd:0: configured: sha=abfa33d
> > > Jul 30 00:05:11 arm msgd:0: built:      Jul 27 2016 14:26:04 sha=abfa33d
> > > Jul 30 00:05:11 arm msgd:0: register_stuff: actual hostname as announced 
> > > by avahi='arm.local'
> > > Jul 30 00:05:11 arm msgd:0: zeroconf: registering: 'Log service on 
> > > arm.local pid 4268'
> > > Jul 30 00:05:11 arm msgd:0: rtapi_app:4273:user accepting commands at 
> > > ipc:///tmp/0.rtapi.a42c8c6b-4025-4f83-ba28-dad21114744a
> > > Jul 30 00:05:11 arm msgd:0: zeroconf: registered 'Log service on 
> > > arm.local pid 4268' _machinekit._tcp 0 TXT 
> > > "uuid=a42c8c6b-4025-4f83-ba28-dad$
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt prussdrv_init
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt prussdrv_open
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt prussdrv_pruintc_init
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt prussdrv_map_prumem
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt PRU data ram mapped
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt num_pwmgens : 1
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt num_stepgens: 3
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt num_encoders: 0
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt Init pwm
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt hpg_pwm_init
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt Init stepgen
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt hpg_stepgen_init
> > > Jul 30 00:05:29 arm msgd:0: hal_lib:4273:rt Init encoder
> >
> >
> > this log is with default debug level 1 and truncated, and does not show any 
> > error.
> >
> > run again like so:
> >
> > export DEBUG=5
> > halrun ....
> > now post ALL of /var/log/linuxcnc.log (please via pastebin.com). No smart 
> > excerpts please.
> >
> > >
> > >
> > > halcmd: show pin
> > > Component Pins:
> > >   Comp   Inst Type  Dir         Value  Name                             
> > > Epsilon         Flags
> > >     73        s32   OUT             0  hpg.capture-position.time          
> > >    0
> > >     73        u32   IN     0x00000080  hpg.pru_busy_pin                   
> > >    0
> > >     73        bit   IN          FALSE  hpg.pwmgen.00.out.00.enable        
> > >    0
> > >     73        u32   IN     0x00000011  hpg.pwmgen.00.out.00.pin           
> > >    0
> > >     73        float IN              1  hpg.pwmgen.00.out.00.scale        
> > > 0.0000100
> > >     73        float IN              0  hpg.pwmgen.00.out.00.value        
> > > 0.0000100
> > >     73        u32   IN     0x00989680  hpg.pwmgen.00.pwm_period           
> > >    0
> > >     73        bit   IN          FALSE  hpg.stepgen.00.control-type        
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.00.counts              
> > >    0
> > >     73        float OUT             0  hpg.stepgen.00.dbg_err_at_matc    
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.00.dbg_ff_vel         
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.00.dbg_pos_minus_p    
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.00.dbg_s_to_match     
> > > 0.0000100
> > >     73        s32   OUT             0  hpg.stepgen.00.dbg_step_rate       
> > >    0
> > >     73        float OUT             0  hpg.stepgen.00.dbg_vel_error      
> > > 0.0000100
> > >     73        u32   IN     0x00000064  hpg.stepgen.00.dirhold             
> > >    0
> > >     73        u32   IN     0x00000011  hpg.stepgen.00.dirpin              
> > >    0
> > >     73        u32   IN     0x00000064  hpg.stepgen.00.dirsetup            
> > >    0
> > >     73        bit   IN          FALSE  hpg.stepgen.00.enable              
> > >    0
> > >     73        float IN              1  hpg.stepgen.00.maxaccel           
> > > 0.0000100
> > >     73        float IN              0  hpg.stepgen.00.maxvel             
> > > 0.0000100
> > >     73        float IN              0  hpg.stepgen.00.position-cmd       
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.00.position-fb        
> > > 0.0000100
> > >     73        float IN              1  hpg.stepgen.00.position-scale     
> > > 0.0000100
> > >     73        bit   IN          FALSE  hpg.stepgen.00.stepinvert          
> > >    0
> > >     73        u32   IN     0x00000064  hpg.stepgen.00.steplen             
> > >    0
> > >     73        u32   IN     0x00000011  hpg.stepgen.00.steppin             
> > >    0
> > >     73        u32   IN     0x00000064  hpg.stepgen.00.stepspace           
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.00.test1               
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.00.test2               
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.00.test3               
> > >    0
> > >     73        float IN              0  hpg.stepgen.00.velocity-cmd       
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.00.velocity-fb        
> > > 0.0000100
> > >     73        bit   IN          FALSE  hpg.stepgen.01.control-type        
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.01.counts              
> > >    0
> > >     73        float OUT             0  hpg.stepgen.01.dbg_err_at_matc    
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.01.dbg_ff_vel         
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.01.dbg_pos_minus_p    
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.01.dbg_s_to_match     
> > > 0.0000100
> > >     73        s32   OUT             0  hpg.stepgen.01.dbg_step_rate       
> > >    0
> > >     73        float OUT             0  hpg.stepgen.01.dbg_vel_error      
> > > 0.0000100
> > >     73        u32   IN     0x00000064  hpg.stepgen.01.dirhold             
> > >    0
> > >     73        u32   IN     0x00000011  hpg.stepgen.01.dirpin              
> > >    0
> > >     73        u32   IN     0x00000064  hpg.stepgen.01.dirsetup            
> > >    0
> > >     73        bit   IN          FALSE  hpg.stepgen.01.enable              
> > >    0
> > >     73        float IN              1  hpg.stepgen.01.maxaccel           
> > > 0.0000100
> > >     73        float IN              0  hpg.stepgen.01.maxvel             
> > > 0.0000100
> > >     73        float IN              0  hpg.stepgen.01.position-cmd       
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.01.position-fb        
> > > 0.0000100
> > >     73        float IN              1  hpg.stepgen.01.position-scale     
> > > 0.0000100
> > >     73        bit   IN          FALSE  hpg.stepgen.01.stepinvert          
> > >    0
> > >     73        u32   IN     0x00000064  hpg.stepgen.01.steplen             
> > >    0
> > >     73        u32   IN     0x00000011  hpg.stepgen.01.steppin             
> > >    0
> > >     73        u32   IN     0x00000064  hpg.stepgen.01.stepspace           
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.01.test1               
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.01.test2               
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.01.test3               
> > >    0
> > >     73        float IN              0  hpg.stepgen.01.velocity-cmd       
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.01.velocity-fb        
> > > 0.0000100
> > >     73        bit   IN          FALSE  hpg.stepgen.02.control-type        
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.02.counts              
> > >    0
> > >     73        float OUT             0  hpg.stepgen.02.dbg_err_at_matc    
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.02.dbg_ff_vel         
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.02.dbg_pos_minus_p    
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.02.dbg_s_to_match     
> > > 0.0000100
> > >     73        s32   OUT             0  hpg.stepgen.02.dbg_step_rate       
> > >    0
> > >     73        float OUT             0  hpg.stepgen.02.dbg_vel_error      
> > > 0.0000100
> > >     73        u32   IN     0x00000064  hpg.stepgen.02.dirhold             
> > >    0
> > >     73        u32   IN     0x00000011  hpg.stepgen.02.dirpin              
> > >    0
> > >     73        u32   IN     0x00000064  hpg.stepgen.02.dirsetup            
> > >    0
> > >     73        bit   IN          FALSE  hpg.stepgen.02.enable              
> > >    0
> > >     73        float IN              1  hpg.stepgen.02.maxaccel           
> > > 0.0000100
> > >     73        float IN              0  hpg.stepgen.02.maxvel             
> > > 0.0000100
> > >     73        float IN              0  hpg.stepgen.02.position-cmd       
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.02.position-fb        
> > > 0.0000100
> > >     73        float IN              1  hpg.stepgen.02.position-scale     
> > > 0.0000100
> > >     73        bit   IN          FALSE  hpg.stepgen.02.stepinvert          
> > >    0
> > >     73        u32   IN     0x00000064  hpg.stepgen.02.steplen             
> > >    0
> > >     73        u32   IN     0x00000011  hpg.stepgen.02.steppin             
> > >    0
> > >     73        u32   IN     0x00000064  hpg.stepgen.02.stepspace           
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.02.test1               
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.02.test2               
> > >    0
> > >     73        s32   OUT             0  hpg.stepgen.02.test3               
> > >    0
> > >     73        float IN              0  hpg.stepgen.02.velocity-cmd       
> > > 0.0000100
> > >     73        float OUT             0  hpg.stepgen.02.velocity-fb        
> > > 0.0000100
> > >     73        s32   OUT             0  hpg.update.time                    
> > >    0
> > >
> > >
> > > It is quite strange that everything works well except this module load 
> > > failed.
> >
> > where?
> >
> > >
> > >
> > >
> > >
> > >
> > > On Fri, Jul 29, 2016 at 11:56 PM, [email protected] 
> > > <[email protected]> wrote:
> > >
> > > On 29/07/16 16:00, Chen Cheng Xi wrote:
> > > Jul 29 14:14:15 arm msgd:0: hal_lib:1414:rt hal_pin_newfv:28 HAL error: 
> > > length 49 invalid for name starting 
> > > 'hal_pru_generic.stepgen.00.dbg_pos_minus_'
> > >
> > > Please see Michael's recent post plus these 4 previous posts on the same
> > >
> > > https://groups.google.com/forum/#!searchin/machinekit/length$2049$20invalid$20for$20name$20starting;context-place=searchin/machinekit/length$2049$20invalid$20for$20name$20starting$20$26$2339
> > >
> > > You have to alias it hpg or similar or some of the pin names exceed the 
> > > buffer length
> > >
> > >
> > > --
> > > website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
> > > https://github.com/machinekit
> > > --- You received this message because you are subscribed to a topic in 
> > > the Google Groups "Machinekit" group.
> > > To unsubscribe from this topic, visit 
> > > https://groups.google.com/d/topic/machinekit/qncQ_Dh7V9s/unsubscribe.
> > > To unsubscribe from this group and all its topics, 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.
> > >
> > >
> > >
> > > --
> > > Best regards!
> > > 陈成细
> > > R&D Engineer
> > > (\__/)
> > > (='.'=) This is Bunny. Copy and paste bunny into your
> > > (")_(") signature to help him gain world domination.
> > >
> > > --
> > > 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.
> >
> >
> >
> >
> > --
> > Best regards!
> > 陈成细
> > R&D Engineer
> > (\__/)
> > (='.'=) This is Bunny. Copy and paste bunny into your
> > (")_(") signature to help him gain world domination.
> >
> > --
> > 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.
> 
> 
> 
> 
> -- 
> Best regards!
> 陈成细
> R&D Engineer
> (\__/)
> (='.'=) This is Bunny. Copy and paste bunny into your
> (")_(") signature to help him gain world domination.
> 
> 
> 
> -- 
> Best regards!
> 陈成细
> R&D Engineer
> (\__/)
> (='.'=) This is Bunny. Copy and paste bunny into your
> (")_(") signature to help him gain world domination.

-- 
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