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.

TMDS64EVM: IPC and SDL Related Query

Part Number: TMDS64EVM

Hi,
First i want to know about SDL

Is SDL, is supported in TMDS64EVM in A53 core. as per my knowledge we can run SDL in R5 and M4 cores.


Regards,
Debashis

  • Hi,
    I tried to run IPC echo with the examples. with out linux

    So i tried with ROV and i am getting only the date and time what its logging at first after that its not going inside(

    Log
    [r5f0-0] 0.000412s : [IPC RPMSG ECHO] May 14 2024 18:16:44

    ).

    Even i commented the RPMessage_waitForLinuxReady(SystemP_WAIT_FOREVER);

    can you tell us why?


  • Hello Debashis,

    SDL: Yes, they are only supported on M4 and R5 cores, not supported on the A53 core.

    IPC: Please share the SDK version and the example path that you are testing with

    Regards,
    Krithika

  • SDK version - AM64x MCU+ SDK  09.01.00

    Example is IPC RP message Linux echo

  • Hi,

    1-> can you explain me how to debug with the project(ipc linux echo example as it given in mcu+sdk)
    i want to create a new endpoint and communicate from A53 view command line first using https://git.ti.com/cgit/rpmsg/ti-rpmsg-char/about/

    2-> when i try create a softlink in /lib/firmware with the executable and boot the boards i can able to communicate with the r5 amd m4 with endpoint 14 but i cannot able to access 13(following the example code of ipc linux echo) as you can see its already mention that 13 is using as a kernel space not user space but both the endpoint are created in same manner in receiving thread(created in ipc_rpmsg_create_recv_tasks).

     * The service names MUST match what linux is expecting
     */
    /* This is used to run the echo test with linux kernel */
    #define IPC_RPMESSAGE_SERVICE_PING        "ti.ipc4.ping-pong"
    #define IPC_RPMESSAGE_ENDPT_PING          (13U)
    
    /* This is used to run the echo test with user space kernel */
    #define IPC_RPMESSAGE_SERVICE_CHRDEV      "rpmsg_chrdev"
    #define IPC_RPMESSAGE_ENDPT_CHRDEV_PING   (14U)


    void ipc_recv_task_main(void *args)
    {
        int32_t status;
        char recvMsg[IPC_RPMESSAGE_MAX_MSG_SIZE+1]; /* +1 for NULL char in worst case */
        uint16_t recvMsgSize, remoteCoreId, remoteCoreEndPt;
        RPMessage_Object *pRpmsgObj = (RPMessage_Object *)args;
    
        DebugP_log("[IPC RPMSG ECHO] Remote Core waiting for messages at end point %d ... !!!\r\n",
            RPMessage_getLocalEndPt(pRpmsgObj)
            );
    
        /* wait for messages forever in a loop */
        while(1)
        {
            /* set 'recvMsgSize' to size of recv buffer,
            * after return `recvMsgSize` contains actual size of valid data in recv buffer
            */
            recvMsgSize = IPC_RPMESSAGE_MAX_MSG_SIZE;
            status = RPMessage_recv(pRpmsgObj,
                recvMsg, &recvMsgSize,
                &remoteCoreId, &remoteCoreEndPt,
                SystemP_WAIT_FOREVER);
    
            if (gShutdown == 1u)
            {
                break;
            }
    
            DebugP_assert(status==SystemP_SUCCESS);
    
            /* echo the same message string as reply */
            #if 0 /* not logging this so that this does not add to the latency of message exchange */
            recvMsg[recvMsgSize] = 0; /* add a NULL char at the end of message */
            DebugP_log("%s\r\n", recvMsg);
            #endif
    
            /* send ack to sender CPU at the sender end point */
            status = RPMessage_send(
                recvMsg, recvMsgSize,
                remoteCoreId, remoteCoreEndPt,
                RPMessage_getLocalEndPt(pRpmsgObj),
                SystemP_WAIT_FOREVER);
            DebugP_assert(status==SystemP_SUCCESS);
        }
    
        DebugP_log("[IPC RPMSG ECHO] Closing all drivers and going to WFI ... !!!\r\n");
    
        /* Close the drivers */
        Drivers_close();
    
        /* ACK the suspend message */
        IpcNotify_sendMsg(gShutdownRemotecoreID, IPC_NOTIFY_CLIENT_ID_RP_MBOX, IPC_NOTIFY_RP_MBOX_SHUTDOWN_ACK, 1u);
    
        /* Disable interrupts */
        HwiP_disable();
    #if (__ARM_ARCH_PROFILE == 'R') ||  (__ARM_ARCH_PROFILE == 'M')
        /* For ARM R and M cores*/
        __asm__ __volatile__ ("wfi"   "\n\t": : : "memory");
    #endif
    #if defined(BUILD_C7X)
        asm("    IDLE");
    #endif
        vTaskDelete(NULL);
    }
    
    
    
    
    
    
    
    void ipc_rpmsg_create_recv_tasks(void)
    {
        int32_t status;
        RPMessage_CreateParams createParams;
        TaskP_Params taskParams;
    
        RPMessage_CreateParams_init(&createParams);
        createParams.localEndPt = IPC_RPMESSAGE_ENDPT_PING;
        status = RPMessage_construct(&gIpcRecvMsgObject[0], &createParams);
        DebugP_assert(status==SystemP_SUCCESS);
    
        RPMessage_CreateParams_init(&createParams);
        createParams.localEndPt = IPC_RPMESSAGE_ENDPT_CHRDEV_PING;
        status = RPMessage_construct(&gIpcRecvMsgObject[1], &createParams);
        DebugP_assert(status==SystemP_SUCCESS);
    
        /* We need to "announce" to Linux client else Linux does not know a service exists on this CPU
         * This is not mandatory to do for RTOS clients
         */
        status = RPMessage_announce(CSL_CORE_ID_A53SS0_0, IPC_RPMESSAGE_ENDPT_PING, IPC_RPMESSAGE_SERVICE_PING);
        DebugP_assert(status==SystemP_SUCCESS);
    
        status = RPMessage_announce(CSL_CORE_ID_A53SS0_0, IPC_RPMESSAGE_ENDPT_CHRDEV_PING, IPC_RPMESSAGE_SERVICE_CHRDEV);
        DebugP_assert(status==SystemP_SUCCESS);
    
        /* Create the tasks which will handle the ping service */
        TaskP_Params_init(&taskParams);
        taskParams.name = "RPMESSAGE_PING";
        taskParams.stackSize = IPC_RPMESSAGE_TASK_STACK_SIZE;
        taskParams.stack = gIpcTaskStack[0];
        taskParams.priority = IPC_RPMESSAGE_TASK_PRI;
        /* we use the same task function for echo but pass the appropiate rpmsg handle to it, to echo messages */
        taskParams.args = &gIpcRecvMsgObject[0];
        taskParams.taskMain = ipc_recv_task_main;
    
        status = TaskP_construct(&gIpcTask[0], &taskParams);
        DebugP_assert(status == SystemP_SUCCESS);
    
        TaskP_Params_init(&taskParams);
        taskParams.name = "RPMESSAGE_CHAR_PING";
        taskParams.stackSize = IPC_RPMESSAGE_TASK_STACK_SIZE;
        taskParams.stack = gIpcTaskStack[1];
        taskParams.priority = IPC_RPMESSAGE_TASK_PRI;
        /* we use the same task function for echo but pass the appropiate rpmsg handle to it, to echo messages */
        taskParams.args = &gIpcRecvMsgObject[1];
        taskParams.taskMain = ipc_recv_task_main;
    
        status = TaskP_construct(&gIpcTask[1], &taskParams);
        DebugP_assert(status == SystemP_SUCCESS);
    }

  • Hello Debashis,

    I assume:

    1) You are running Linux on the A53 cores, and MCU+ on the remote cores

    2) You want to test RPMsg IPC between Linux, and the MCU+ cores

    If you are NOT testing RPMsg IPC between Linux and an MCU+ core, then you are using the wrong software. Stop and tell me so we can point you to the right code. 

    Please refer to the AM64x academy.

    Start by running the out-of-the-box Linux IPC examples:

    https://dev.ti.com/tirex/explore/node?a=7qm9DIS__LATEST&node=A__AdAyuKWUWVV5j4wBc7C6XA__AM64-ACADEMY__WI1KRXP__LATEST

    https://dev.ti.com/tirex/explore/node?a=7qm9DIS__LATEST&node=A__AdAyuKWUWVV5j4wBc7C6XA__AM64-ACADEMY__WI1KRXP__LATEST

    Then you can move on to more advanced IPC documentation: 

    https://dev.ti.com/tirex/explore/node?a=7qm9DIS__LATEST&node=A__AT0quqp1AZJ7z5jn1Ua5nQ__AM64-ACADEMY__WI1KRXP__LATEST

    In particular, you are probably interested in section "How to add multiple RPMsg endpoints to a remote core running RTOS?"

    We also have resources on how to debug a remote core while Linux is running 

    Refer to https://dev.ti.com/tirex/explore/node?a=7qm9DIS__LATEST&node=A__AeMVTHckwFDmFoNkRHpRPw__AM64-ACADEMY__WI1KRXP__LATEST 

    Regards,

    Nick