Wow it worked :) Thank you, John! 

Short summary how to get it working: 

1.) Compile PRU_RPMsg_LED0 project in CCS
2.) Transfer PRU_RPMsg_LED0.out onto beaglebone into the /lib/firmware 
directory 
3.) Set symbolic link: sudo ln -s PRU_RPMsg_LED0.out am335x-pru0-fw
4.) restart
5.) modprobe virtio_rpmsg_bus
6.) modprobe rpmsg_pru
7.) check if /dev/rpmsg_pru30 exists
8.) echo "r" > /dev/rpmsg_pru30
9.) Observe red LED light up on PRU_cape :) 


On Wednesday, March 23, 2016 at 8:42:50 PM UTC+1, john3909 wrote:
>
> Don’t include the .ko extension when using modprobe.
>
> Regards,
> John
>
>
>
>
> On Mar 23, 2016, at 9:32 AM, lucas <lucas....@gmail.com <javascript:>> 
> wrote:
>
> Sorry forgot to copy the error message for the modprobe command: 
>
> root@beaglebone:/lib/modules/4.1.15-ti-rt-r43/kernel/drivers/rpmsg# 
> modprobe virtio_rpmsg_bus.ko
> modprobe: FATAL: Module virtio_rpmsg_bus.ko not found.
>
> On Wednesday, March 23, 2016 at 5:27:12 PM UTC+1, lucas wrote:
>>
>> Hi John, 
>>
>> thank you very much for your answer. 
>>
>> I am using the 4.1.15-ti-rt-r43 kernel. It's the kernel that came with 
>> the debian image from the beaglebone website.  
>>
>> Only the pruss_remoteproc module seems to be loaded on boot:
>>
>> # lsmod
>> Module                  Size  Used by
>> 8021q                  17336  0
>> garp                    5975  1 8021q
>> mrp                     7322  1 8021q
>> stp                     1911  1 garp
>> llc                     5257  2 stp,garp
>> pruss_remoteproc       15296  2
>> omap_rng                4358  0
>> rng_core                7437  1 omap_rng
>> usb_f_acm               7180  1
>> u_serial               10596  3 usb_f_acm
>> usb_f_rndis            22734  1
>> g_multi                 5316  0
>> usb_f_mass_storage     42745  2 g_multi
>> u_ether                12028  2 usb_f_rndis,g_multi
>> libcomposite           43810  4 
>> usb_f_acm,usb_f_rndis,g_multi,usb_f_mass_storage
>> snd_soc_davinci_mcasp    17266  0
>> snd_soc_edma            1150  1 snd_soc_davinci_mcasp
>> spi_omap2_mcspi        10681  0
>> uio_pdrv_genirq         3521  0
>>
>> Although the other modules do exist in the driver directory.
>>
>> ls /lib/modules/4.1.15-ti-rt-r43/kernel/drivers/rpmsg
>> rpmsg_pru.ko  rpmsg-rpc.ko  virtio_rpmsg_bus.ko
>>
>> I cannot modprob the modules:
>>
>> # modprobe virtio_rpmsg_bus.ko
>> root@beaglebone:/lib/modules/4.1.15-ti-rt-r43/kernel/drivers/rpmsg# 
>> modprobe virtio_rpmsg_bus.ko
>>
>>
>> But I can use insmod 
>>
>> root@beaglebone:/lib/modules/4.1.15-ti-rt-r43/kernel/drivers/rpmsg# 
>> insmod virtio_rpmsg_bus.ko
>> root@beaglebone:/lib/modules/4.1.15-ti-rt-r43/kernel/drivers/rpmsg# lsmod
>> Module                  Size  Used by
>> virtio_rpmsg_bus       13437  0
>> 8021q                  17336  0
>> garp                    5975  1 8021q
>> ...
>>
>>
>> Should I try to switch to the kernel version you are using? Is there an 
>> image or should I recompile the kernel? Any other ideas? 
>>
>> Lucas
>>
>> On Tuesday, March 22, 2016 at 7:40:56 PM UTC+1, john3909 wrote:
>>>
>>> Hi Lucas,
>>>
>>> This seems to work just fine for me. What kernel version are you using?
>>>
>>> I’m using V4.1.13-ti-r33. As you can see, all remoteproc/rpmsg kernel 
>>> modules are loaded automatically at boot time.
>>>
>>> [   16.251480] pruss-rproc 4a300000.pruss: 8 PRU interrupts parsed       
>>>                                                          
>>> [   16.251567] pruss-rproc 4a300000.pruss: memory    dram0: pa 
>>> 0x4a300000 size 0x2000 va e0ca0000                                 
>>> [   16.251595] pruss-rproc 4a300000.pruss: memory    dram1: pa 
>>> 0x4a302000 size 0x2000 va e0ca4000                                 
>>> [   16.251621] pruss-rproc 4a300000.pruss: memory shrdram2: pa 
>>> 0x4a310000 size 0x3000 va e0ca8000                                 
>>> [   16.251644] pruss-rproc 4a300000.pruss: memory     intc: pa 
>>> 0x4a320000 size 0x2000 va e0cac000                                 
>>> [   16.251672] pruss-rproc 4a300000.pruss: memory      cfg: pa 
>>> 0x4a326000 size 0x2000 va e0cb0000                                 
>>> [   16.252174] pruss-rproc 4a300000.pruss: creating platform devices for 
>>> PRU cores                                                
>>> [   16.374800] pru-rproc 4a334000.pru0: memory     iram: pa 0x4a334000 
>>> size 0x2000 va e0cb4000                                    
>>> [   16.374858] pru-rproc 4a334000.pru0: memory  control: pa 0x4a322000 
>>> size 0x400 va e0876000                                     
>>> [   16.374901] pru-rproc 4a334000.pru0: memory    debug: pa 0x4a322400 
>>> size 0x100 va e0c9e400                                     
>>> [   16.375152]  remoteproc1: 4a334000.pru0 is available                 
>>>                                                           
>>> [   16.380153]  remoteproc1: Note: remoteproc is still under development 
>>> and considered experimental.                             
>>> [   16.572902]  remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and 
>>> backward compatibility isn't yet guaranteed.             
>>> [   16.778752]  remoteproc1: registered virtio0 (type 7)                 
>>>                                                          
>>> [   16.811201] pru-rproc 4a334000.pru0: PRU rproc node 
>>> /ocp/pruss@4a300000/pru@4a334000 probed successfully                       
>>> [   16.932818] pru-rproc 4a338000.pru1: memory     iram: pa 0x4a338000 
>>> size 0x2000 va e0ccc000                                    
>>> [   16.932891] pru-rproc 4a338000.pru1: memory  control: pa 0x4a324000 
>>> size 0x400 va e0cd0000                                     
>>> [   16.932918] pru-rproc 4a338000.pru1: memory    debug: pa 0x4a324400 
>>> size 0x100 va e0cd2400                                     
>>> [   16.933190]  remoteproc2: 4a338000.pru1 is available                 
>>>                                                           
>>> [   16.938192]  remoteproc2: Note: remoteproc is still under development 
>>> and considered experimental.                             
>>> [   17.081421]  remoteproc2: THE BINARY FORMAT IS NOT YET FINALIZED, and 
>>> backward compatibility isn't yet guaranteed.             
>>> [   17.114912]  remoteproc2: registered virtio1 (type 7)                 
>>>                                                          
>>> [   17.131205] pru-rproc 4a338000.pru1: PRU rproc node 
>>> /ocp/pruss@4a300000/pru@4a338000 probed successfully                       
>>> [   17.231951]  remoteproc1: powering up 4a334000.pru0                   
>>>                                                          
>>> [   17.243111]  remoteproc1: Booting fw image am335x-pru0-fw, size 78652 
>>>                                                          
>>> [   17.271252] pru-rproc 4a334000.pru0: version 0 event_chnl_map_size 1 
>>> event_chnl_map 0000039c                                   
>>> [   17.271289] pru-rproc 4a334000.pru0: sysevt-to-ch[60] -> 0           
>>>                                                           
>>> [   17.271305] pru-rproc 4a334000.pru0: chnl-to-host[0] -> 0             
>>>                                                          
>>> [   17.271318] pru-rproc 4a334000.pru0: skip intr mapping for chnl 1     
>>>                                                          
>>> [   17.271330] pru-rproc 4a334000.pru0: skip intr mapping for chnl 2     
>>>                                                          
>>> [   17.271343] pru-rproc 4a334000.pru0: skip intr mapping for chnl 3     
>>>                                                          
>>> [   17.271355] pru-rproc 4a334000.pru0: skip intr mapping for chnl 4     
>>>                                                          
>>> [   17.271367] pru-rproc 4a334000.pru0: skip intr mapping for chnl 5     
>>>                                                          
>>> [   17.271379] pru-rproc 4a334000.pru0: skip intr mapping for chnl 6     
>>>                                                          
>>> [   17.271391] pru-rproc 4a334000.pru0: skip intr mapping for chnl 7     
>>>                                                          
>>> [   17.271404] pru-rproc 4a334000.pru0: skip intr mapping for chnl 8     
>>>                                                          
>>> [   17.271416] pru-rproc 4a334000.pru0: skip intr mapping for chnl 9     
>>>                                                          
>>> [   17.271434] pruss-rproc 4a300000.pruss: SYSEV60 -> CH0 (CMR15 
>>> 0x00000000)                                                      
>>> [   17.271449] pruss-rproc 4a300000.pruss: CH0 -> HOST0 (HMR0 
>>> 0x00000000)                                                         
>>> [   17.271465] pruss-rproc 4a300000.pruss: configured system_events = 
>>> 0x1000000000000000 intr_channels = 0x00000001 host_intr = 01
>>> [   17.309385]  remoteproc1: starting PRU0: entry-point = 0x0           
>>>                                                           
>>> [   17.309420]  remoteproc1: remote processor 4a334000.pru0 is now up   
>>>                                                           
>>> [   17.352939]  remoteproc1: mbox msg: 0x0                               
>>>                                                          
>>> [   17.353069] virtio_rpmsg_bus virtio0: creating channel 
>>> rpmsg-client-sample addr 0x1e                                           
>>> [   17.361804]  remoteproc1: kicking vqid 0 on PRU0                     
>>>                                                           
>>> [   17.361904] virtio_rpmsg_bus virtio0: rpmsg host is online           
>>>                                                           
>>> [   17.394061]  remoteproc1: kicking vqid 0 on PRU0                     
>>>                                                           
>>> [   17.410206]  remoteproc2: powering up 4a338000.pru1                   
>>>                                                          
>>> [   17.463473]  remoteproc2: Booting fw image am335x-pru1-fw, size 78644 
>>>                                                          
>>> [   17.470075] pru-rproc 4a338000.pru1: version 0 event_chnl_map_size 1 
>>> event_chnl_map 00000394                                   
>>> [   17.470094] pru-rproc 4a338000.pru1: sysevt-to-ch[59] -> 1           
>>>                                                           
>>> [   17.470108] pru-rproc 4a338000.pru1: skip intr mapping for chnl 0     
>>>                                                          
>>> [   17.470122] pru-rproc 4a338000.pru1: chnl-to-host[1] -> 1             
>>>                                                          
>>> [   17.470134] pru-rproc 4a338000.pru1: skip intr mapping for chnl 2     
>>>                                                          
>>> [   17.470145] pru-rproc 4a338000.pru1: skip intr mapping for chnl 3     
>>>                                                          
>>> [   17.470158] pru-rproc 4a338000.pru1: skip intr mapping for chnl 4     
>>>                                                          
>>> [   17.470170] pru-rproc 4a338000.pru1: skip intr mapping for chnl 5     
>>>                                                          
>>> [   17.470182] pru-rproc 4a338000.pru1: skip intr mapping for chnl 6     
>>>                                                          
>>> [   17.470194] pru-rproc 4a338000.pru1: skip intr mapping for chnl 7     
>>>                                                          
>>> [   17.470206] pru-rproc 4a338000.pru1: skip intr mapping for chnl 8     
>>>                                                          
>>> [   17.470218] pru-rproc 4a338000.pru1: skip intr mapping for chnl 9     
>>>                                                          
>>> [   17.470235] pruss-rproc 4a300000.pruss: SYSEV59 -> CH1 (CMR14 
>>> 0x01000000)                                                      
>>> [   17.470249] pruss-rproc 4a300000.pruss: SYSEV60 -> CH0 (CMR15 
>>> 0x00000000)                                                      
>>> [   17.470264] pruss-rproc 4a300000.pruss: CH0 -> HOST0 (HMR0 
>>> 0x00000000)                                                         
>>> [   17.470279] pruss-rproc 4a300000.pruss: CH1 -> HOST1 (HMR0 
>>> 0x00000100)                                                         
>>> [   17.470294] pruss-rproc 4a300000.pruss: configured system_events = 
>>> 0x1800000000000000 intr_channels = 0x00000003 host_intr = 03
>>> [   17.621116]  remoteproc2: starting PRU1: entry-point = 0x0           
>>>                                                           
>>> [   17.621151]  remoteproc2: remote processor 4a338000.pru1 is now up   
>>>                                                           
>>> [   17.690894]  remoteproc2: mbox msg: 0x0                               
>>>                                                          
>>> [   17.691124] virtio_rpmsg_bus virtio1: creating channel rpmsg-pru addr 
>>> 0x1f                                                     
>>> [   17.698850]  remoteproc2: kicking vqid 0 on PRU1                     
>>>                                                           
>>> [   17.698906] virtio_rpmsg_bus virtio1: rpmsg host is online           
>>>                                                           
>>> [   17.723089]  remoteproc2: kicking vqid 0 on PRU1                     
>>>                                                           
>>> [   17.966768] rpmsg_pru rpmsg1: new rpmsg_pru device: /dev/rpmsg_pru31 
>>>                                                           
>>>
>>> root@beaglebone:~# lsmod
>>> Module                  Size  Used by
>>> usb_f_acm               8098  0 
>>> u_serial               12463  1 usb_f_acm
>>> usb_f_rndis            26352  0 
>>> usb_f_mass_storage     50100  0 
>>> u_ether                13493  1 usb_f_rndis
>>> libcomposite           53637  3 usb_f_acm,usb_f_rndis,usb_f_mass_storage
>>> rpmsg_pru               5295  0 
>>> virtio_rpmsg_bus       15318  1 rpmsg_pru
>>> pruss_remoteproc       17160  2 
>>> tilcdc                 30557  0 
>>> omap_rng                5239  0 
>>> rng_core                8893  1 omap_rng
>>> snd_soc_davinci_mcasp    20886  0 
>>> snd_soc_edma            1174  1 snd_soc_davinci_mcasp
>>> tda998x                14298  0 
>>> snd_soc_hdmi_codec      2522  0 
>>>
>>>
>>> The remoteproc/rpmsg modules should be located here. 
>>>
>>> root@beaglebone:/lib/modules/4.1.13-ti-r33/kernel/drivers/rpmsg# ls
>>> rpmsg_pru.ko  rpmsg-rpc.ko  virtio_rpmsg_bus.ko
>>> root@beaglebone:/lib/modules/4.1.13-ti-r33/kernel/drivers/rpmsg# cd 
>>> ../remoteproc/
>>> root@beaglebone:/lib/modules/4.1.13-ti-r33/kernel/drivers/remoteproc# ls
>>> omap_remoteproc.ko  pruss_remoteproc.ko
>>>
>>>
>>> To load them manually, use modprobe which detects module dependencies 
>>> automatically.
>>>
>>> modprobe rpmsg_pru
>>>
>>> Regards,
>>> John
>>>
>>>
>>>
>>>
>>> On Mar 22, 2016, at 7:24 AM, lucas <lucas....@gmail.com> wrote:
>>>
>>> I am trying to use rpmsg from user space. I am following the PRU 
>>> training of TI (
>>> http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs#Part_1:_Linux_Command_Line_LED_Toggling
>>> )
>>>
>>> I use the latest beaglebone black image (Debian 8.3 2016-01-24 from 
>>> https://beagleboard.org/latest-images). 
>>>
>>> The three kernel modules that are needed appear to be already part of 
>>> this image (virtio_rpmsg_bus.ko, pruss_remoteproc.ko,rpmsg_pru.ko). It 
>>> seems like I have to load them in this exact order. Unfortunately 
>>> pruss_remoteproc.ko is already loaded and there seem to be a bug that 
>>> prevents reloading the module (
>>> https://groups.google.com/forum/#!topic/beagleboard/EXBjL4TkBiU). So 
>>> what could be a solution for this problem? 
>>>
>>> - Can I load the modules in the right order on boot? (I cannot find the 
>>> point where pruss_remoteproc.ko gets loaded)
>>> - Can I prevent pruss_remoteproc.ko from being loaded on boot and insmod 
>>> it later on? 
>>> - Or, is my problem something completely different and rpmsg doesn't 
>>> work like that from user space out of the box with the image that I am 
>>> using i.e. I have to recompile the kernel?
>>>
>>> Thank you!
>>>
>>> -- 
>>> For more options, visit http://beagleboard.org/discuss
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "BeagleBoard" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to beagleboard...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
> -- 
> For more options, visit http://beagleboard.org/discuss
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to beagleboard...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to