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.

Porting IPC communication for mcu1_0 can_profiling_demo application

Other Parts Discussed in Thread: SYSBIOS

Hi Kiran,

We are planning to integrate the IPC code into the can_profiling_application  for mcu1_0 to have communicate with  A72 running linux. I checked one of the IPC demo applications based on concerto and vision app (provided from you in  one of the other posts) , which have the below memory map as below .

/* linker options */
--fill_value=0
--stack_size=0x2000
--heap_size=0x1000

#define ATCM_START 0x00000000

-e __VECS_ENTRY_POINT

SECTIONS
{
.vecs : {
__VECS_ENTRY_POINT = .;
} palign(8) > R5F_TCMB0
.init_text : {
boot.*(.text)
*(.text:ti_sysbios_family_arm_MPU_*)
*(.text:ti_sysbios_family_arm_v7r_Cache_*)
} > R5F_TCMB0
.text:xdc_runtime_Startup_reset__I : {} palign(8) > R5F_TCMB0
.text : {} palign(8) > DDR_MCU1_0
.cinit : {} palign(8) > DDR_MCU1_0
.bss : {} align(8) > DDR_MCU1_0
.const : {} palign(8) > DDR_MCU1_0
.data : {} palign(128) > DDR_MCU1_0
.sysmem : {} align(8) > DDR_MCU1_0
.stack : {} align(4) > DDR_MCU1_0
.bss:taskStackSection > DDR_MCU1_0

.resource_table : {
__RESOURCE_TABLE = .;
} > DDR_MCU1_0_RESOURCE_TABLE

.bss:ddr_shared_mem (NOLOAD) : {} > DDR_MCU1_0_LOCAL_HEAP
.bss:app_log_mem (NOLOAD) : {} > APP_LOG_MEM
.bss:tiovx_obj_desc_mem (NOLOAD) : {} > TIOVX_OBJ_DESC_MEM
.bss:ipc_vring_mem (NOLOAD) : {} > IPC_VRING_MEM
}

and also r5_mpu.xs for mpu configuration. So is it possible to use the above configuration along with ipc examples lines  under pdk  with the can_profiling app and establish communication with A72 linux along the lines of "pdk ipc examples"?

  • Hi All,

    Regarding integration of IPC with can_profiling application under mcuss_demos, have modified the make file (included ipc lib) and the linker _r5_sysbios.lds files according to the demo ipc application (ex03_linux_bios_2core_echo_test) present under /pdk/packages/ti/drv/ipc/common/makefile and  /pdk/packages/ti/drv/ipc/common/j721e/linker_r5f_mcu1_0.lds  Then planning to port all source/header files from ex03_linux_bios_2core_echo_test to can_profiling_app Please find these two files attached . Is this approach is fine for integrating these two demo application into single one as our use case is we have to receive all CAN messages and transfer them to A72 through IPC. Kindly let me know if the approach is right.

    With regards,

    Jeyaseelan IPC_Config.zip

  • Hi All,

    I have integrated the "ex03_linux_bios_2core_echo_test" with can_profiling app under mcuss_demos . Also have  attached the generated map file.Have the below queries of the same.

    1.Let me know  if this mcal + ipc app is fine to be tested using R5_SPL download. The config files are in the previous post.

    2.Need a sample Linux application to test the "ex03_linux_bios_2core_echo_test" mcu1_0 application for verify communication between mcu1_0 and A72 running linux.

    Kindly provide answers for the same.

    With regards,

    Jeyaseelanmcal_ti_rtos_aptiv_mcu1_0_debug.xer5f.zip

  • Jeyaseelan,

    Happy to help - can you let me know what you're looking to confirm on your first question?  Are you looking to verify the memory addresses are correct?

    For number two, please take a look at the thread below - it explains how you can load the test application in Linux:

    https://e2e.ti.com/support/processors/f/791/t/915474

    Regards,
    Mike

  • Hi Michael,

    Thanks for your reply.  Regarding the first question , i like to confirm if  the files sysbios.cfg file and the linker.lds are properly configured for IPC to work properly.

    For the second question i am more interested on if there any linux side sample application  is available to test "ex03_linux_bios_2core_echo_test" r5f  IPC application. 

    Looks the r5f side application is loading properly but am more interested on how to verify the IPC communication between r5f and A72(linux) using the above  example (ping / pong message btw above two cores) available in pdk/ti/package/drv/ipc/examples which i merged with can_profile app present under mcus_mcal demos in psdk_rtos package .

    Can you kindly go through the attached config files. If needed i can share the complete merged code as well.

    With regards,

    Jeyaseelan

  • Hi ,

    In ex03_linux_bios_2core_echo_test  based app , in r5f side ,  the remote core  is not sending the ready flag true. So the task is not coming out of the below while loop and it is not proceeding to the further steps.

    void rpmsg_vdevMonitorFxn(UArg arg0, UArg arg1)
    {
    int32_t status;

    AppUtils_Printf(MSG_NORMAL, MSG_APP_NAME
    "\n Inside Vdev Monitor Function\n");

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

    Can someone share your input on the same.

    With regards,

    Jeyaseelan

  • Hi Jeyaseelan,

    Can you share you code?  This will be very helpful to resolve the issue.

    Regards,
    Mike

  • Hi Jeyaseelan,

    There is a very simple rpmsg-client-sample available in the Linux kernel (samples/rpmsg/rpmsg_client_sample.c) that demonstrates the basic ping-pong sample. This sample is built as a module and should be readily available in the SDK FS.

    You can just do "modprobe rpmsg_client_sample" to install the module which should start exchanging the messages to the remote-side. This driver probes the published ti.ipc4.ping-pong rpmsg devices and exchanges messages with each of them.

    The remote core does not send a ready flag, rather this is a flag initialized by Linux with the remote core waiting for this to know the vring transports is setup.

    You should be seeing the rpmsg devices that you published in sysfs under /sys/bus/rpmsg/devices  

    As for PDK examples, the "ipc_echo_test" folder (without any exNN_ prefixes) serves as the primary example used with Linux.  

    regards

    Suman

  • Hi Mike/Suman ,

    Thanks for your reply. As per suman suggestion, I could see my application(R5F) as well as the linux driver works properly using the rpmsg-client-sample . Now my question is how the user space application in linux  opens a device handle to it to process in the user space. i was expecting rpmsg driver would be listed under /dev directory . or is it possible to get it opened using /sys/bus/rpmsg/devices  path.Kindly provide answer for the same. 

    With regards,

    Jeyaseelan