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.

IPC_start fails everytime

Other Parts Discussed in Thread: SYSBIOS

I am using the TI Keystone II K2K EVM. I have tried to build the demo apps that come with the MCSDK (under C:\ti\mcsdk_bios_3_00_03_15\demos) and everytime I try to run them I get an "Ipc_start: NameServer_setup() failed: -1". I first thought that there might be something wrong with my build process but then I went into /usr/bin and ran the examples that come preinstalled on the filesystem.

When I run MessageQApp I get the same error. The output from the LAD log file is:

 


Initializing LAD...
    opening FIFO: /tmp/LAD/LADCMDS
Retrieving command...

LAD_CONNECT:
    client FIFO name = /tmp/LAD/2189
    client PID = 2189
    assigned client handle = 0
    FIFO /tmp/LAD/2189 created
    FIFO /tmp/LAD/2189 opened for writing
    sent response
DONE
Retrieving command...
LAD_MULTIPROC_GETCONFIG: calling MultiProc_getConfig()...
MultiProc_getConfig() - 9 procs
        Proc 0 - "HOST"
        Proc 1 - "CORE0"
        Proc 2 - "CORE1"
        Proc 3 - "CORE2"
        Proc 4 - "CORE3"
        Proc 5 - "CORE4"
        Proc 6 - "CORE5"

       Proc 7 - "CORE6"
        Proc 8 - "CORE7"
    status = 0
DONE
Sending response...
Retrieving command...
LAD_NAMESERVER_SETUP: calling NameServer_setup()...
NameServer_setup: entered, refCount=0
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol

NameServer_setup: creating listener thread
NameServer_setup: exiting, refCount=1
    status = -1
DONE
Sending response...
listener_cb: Entered Listener thread.
NameServer: waiting for unblockFd: 2, and socks: maxfd: 3
Retrieving command...
    EOF detected on FIFO, closing FIFO: /tmp/LAD/LADCMDS

    opening FIFO: /tmp/LAD/LADCMDS

 

 

  • It appears that you don't have the needed kernel change that recognizes the AF_RPMSG socket family.

    These 2 lines from <kernel_dir>/include/linux/socket.h need to be present:
    ./include/linux/socket.h:#define AF_RPMSG       41      /* Remote-processor messaging   */
    ./include/linux/socket.h:#define PF_RPMSG       AF_RPMSG

    Please check your kernel sources for this content.  If you don't have it then you probably need to find the correct kernel.  I thought the MCSDK 3.00.03.15 had this change.

    Regards,

    - Rob

     

  • William,

    I have build the demo project successfully in CCS5.5 as you mentioned.
    C:\ti\mcsdk_bios_3_00_03_15\demos

    The Image Processing Demo for Keystone II differs in the following ways from the original Image Processing
    Demo:
    • The main process runs on the ARM cluster and is launched using the Matrix Application launcher.
    • NDK is removed, as the web server is now run via Matrix.
    • The DSP images are loaded using MPM.
    • DDR3 memory is allocated by the ARM through requests to the DSP core0. The physical address returned by
    core0 is then mapped to user space.

  • 1) My goal is not just to run a demo application, it is to test my build environment, and to test my IPC install on the EVM.

    2) Since IPC does not have any examples for the Keystone II, I decided to use the IPC example from the C:\ti\mcsdk_bios_3_00_03_15\demos directory.

    3) When I run the IPC example from the matrix GUI, I still get an error:

    Ipc_start failed: status = -1
    Ipc_start: NameServer_setup() failed: -1
    Using numLoops: 1000; payloadSize: 8, procId : 1
    Script Complete

    4) My kernel source does include the lines of code refferenced above

    I am trying to get to a point where I can write my own IPC code but as of now I have yet to be able to get anything from the MCSDK working.

  • Anyone have an answer?

    I have LAD running and I try to run just a simple program like this:

    #include <stdio.h>
    #include <stdlib.h>
    
    #include <ti/ipc/Std.h>
    #include <ti/ipc/Ipc.h>
    #include <ti/ipc/MessageQ.h>
    #include <ti/ipc/MultiProc.h>
    #include <ti/ipc/NameServer.h>
    
    
    int main()
    {
    	int status;
    	status = Ipc_start();
    	printf("Status = %d", status);
    	return 0;
    }
    

    and I get the same output: "Ipc_start: NameServer_setup() failed: -1"

     

    Here is the output from lad.txt

    Initializing LAD...
        opening FIFO: /tmp/LAD/LADCMDS
    Retrieving command...

    LAD_CONNECT:
        client FIFO name = /tmp/LAD/1864
        client PID = 1864
        assigned client handle = 0
        FIFO /tmp/LAD/1864 created
        FIFO /tmp/LAD/1864 opened for writing
        sent response
    DONE
    Retrieving command...
    LAD_MULTIPROC_GETCONFIG: calling MultiProc_getConfig()...
    MultiProc_getConfig() - 9 procs
            Proc 0 - "HOST"
            Proc 1 - "CORE0"
            Proc 2 - "CORE1"
            Proc 3 - "CORE2"
            Proc 4 - "CORE3"
            Proc 5 - "CORE4"
            Proc 6 - "CORE5"

            Proc 7 - "CORE6"
            Proc 8 - "CORE7"
        status = 0
    DONE
    Sending response...
    Retrieving command...
    LAD_NAMESERVER_SETUP: calling NameServer_setup()...
    NameServer_setup: entered, refCount=0
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol
    NameServer_setup: socket failed: 97, Address family not supported by protocol

    NameServer_setup: creating listener thread
    NameServer_setup: exiting, refCount=1
    listener_cb: Entered Listener thread.
    NameServer: waiting for unblockFd: 2, and socks: maxfd: 3
        status = -1
    DONE
    Sending response...
    Retrieving command...
        EOF detected on FIFO, closing FIFO: /tmp/LAD/LADCMDS

        opening FIFO: /tmp/LAD/LADCMDS

     

  • William,

    Please go through the sections "NameServer Module" and "Build Procedure" in the IPC User Guide, find the details of how to build the IPC project using SYSBIOS environment.
    ipc_3_00_04_29\docs\IPC_Users_Guide.pdf

  • I am trying to do all of this on the ARM side. ARM -> ARM messaging no sys/bios.

    On a side note I have created a sys/bios project, loaded it on the DSP with the above configuration information. And still get the same results.

  • William,

    Refer this E2E thread, However this discussion of thread can help you better for communicate between ARM & DSP using IPC.

    http://e2e.ti.com/support/embedded/linux/f/354/t/294984.aspx

  • Still same problem. I should not need to do any sort of recompiling or 'syncing' of LAD in order to call IPC() start. I do not see how it has become so hard to run a simple message queue. There is so much going on in the background with LAD, and mpmcl that there is almost no way for me to debug this issue by myself.

  • Hi William --

    I am encountering the exact same problem.  I wanted to also run ping_rpmsg from the ipc demos but that did not work with a similar error, address protocol not supported.  However, the required patches are in the sockets.h file.

    Have you had any resolution on this problem?

    Thanks,

  • Yes I fixed it but I had to roll back to the 3.8 Kernel from the 3.10