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.

J721S2XSOMXEVM: PDK: RTOS: How to link IPC and ENET applications

Part Number: J721S2XSOMXEVM


Tool/software:

Hi,

I am trying to use enet example and extend it further to include ipc stuff as well. I have added the necessary ipc source files to the enet example folder and updated the makefile to compile them as well.
Now, there is an expected problem with the Linker, i.e, missing symbols from ipc library, as it is not included anywhere in my setup.
Now the question is, how can I include either the built ipc library(ipc.aer5f) or build the library from source?

Do I need to point to the drv/ipc/src and build the library or how is it?

Thank you.

Best,
Moses 

  • Hi Moses,

    Due to a regional holiday, our India team is currently out of the office. Please expect a 1~2 day delay in responses.

    Apologies for the delay, and thank you for your patience.

    Regards,

    Takuma

  • Hi Takuma,

    Sure, in the meantime I could resolve the linking issue, and the build is successful.
    I needed to add ipc to the list of libraries needed in the makefile.


    Now, I could see that the ethernet application tasks seems to work as expected, but the ipc stuff doesn't seem to work, it complained about sciclient_init failed and there is no /dev/rpmsg* entries in linux.

    Best,
    Moses

  • Hello.

    Can you please explain me your use case clearly with cores  ? What ipc you are integrating into enet and which SDK version?

    Regards

    Tarun mukesh

  • Hi Tarun,

    I am trying to run the enet_lwip example, along with the ipc functionality on MAIN R4F (mcu2_0).
    PDK Version 11.0.0.21, SDK 11.0
    The IPC example works as expected when individually built and ran on mcu2_0, but when integrated in the enet_lwip example, it doesn't seem to work.


    I wasn't able to debug it properly due to the following reasons;
    * IPC appl. only works when it is started from the boot-seq; i.e uboot loading it. If it is loaded from debugger after linux is up, it won't work as expected (also heard about this through someone from TI)
    * If I use UART Console as UART0 from the integrated enet + ipc; then Linux doesn't fully boot it somehow got struck at some systemd init stage. Therefore I changed UART console to UART1, but then I don't see the logs in UART1, atleast linux boots fully.

    Also wit the integrated ipc + enet application, the enet part is able to send out udp frames as expected, but the ipc task doesn't seem to successfully work.

    Before changing the UART console to UART1, I saw on the console that the SciClientInit failed.

    My use-case;

    uP ---IPC---> uC ---Eth---> ExternalDevice; Data sent through IPC forms the basis for the Ethernet data.

    Thank you.

    Best,
    Moses

  • On the Linux side, the driver throws the following errors,


    [ 5.947800] k3_r5_rproc bus@100000:r5fss@5c00000: error -EINVAL: rproc_add failed │ │
    [ 5.963453] rproc-virtio rproc-virtio.16.auto: registered virtio0 (type 7) │ │
    [ 5.996596] k3_r5_rproc bus@100000:r5fss@5c00000: k3_r5_cluster_rproc_init failed, ret = -22 │ │
    [ 6.009553] k3_r5_rproc bus@100000:r5fss@5c00000: probe with driver k3_r5_rproc failed with error -22

    [ 5.698399] remoteproc remoteproc0: releasing 41000000.r5f │ │
    [ 5.858378] remoteproc remoteproc0: 41000000.r5f is available │ │
    [ 5.881463] remoteproc remoteproc1: 5c00000.r5f is available │ │
    [ 5.884585] remoteproc remoteproc0: attaching to 41000000.r5f │ │
    [ 5.887608] remoteproc remoteproc1: attaching to 5c00000.r5f │ │
    [ 5.908829] remoteproc remoteproc1: rsc table is truncated │ │
    [ 5.931634] remoteproc remoteproc1: Failed to process resources: -22 │ │
    [ 5.981184] remoteproc remoteproc0: remote processor 41000000.r5f is now attached │ │
    [ 6.072040] remoteproc remoteproc1: releasing 5c00000.r5f 

    Note: 

    * I only have the mcu1_0 and mcu2_0 running.

    mcu2_0 contains my app (enet+ipc); mcu1_0 is some prebuilt app

  • Hello,

    MCU2_0 is running IPC +ENET custom example .

    From MCU2_0 to which core you want to do IPC ?

    Regards

    Tarun Mukesh

  • Hi Tarun,

    mcu2_0 <-> mpu1_0

    Also I have now placed the sciclient init before calling the board init.

    Best,
    Moses

  • Found the issue. 

    I have missed setting one of the flags.

    I need to add A72_LINUX_OS flag to the makefile.

  • Hello,

    In MCU2_0 core , if you are running IPC then it need to wait till linux is ready for communication. Are you waiting in the application till linux is ready ?

    If you are using linux , either uboot or linux have to load the cores. In your case uboot loads MCU2_0 core then MCU2_0 core will start running before Linux is fully booted on A72 core. so you need to write "wait for linux to be ready " functionality in MCU2_0.

    what is your full boot sequence ?

     

    Regards

    Tarun Mukesh

  • Hi Tarun,

    The boot sequence is like you mentioned,

    uboot -> mcu2_0 -> Linux; 

    Also wait for linux part is already present in the ipc example, so my integrated solution also has it. Its just that I overlooked the flag A72_LINUX_OS.

    Thanks,
    Moses

  • ok thanks.

    Regards

    Tarun Mukesh