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.

TDA4VM: Using Modprobe rpmsg_client_sample kernel module in customised C application

Part Number: TDA4VM

Hi Team,

I am working on jacinto EVM using  Processor SDK RTOS J721E 07_03_00

I am referring CDD_IPC_Profiling Demo app from 

 https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/mcusw/mcal_drv/docs/drv_docs/demo_cdd_ipc_profile_top.html

as per my understanding it will build a kernel module,please correct me if I am wrong.

I want develop a C application based on IPC (communication between a72 linux and mcu1_0 rtos).

so by referring CDD_IPC_profiling app,can I use this kernel module in my c application?if yes can you please provide me any references to do so?

If not is  there any other demo application that I can refer and used in my application?

your guidance will be very helpful for me.

 Regards,

Tanvi N. Gore  

  • Hi Team,

    can anyone guide me for this?

    any references would be very helpful.

    Regards,

    Tanvi N. Gore

  • Hi Tanvi,

    The rpmsg_client_sample is a kernel only module, and is used as a kernel-level IPC example. It does not present any userspace interfaces.

    If you want to develop a userspace application, then you need to use the ti-rpmsg-char library that uses the rpmsg-char kernel driver/module.

    Please see the relevant Linux SDK documentation references for the IPC Foundational Component on Linux. (The Link is from 8.0 SDK, but the same steps apply).

    You need to be publishing a rpmsg device with a name "rpmsg_chrdev" that will probe the rpmsg_char driver.

    regards

    Suman

  • Hi Suman,

    Thanks for your reply!

    as per your suggestion we referred ti_rpmsg_char library.
    we have few doubts after running the application.

    1.running "rpmsg_char_simple -r 0 -n 10" considering -r 0 denotes MCU1_0,we received an output as attached in SS1.

    2. We have written own application based on TI-RTOS pdk IPC driver for MCU1_0 core. We load this binay as per

    e2e.ti.com/.../faq-tda4vm-mcusw-demo-on-can-along-side-linux-on-a72

    This thread explains booting R5 core from linux.

    3. Below is the code snippet from MCU1_0 application (own application),where we are initializing IPC driver and waiting for MPU1_0(a72 on linux) to up.

    /*********************************************************************************************************
    /* Step1 : Initialize the multiproc */
    Ipc_mpSetConfig(selfProcId, numProc, pRemoteProcArray);

    //System_printf("IPC_echo_test (core : %s) .....\r\n%s\r\n",
    //Ipc_mpGetSelfName(), IPC_DRV_VERSION_STR);

    AppUtils_Printf(MSG_NORMAL, "Ipc_mpSetConfig done\n");

    Ipc_init(NULL);

    //System_printf("Required Local memory for Virtio_Object = %d\r\n",
    // numProc * Ipc_getVqObjMemoryRequiredPerCore());

    /* If A72 remote core is running Linux OS, then
    * load resource table
    */
    Ipc_loadResourceTable((void*)&ti_ipc_remoteproc_ResourceTable);

    AppUtils_Printf(MSG_NORMAL, "Ipc_loadResourceTable done\n");

    AppUtils_Printf(MSG_NORMAL, "Waiting Ipc_isRemoteReady\n");

    /* Wait for Linux VDev ready... */
    while(!Ipc_isRemoteReady(IPC_MPU1_0))
    {
    Task_sleep(10);
    }

    AppUtils_Printf(MSG_NORMAL, "Linux VDEV ready now .....\n");
    **************************************************************************************************/

    here even after the MPU1_0 (Linux) is up, MCU1_0 is stucked at Ipc_isRemoteReady(IPC_MPU1_0)

    What steps or action we have to follow that MPU1_0 is ready for the communication?

    4. One more thing,
    We have replaced rootfs/lib/firmware/j7-mcu-r5f0_0-fw with our own application and executed command
    "rpmsg_char_simple -r 0 -n 10"
    Still we are getting response as mentioned in your example.
    Our understanding is that we have replaced the MCU1_0 and how come "rpmsg_char_simple" example is working?

    your help is highly appreciated!!

    Best Regards,

    Tanvi

  • Hi Tanvi,

    Can you give the output of "cat /sys/kernel/debug/remoteproc/remoteprocX/resource_table" where X corresponds to the number associated with MCU1_0 (You can use head /sys/class/remoteproc/remoteproc*/name).

    The common issue is that you are either looking at a different location or you are not accounting for Cache.

    regards

    Suman