This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux: AM335x RPMsg devices not detected



Tool/software: Linux

Hi every one my name is Jaime,

I'm sorry form my English. I'm trying to use the rpmsg for me bbb project. I'm follow this manual:

http://processors.wiki.ti.com/index.php/RPMsg_Quick_Start_Guide

 I install de remote proc drivers and when the kernel detect it.  at this point all its ok but when I try to list in my "/dev/" 

the elements of rpmsg_30 and rpmsg_31 never it's showed and I can't go ahead.

this is the capture of the elements of dev if all was good.

What is the problem, maybe in my kernel? I don't know what is the problem.

sorry for me English again.

Thanks

Jaime

  • Please post what Linux version you are using.
  • Jaime,

    I am also having a hard time seeing the rpmsg character devices. No 'pru' devices are seen in /dev

    I am using 4.9.59-ga75d8e9305 which I believe is the latest TI SDK version. I have also been trying to use 4.14 version under Yocto->Poky

    When I go to run the example rpmsg_client_sample.ko nothing is output after following along in the PRU labs and RPMsg Quick Start Guide you linked above.

    Any help would be greatly appreciated or other debugging tips to try.

    Thank you!

    -Mike T
  • Hello Jaime & Mike,
    I'll try to help both of you. If it gets too cluttered, Mike can start a new thread and reference this one.

    Jaime,
    What is your kernel and where are you getting it from? Make sure you are using a TI-provided kernel, because remoteproc functionality hasn't made its way to the mainline kernel quite yet.

    Mike,
    1) Same thing as Jaime. Make sure it's a TI-provided kernel ( 4.9.59-ga75d8e9305 is from TI, as long as you didn't add any patches to it)
    2) What board are you using?
    3) I have verified the quick start guide example works on BeagleBone Black with the prebuilt image in Linux Processor SDK 4.2. Can you get it working with the prebuilt image?

    Regards,
    Nick
  • Hey Nick & Jaime,

    So, I believe I found what I was doing wrong.  After finding a very similar thread:https://e2e.ti.com/support/arm/sitara_arm/f/791/p/493697/1785463#pi316653=2

    I was originally using the PRU Software Support Package v4.0.2.  There is a very subtle difference in the example PRU_RPMsg_Echo_Interrupt1 in that the PRU SW Support version appears to be using mailboxes while the Linux SDK v4.02.00.09 is using system events.  I didn't change anything else in my system other then putting the SDK PRU_RPMsg_Echo_Interrupt1.out in the /lib/firmware folder, echoing to remoteproc2, and I started seeing the 100 'hello world' response messages expected in the example program.

    Now, I still do not have any rpmsg_pru* in my /dev/ folder, but I think when using System Events this is no longer necessary.

    FYI, I am using a BeagleBone Black for this testing and have been bouncing back and forth between the TI Linux SDK & Yocto/Poky with the meta-ti layer.  One thing that really through me off is the hands on lab and the http://processors.wiki.ti.com/index.php/RPMsg_Quick_Start_Guide are out of date and stale in this regard.  They mention needing the /dev/rpmsg-pru* devices when that is for older version of the linux kernel.

    Anyways, hope this helps and I will update if I learn anything further.

    Thanks,

    -Mike T

  • Hello Mike,

    Did you upgrade to the PRU SW support package 5.1.0 as found in Processor SDK 4.2: ti-processor-sdk-linux-.../example-applications/pru-icss-.../ ? (or git.ti.com/.../ )

    I actually updated the RPMsg Quick Start guide using PRU SW Support Package 5.1.0 and Processor SDK 4.2 about a month ago, so /dev/rpmsg-pru* devices are still used when using system events. Again, let me know if you see anything different while going through the Quick Start guide using the prebuilt image in SDK 4.2.

    Regards,
    Nick
  • Nick,

    I only see the current version as v04.02 http://www.ti.com/tool/PROCESSOR-SDK-AM335X nothing around 4.2 for the SDK.  The PRU SW Support Package has a note saying it is no longer being maintained and to use the Processor SDK instead since it is incorporated in that package.

    This is the version, v04.02, that I'm using.  What does it mean if I do not have any /dev/rpmsg_pru* devices but am getting the 100 'Hello World' messages being sent to the PRU and received back on the ARM side?

    Is there an exact list of kernel modules that need to be loaded?  I did see a rpmsg_char module somewhere, but I do not have that loading or building in the latest SDK.

    -Mike T

  • Hello Mike,

    Processor SDK 04.02 and Processor SDK 4.2 are the same thing. When the PRU SW Support Package was first introduced, users had to download it separately on TI.com and then add it to the Processor SDK. Nowadays, it is automatically included in the Processor SDK at (e.g.) ti-processor-sdk-linux-am335x-evm-04.02.00.09/example-applications/pru-icss-5.1.0.

    So if you're using the PRU SW Support Package in Processor SDK 4.2, then the PRU SW Support Package version is 5.1.0.

    As far as modules go: as long as you are 1) building the Linux Kernel with RPMsg support and building the modules as per the RPMsg Quick Start Guide, 2) installing the modules into the filesystem as per the Quick Start Guide, you should be able to see /dev/rpmsg_pru*. I think but am not sure that simply using ti-processor-sdk.../bin/create-sdcard.sh is sufficient to see rpmsg_pru as well.

    I would be surprised if you got the Hello World messages but were unable to see the pru modules. The PRU should only echo back if PRU channels have been established as in the PRU_RPMsg_Echo_Interrupt0/main.c :

    /*
     * Using the name 'rpmsg-pru' will probe the rpmsg_pru driver found
     * at linux-x.y.z/drivers/rpmsg/rpmsg_pru.c
     */
    #define CHAN_NAME			"rpmsg-pru"
    #define CHAN_DESC			"Channel 30"
    #define CHAN_PORT			30

    Something to note is that I believe Lab 5 expects CHAN_NAME to be "rpmsg-client-sample" while the Quick Start Guide expects it to be "rpmsg-pru". I'm not sure if that could be causing problems for you.

    Regards, 

    Nick

  • Nick,

    Ok on the SDK 04.02 = 4.2  ... I wasn't sure since you weren't using the 2 digits...thought you may have meant 4.20 perhaps.  Yes, I am using 5.1.0 since I have the 04.02.00.09 TI SDK.

    I have used the create.sdcard.sh, but prefer to TFTP boot and NFS mount my rootfs for faster development and debugging;-)

    I am getting the 100 'Hello World' messages and see this showup in dmesg and on the console/shell from my UART.  Here is why I do not think you need to have /dev/rpmsg-pru*

    In the main.c file of PRU_RPMsg_Echo_Interrupt1 for 5.1.0 it says this:

    /*
    * Using the name 'rpmsg-client-sample' will probe the RPMsg sample driver
    * found at linux-x.y.z/samples/rpmsg/rpmsg_client_sample.c
    *
    * Using the name 'rpmsg-pru' will probe the rpmsg_pru driver found
    * at linux-x.y.z/drivers/rpmsg/rpmsg_pru.c
    */
    #define CHAN_NAME "rpmsg-client-sample"
    //#define CHAN_NAME "rpmsg-pru"

    #define CHAN_DESC "Channel 31"
    #define CHAN_PORT 31

    As you can see, the rpmsg-pru channel name is commented out.  Then if you look at the rpmsg-client-sample.c file, found at the above commented location, the rpmsg_sample_probe does not create or look for any /dev/rpmsg-pru* devices.  These are used only when channel name is "rpmsg-pru."  So, different probe functions get called depending on which CHAN_NAME you are using.  Digging in a little further, the rpmsg_device struct seems to use a different way to communicate via endpoints and I never see anything in the linux-x.y.z/drivers/rpmsg_core & other files that suggest needing or using device files rpmsg-pru*

    My initial problem as the original poster stated was that we should see /dev/rpmsg-pru* device files and I associated this for the example programs and rpmsg-client-sample kernel module not working.  However, my issue wasn't that the /dev/rpmsg-pru* files were missing but rather previous version of the PRU SW Support Package (and rolled into the AM335X SDK) were using system events for mailboxes around the 59 range.  However, the newer examples use system events 16-19 for mapping events to channels.  Also, the code snippet indicates that rpmsg-client-sample.ko is used instead of rpmsg-pru.

    Anyways, hope this is becoming clearer and others that perhaps fall into this can see.

    Thanks!

    -Mike T

  • Hello Mike,

    I misspoke earlier:
    There are multiple ways to access the PRU channel created for RPMsg communication. There is a kernel-space driver, which is used in part 1 of Lab 5 of the PRU Hands-on Labs. You are correct that this driver does NOT use /dev/rpmsg-pru.

    /dev/rpmsg-pru* allows a user space character driver to communicate with the PRU, as in part 2 of Lab 5 and the RPMsg Quick Start Guide. So if you don't follow the steps listed in those pages, you wouldn't see /dev/rpmsg-pru*.

    ------------
    Glad the system events/mailboxes was cleared up. The original poster seems to have disappeared, so I'm marking this thread resolved.

    Regards,
    Nick