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.

Using the IPC library and remote proc

Other Parts Discussed in Thread: TCI6638K2K

I am using the Keystone II k2k evm running SMP 3.10 linux. I have downloaded the MCSDK and built the IPC libraries. Now I have 2 questions.

1) The IPC users guide says that I must install patches to the Linux kernel in order for the remote proc module to work. When I open the patches folder it only has patches for the 3.8 kernel. Do these patches need to be applied to the 3.10 kernel? If not then how do I get the remote proc module to work? When I try to modprobe the module, nothing happens. and lsmod shows no modules running. Is the module not installed?

2) The IPC users guide has a "make install prefix={rootfs}" command in order to install the files in a root filesystem. My rootfs is located in nand flash and thus I am unable to use the install command with IPC. Where are the files that are installed located and where should I copy them on my EVM? Can I build a new rootfs and flash it to the EVM?

  • Hi,

    Which version of IPC are you using? Get the latest version of IPC and try, find the IPC download link at: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ipc/index.html

    IPC 3.00.00.20 version and above can support this device: TCI6638K2K (Keystone II)

    On Linux: IPC 3.x is built upon services available in the mainline Linux kernel (3.4+). These core services include remoteproc and rpmsg.

    This wiki articles will help you,

    http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Developing_Transports http://processors.wiki.ti.com/index.php/IPC_3.x

    http://processors.wiki.ti.com/index.php/IPC_3.x_FAQ

     

  • I am using ipc_3_00_04_29 currently.

    Back to my original question. If I do not need to add anything to the kernel, how do I get the IPC files to my system. When Compiling IPC it does not consolidate the files that need to be installed into a single directoy so it is difficult for me to decide which files need to be copied to my filesystem and where to put them.

    Again I cannot use make install prefix=... because I am not booting a nfs, I am booting a filesystem located in nand flash.

  • Hi,

    Can I build a new rootfs and flash it to the EVM?

    Again I cannot use make install prefix=... because I am not booting a nfs, I am booting a filesystem located in nand flash.

    Copy a fresh filesystem on host PC (it may NFS) and provide that locations to the "prefix" option and compile & install to the filesystem and then flash the updated filesystem into the NAND.

    It is recommended since it will install all binaries to the exact locations with dependencies while you give "make install"

  • Do you have a link to the proper procedure for formating and compressing the new fs?

    Also, for flashing just the new fs not the kernel?

  • Hi,

    Typically, We ll boot the board through NFS and flash the filesystem (tar) into NAND.

    For UBIFS, The procedure bit different that need to create ubi file through its ini and then flash ubi formatted fs into NAND.

    Refer the below TI wiki.

    http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Exploring

  • Unfortunately the computer that I am doing this on does not have adminstrator priveledges and is also used by many. Because of this I am unable to set up an NFS and also am unable to install all of the tools required to get mtd-utils up and running.

    I did a make install to a dummy path where the files were then copied too. I then merged the dummy directories with the filesystem in the NAND flash through SCP so I believe the that the files and dependencies should all be in the correct places.

    When trying to Cross Compile my source code with the IPC libraries, what files do I have to include in my compile/link in order for the program to build correctly?

    I get:

    error: unknown type name Int

    along with many other type errors.

    Do I have to use XDC in order to use IPC? I am having a lot of trouble getting XDC up and running and would like to use IPC without the need to use XDC.

  • Hi William,

    Regarding your build issues, I suggest you take a look at some of the IPC examples under <IPC_INSTALL_DIR>/examples/archive. While there is no linux-based example currently available for your device, you can take a look at DRA7XX_linux_elf\ex02_messageq.zip for an example of how to compile an IPC-based application on both the host and DSP. Simply concentrate on the contents in the 'host' and 'dsp1' subdirectories.

    The errors you are getting are probably due to fundamental header files such as <IPC_INSTALL_DIR>/linux/include/ti/ipc/Std.h not being included.

    XDC is only needed to rebuild the slave-side SYSBIOS-based images. You can leverage the configuro tool as shown in the ex02_messageq example to minimize exposure to XDC. Again the makefiles in the example should be able to help you here.

    Best regards,

    Vincent

  • Thats for the help I will explore the examples folder and try to leverage the code from there.

  • Vincent,

    I am running into the problem of when I try to run the Host side code on the ARM, the Ipc_start() function hangs or blocks on its call. The research that I have done says that I need to configure the Ipc_start with an XDC configure file, but as I was told above, I should not need XDC unless I am running on the DSP/BIOS side. I know that I am running the host code without the slave side code so it should not work correctly but am I right that it still should not hang on Ipc_start()?

    I also ran just a barebones main with and Ipc_start() call:

    /* package header files */
    #include <ti/ipc/Std.h>
    #include <ti/ipc/Ipc.h>
    #include <ti/ipc/MessageQ.h>
    #include <ti/ipc/MultiProc.h>

    int main()
    {
     int status;
     status = Ipc_start();
     if (status < 0) {
      printf("Ipc_start failed\n");
      return -1;
     }

     return 0;
    }

     

    This also blocks on the Ipc_start() call?

  • Hi Wiliam,

    I would have expected Ipc_start() to return -1 when it fails. Did you launch the LAD and did you provide it with a log file name (e.g. log.txt) as argument? If so, there should be a log file produced under /tmp/LAD/log.txt. Could you share its contents?

    Another thing you can try is to update to the latest IPC 3.21 to see if it helps: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ipc/index.html.

    Best regards,

    Vincent

  • Ok I think that it is working now. I did not have LAD running. What is LAD? and why do I need to restart my system if I want to run the program again. Here is my new log (this is a ping example). I believe the errors are consitent with the fact that I am only running this on the host side and have no client on the other end.

     

    Initializing LAD...

    opening FIFO: /tmp/LAD/LADCMDS

    Retrieving command...

    LAD_CONNECT:

    client FIFO name = /tmp/LAD/1791

    client PID = 1791

    assigned client handle = 0

    FIFO /tmp/LAD/1791 created

    FIFO /tmp/LAD/1791 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: 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...

    LAD_MESSAGEQ_CREATE: calling MessageQ_create(0x17614, 0x17634)...

    MessageQ_create: creating 'HOST_SvrMsgQ'

  • LAD is a daemon process that is critical to the way IPC works in Linux. It is a centralized location where IPC keeps track of the global state of each IPC module. It handles everything from NameServer requests to storing the MultiProc database, potentially allowing multiple processes to use IPC concurrently.

    The IPC install guide has instructions on how to run IPC-based applications: http://processors.wiki.ti.com/index.php/IPC_Install_Guide_Linux. You may want to take a look if you haven't already read it, to make sure you are building and running IPC correctly.

    I am not sure why you would need to restart your system after your program failed. I see a call to MessageQ_create() in your log. Upon Ipc_start() returning -1, your program should not continue on and try to use MessageQ. Make sure the program exits upon failure from Ipc_start().

    Another possibility would be to kill the LAD process and restart it after your application failed. This would help ensure that LAD is not stuck in a bad state (thought ideally it shouldn't).  

    Best regards,

    Vincent

  • Thanks a lot Vincent