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.

PROCESSOR-SDK-OMAPL138: Issue connecting to LAD daemon from DSP application

Part Number: PROCESSOR-SDK-OMAPL138
Other Parts Discussed in Thread: OMAPL138, OMAP-L138, DA8XX

Hi Support,

I am experiencing some issues regarding IPC communication between ARM & DSP on the OMAPL138 SoM.

The Issue:

The ARM is running Linux and acts as the host in the IPC communication. The DSP is running SYS/BIOS and acts as the slave in the IPC communication.
From Linux I control the DSP with Remoteproc & RPmsg.

I understand that in order for the IPC communication to work the "LAD/IPC Daemon" is required to run?
When I do "Ipc_start()" in my ARM application the LAD outputs:"NameServer_attach: connect failed: procId=1, errno=22 (Invalid argument)".
This error occurs if I start the DSP application both after and before the ARM application.

FAQ:
I've read through the FAQ's at https://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_Foundational_Components.html#ipc-training

  • Failure to load the slave image. If the a slave executable fails to load, the sockets to communicate with it are not created. Make sure the slaves you need to communicate with are already loaded.
  • Failure to provide the correct KERNEL_INSTALL_DIR when building the user-side IPC libraries. Some customers reported this error when using Linux 3.9+ kernels (where the AF_MAX value in socket.h has increased). This created a mismatch in what AF_RPMSG was set to in user libs and the kernel, and the connect call failed. The solution was to require users set KERNEL_INSTALL_DIR when building the user-space libraries so IPC can interrogate the kernel version and set AF_RPMSG appropriately.
  • Failure to configure the slave image correctly. Internally, the slave-side MessageQ transport (TransportRpmsg) broadcasts its availability to the Linux host. If this broadcast doesn’t occur (e.g., b/c the slave wasn’t configured with TransportRpmsg), the socket connection will fail with error 22.
  • General slave-to-host interrupt failure. Some devices (e.g. DRA7XX) have interrupt crossbars that must be configured correctly as part of system boot (e.g. uboot). If these crossbars aren’t initialized correctly, the slave-side broadcast that TransportRpmsg is available won’t be received, the underlying socket connection won’t be available, and the first sign of failure will be LAD trying to connect to the socket.

I am certain that the slave image runs when I load firmware into the DSP with remoteproc as I am writing to various shared memory locations in the DSP firmware. I have confirmed this using "devmem" in Linux.

Additionally, I have loaded the "RPMSG_PROTO" module and confirmed that the AF_RPMSG value is the same in my Linux kernel build and IPC library build.

With regards to the last two  scenarios, I do not know how to verify that the DSP is configured correctly with Transport Rpmsg. I suspect that it has something to do with the configuration script (.cfg) file and my resource table?

I have attached my cfg file, resource table, DSP memory map & LAD Daemon log.

[0.696236] 
Initializing LAD... [0.707983] 
    opening FIFO: /tmp/LAD/LADCMDS
[9.093058] Retrieving command...
[9.096121] 
LAD_CONNECT: 
[9.096309]     client FIFO name = /tmp/LAD/849
[9.096427]     client PID = 849
[9.096523]     assigned client handle = 0
[9.097035]     FIFO /tmp/LAD/849 created
[9.097593] 
WARN: Client /tmp/LAD/849 has not yet opened, will retry
[9.098990] 
WARN: Client /tmp/LAD/849 has not yet opened, will retry
[9.101604] 
WARN: Client /tmp/LAD/849 has not yet opened, will retry
[9.102376] 
WARN: Client /tmp/LAD/849 has not yet opened, will retry
[9.103579]     FIFO /tmp/LAD/849 opened for writing
[9.104062]     sent response
[9.104205] DONE
[9.104307] Retrieving command...
[9.105905] Sending response...
[9.106194] Retrieving command...
[9.107103] LAD_MULTIPROC_GETCONFIG: calling MultiProc_getConfig()...
[9.107363] MultiProc_getConfig() - 2 procs
[9.107492] # processors in cluster: 2
[9.107582] cluster baseId: 0
[9.107665] 	ProcId 0 - "HOST"
[9.107753] 	ProcId 1 - "DSP"
[9.107840]     status = 0
[9.107922] DONE
[9.107997] Sending response...
[9.108821] Retrieving command...
[9.109113] LAD_NAMESERVER_SETUP: calling NameServer_setup()...
[9.109305] NameServer_setup: entered, refCount=0
[9.109566] NameServer_setup: creating listener thread
[9.110574] NameServer_setup: exiting, refCount=1
[9.110967]     status = 0
[9.111109] DONE
[9.111209] Sending response...
[9.111862] Retrieving command...
[9.112162] LAD_MESSAGEQ_GETCONFIG: calling MessageQ_getConfig()...
[9.112304]     status = 0
[9.112411] DONE
[9.112503] Sending response...
[9.113152] Retrieving command...
[9.113453] LAD_MESSAGEQ_SETUP: calling MessageQ_setup()...
[9.113601] MessageQ_setup: entered, refCount=0
[9.113713] NameServer_create(): 'MessageQ'
[9.114027] MessageQ_setup: exiting, refCount=1
[9.114177]     status = 0
[9.114283] DONE
[9.114372] Sending response...
[9.117043] listener_cb: Entered Listener thread.
[9.117285] NameServer: waiting for unblockFd: 1, and socks: maxfd: 1
[9.117576] Retrieving command...
[9.117848] NameServer_attach: --> procId=1, refCount=0
[9.118153] NameServer_attach: created send socket: 5, procId 1
[9.118498] NameServer_attach: connect failed: procId=1, errno=22 (Invalid argument)
[9.118771]     closing send socket: 5
[9.118999] NameServer_attach: <-- refCount=0, status=-1
[9.119136] Sending response...
[9.122363] Retrieving command...
[9.122672] NameServer_attach: --> procId=1, refCount=0
[9.122926] NameServer_attach: created send socket: 5, procId 1
[9.123117] NameServer_attach: connect failed: procId=1, errno=22 (Invalid argument)
[9.123305]     closing send socket: 5
[9.123525] NameServer_attach: <-- refCount=0, status=-1
[9.123664] Sending response...
[9.128105] Retrieving command...
[9.139783] LAD_MESSAGEQ_CREATE: calling MessageQ_create(0x1f798, 0x1f7b8)...
[9.139980] MessageQ_create: creating 'dspsystem'
[9.140133] MessageQ_create: returning obj=0x239d8, qid=0x80
[9.140254]     status = 0
[9.140349] DONE
[9.140433] Sending response...
[9.140586] Retrieving command...
[9.142020] LAD_MESSAGEQ_ANNOUNCE: calling MessageQ_announce(0x1f798, 0x239d8)...
[9.142217] MessageQ_announce: announcing 0x239d8
[9.142381] NameServer_add: Entered key: 'dspsystem', data: 0x80
[9.142515]     status = 0
[9.142614] DONE
[9.142699] Sending response...
[9.142850] Retrieving command...
/*
 *  ======== rsc_table_omapl138.h ========
 *
 *  Include this table in each base image, which is read from remoteproc on
 *  host side.
 *
 */

#ifndef _RSC_TABLE_OMAPL138_H_
#define _RSC_TABLE_OMAPL138_H_

#include "rsc_types.h"

/* DSP Memory Map */
#define L3_CBA_RAM_BASE        (0x80000000)
#define IRAM_BASE              (0x11800000)
#define DSP_MEM_DATA           (0xc6100000)
#define STREAMING_DATA         (0xc7030000)

#define DSP_MEM_IPC_DATA       (0xc6800000)

#define DSP_MEM_IPC_VRING      (0xc6000000)
#define DSP_MEM_RPMSG_VRING0   (0xc6000000)
#define DSP_MEM_RPMSG_VRING1   (0xc6004000)
#define DSP_MEM_VRING_BUFS0    (0xc6040000)
#define DSP_MEM_VRING_BUFS1    (0xc6080000)

#define RPMSG_VRING_ADDR_ANY FW_RSC_ADDR_ANY

/* Sizes */
#define L3_CBA_RAM_SIZE        (0x20000)
#define IRAM_SIZE              (0x20000)
#define STREAMING_DATA_SIZE    (0x600000)
#define TRACEBUFSIZE           (0x20000)

#define DSP_MEM_DATA_SIZE      (SZ_1M * 15)
// #define DSP_MEM_IPC_VRING_SIZE (SZ_1M * 1)
// #define DSP_MEM_IPC_DATA_SIZE  (SZ_1M * 1)
#define DSP_MEM_IPC_VRING_SIZE (0x8000)
#define DSP_MEM_IPC_DATA_SIZE  (0x8000)

/*
 * The following values need to match Linux side device tree reserved
 * memory region start address for specific processor core.
 * The addresses are used to create mmu entry for IPC vrings and buffers
 */
#if defined (VAYU_DSP_1)
#define PHYS_MEM_IPC_VRING      0x99000000
#elif defined (VAYU_DSP_2)
#define PHYS_MEM_IPC_VRING      0x9F000000
#endif

/*
 * sizes of the virtqueues (expressed in number of buffers supported,
 * and must be power of 2)
 */
#define RPMSG_VQ0_SIZE          256
#define RPMSG_VQ1_SIZE          256

/* flip up bits whose indices represent features we support */
#define RPMSG_DSP_FEATURES      1

/* Amount of rsc table entries */
#define NUM_RSC_ENTRIES 7

struct my_resource_table {
    struct resource_table base;

    UInt32 offset[NUM_RSC_ENTRIES];

    /* rpmsg vdev entry */
    struct fw_rsc_vdev rpmsg_vdev;
    struct fw_rsc_vdev_vring rpmsg_vring0;
    struct fw_rsc_vdev_vring rpmsg_vring1;

    /* ipcdata carveout entry */
    struct fw_rsc_carveout ipcdata_cout;

    /* data carveout entry */
    struct fw_rsc_carveout data_cout;

    /* iram carveout entry */
    struct fw_rsc_carveout iram_cout;

    /* shared mem carveout entry */
    struct fw_rsc_carveout sm;

    /* streaming data carveout entry */
    struct fw_rsc_carveout streaming_data_cout;

    /* trace entry */
    struct fw_rsc_trace trace;

    /* devmem entry */
    // struct fw_rsc_devmem devmem0;
};

/* Add trace buffer information to the resource table */
extern char * xdc_runtime_SysMin_Module_State_0_outbuf__A;
#define TRACEBUFADDR (UInt32)&xdc_runtime_SysMin_Module_State_0_outbuf__A

#pragma DATA_SECTION(ti_ipc_remoteproc_ResourceTable, ".resource_table")
#pragma DATA_ALIGN(ti_ipc_remoteproc_ResourceTable, 4096)

struct my_resource_table ti_ipc_remoteproc_ResourceTable = {
    1, /* we're the first version that implements this */
    NUM_RSC_ENTRIES, /* number of entries in the table */
    0, 0, /* reserved, must be zero */

    /* offsets to entries */
    {
        offsetof(struct my_resource_table, rpmsg_vdev),
        offsetof(struct my_resource_table, ipcdata_cout),
        offsetof(struct my_resource_table, data_cout),
        offsetof(struct my_resource_table, iram_cout),
        offsetof(struct my_resource_table, streaming_data_cout),
        offsetof(struct my_resource_table, sm),
        offsetof(struct my_resource_table, trace),
        // offsetof(struct my_resource_table, devmem0),
    },

    /* rpmsg vdev entry */
    {
        TYPE_VDEV, VIRTIO_ID_RPMSG, 0,
        RPMSG_DSP_FEATURES, 0, 0, 0, 2, { 0, 0 },
        /* no config data */
    },
    /* the two vrings */
    { DSP_MEM_RPMSG_VRING0, 4096, RPMSG_VQ0_SIZE, 1, 0 },
    { DSP_MEM_RPMSG_VRING1, 4096, RPMSG_VQ1_SIZE, 2, 0 },

    {
        TYPE_CARVEOUT,
        DSP_MEM_IPC_DATA, 0,
        DSP_MEM_IPC_DATA_SIZE, 0, 0, "DSP_MEM_IPC_DATA",
    },

    {
        TYPE_CARVEOUT,
        DSP_MEM_DATA, DSP_MEM_DATA,
        DSP_MEM_DATA_SIZE, 0, 0, "DSP_MEM_DATA",
    },

    {
        TYPE_CARVEOUT,
        IRAM_BASE, IRAM_BASE,
        IRAM_SIZE, 0, 0, "IRAM",
    },

    {
        TYPE_CARVEOUT,
        L3_CBA_RAM_BASE, L3_CBA_RAM_BASE,
        L3_CBA_RAM_SIZE, 0, 0, "SHARED_MEM",
    },

    {
        TYPE_CARVEOUT,
        STREAMING_DATA, STREAMING_DATA,
        STREAMING_DATA_SIZE, 0, 0, "STREAMING_DATA",
    },

    {
        TYPE_TRACE,
        TRACEBUFADDR,
        TRACEBUFSIZE, 0, "trace:dsp",
    },

    // {
    //     TYPE_DEVMEM,
    //     DSP_MEM_IPC_VRING, DSP_MEM_IPC_VRING,
    //     DSP_MEM_IPC_VRING_SIZE, 0, 0, "DSP_MEM_IPC_VRING",
    // },
};

#endif /* _RSC_TABLE_OMAPL138_H_ */
8510.dsp.cfg

Tools:

  • SYS/BIOS 6_76_03_01
  • IPC 3_50_04_08
  • XDCTOOLS 3_55_02_22_core
  • Linux 4.19

Thank you & Regards,
Kim

  • Hello Kim,

    It might take a couple of days for us to get back to you on this thread. Please ping us if we have not replied by next week.

    Regards,

    Nick

  • Hi Nick

    Sounds great.
    I will also be out of office during next week.

    Regards,
    Kim

  • Hi Kim,

    Have you tried the built-in examples of the Processor-SDK? The page that you mentioned above has a link to a video about how to build and run the IPC examples: Building and Running Inter-Processor Communication (IPC) Examples on the AM572x GP EVM.

    I briefly looked at your dsp.cfg and it seems you were using Ipc.ProcSync_PAIR, instead of BIOS.addUserStartupFunction('&IpcMgr_ipcStartup') which is used by the IPC examples. Was there any particular reason why you did that?

    Thanks,

    Jianzhong

  • Hi Jianzhongxu,

    Thank you for getting back to me.

    Video:
    I noticed that the video does not mention the LAD daemon. Is the Daemon not required for the AM572x GP EVM?

    CFG script:
    Previously, I have tried without "Ipc.ProcSync_PAIR" and used BIOS.addUserStartupFunction('&IpcMgr_ipcStartup') instead.
    This merely results in the same error as seen in the log file for the LAD daemon, namely "NameServer_attach: connect failed: procId=1, errno=22 (Invalid argument)".

    Thanks & Regards,
    Kim

  • Hi Kim,

    The LAD daemon should run in background. Can you try the out-of-box IPC examples according to IPC Quick Start Guide? Please pay special attention to OMAP-L138 specific instruction:

    For OMAP-L138 platform, Modify the symblic link in /lib/firmware of the default image names to the build binary
    
    DSP image files: rproc-dsp-fw
    

    Regards,

    Jianzhong

  • Hi Jianzhongxu,

    Running ex02_messageq example

    I have tried out the “ex02_messageq” IPC example. I get the following output from the example:

    The output looks ok, but the “trace0” file under “debug/remoteproc/remoteproc0/trace0” is empty.

    Daemon & Symbolic link name
    I am running the LAD Daemon in the background and “Before” I start the DSP application with remoteproc and the ARM/Linux application.

    I am using “rproc-dsp-fw” as the name of the symbolic link under “lib/firmware”.

    My procedure
    I load the following kernel modules in this order:

    $ modprobe remoteproc

    $ modprobe da8xx_remoteproc

    $ modprobe virtio_rpmsg_bus

    $ modprobe rpmsg_proto

    I am starting the LAD Daemon in the following way:

    $ usr/bin/lad_omapl138 -l /app/log.txt

    I am starting the DSP application with remoteproc in the following way:

    $ cd /lib/firmware

    $ ln -sf server_dsp.xe674 rproc-dsp-fw

    $ echo start > /sys/class/remoteproc/remoteproc0/state

    I am starting the Linux application in the following way:

    $ cd /app

    $ ./app_host HOST

    Output from log.txt file

    After all of the steps above, the log for the LAD Daemon still contains the error:

    NameServer_attach: connect failed: procId=1, errno=22 (Invalid argument)

    Thanks and regards,

    Kim

  • Hi Kim,

    Glad that the IPC example works well for you. In your other experiment, were you following the "IPC Install Guide Linux" document in <ipc_installation_root>/docs folder? Do you need to manually start LAD Daemon which I think is started when the board boots?

    I tried to start the LAD Daemon as you did but got error message below:

    root@omapl138-lcdk:~# /usr/bin/lad_omapl138 -l log.txt
    Multiple instances of LAD are not supported!
    

    What's the difference between the IPC example and your own application?

    Thanks and regards,

    Jianzhong

  • Hi Jianzhongxu,

    Yes, I followed the "IPC Install Guide Linux" guide.

    That is strange. I always start the LAD daemon manually.
    When I build the IPC library the LAD daemon is generated. I transferred it to the OMAPL138 with scp to /usr/bin.

    I get the same error if I try to run the LAD daemon and it is already running.
    Is your LAD daemon starting during boot?

    If you boot the board, the following cmd should indicate if the LAD is started during boot:
    $ ps aux|grep LAD

    Regards,
    Kim

  • Hi Jianzhongxu,

    DSP traces:
    I am still doing some testing with the "ex02_messageq" ipc example. 
    I managed to get the printf statements for the DSP to also work now.
    My trace0 file says:

    I guess the output looks ok.
    I also noticed that the Socket connect failed error in the LAD log is no longer present...

    MessageQ:
    I have a MessageQ related question.

    In my own application I just create a MessageQ queue on the ARM side with MessageQ_create().
    I call it "HOST:dspsystem".


    On the DSP side I wish to simply open this queue with MessageQ_open() like the following:


    Doing this, the DSP never breaks out of the loop.


    Any ideas, why this is happening?
    Should I create a new thread based on this question?

    /* root of the configuration object model */
    var Program = xdc.useModule('xdc.cfg.Program');
    
    //var Reset 	 					           = xdc.useModule('xdc.runtime.Reset');
    //var Startup 					           = xdc.useModule('xdc.runtime.Startup');
    var BIOS 	 					             = xdc.useModule('ti.sysbios.BIOS');
    var Main 	 					             = xdc.useModule('xdc.runtime.Main');
    var Defaults 					           = xdc.useModule('xdc.runtime.Defaults');
    var System 	 					           = xdc.useModule('xdc.runtime.System');
    var Mailbox                      = xdc.useModule('ti.sysbios.knl.Mailbox');
    var HeapBuf                      = xdc.useModule('ti.sysbios.heaps.HeapBuf');
    var Timestamp                    = xdc.useModule('xdc.runtime.Timestamp');
    var Hwi 	 					             = xdc.useModule('ti.sysbios.hal.Hwi');
    var ti_sysbios_family_c64p_Hwi   = xdc.useModule('ti.sysbios.family.c64p.Hwi');
    var Cache 						           = xdc.useModule('ti.sysbios.hal.Cache');
    var ti_sysbios_family_c64p_Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');
    
    var Memory 	 					           = xdc.useModule('xdc.runtime.Memory');
    var HeapMem                      = xdc.useModule('ti.sysbios.heaps.HeapMem');
    
    /* Uncomment to debug before main() */
    //Reset.fxns[Reset.fxns.length++] 			        = '&myReset';
    //Startup.firstFxns[Startup.firstFxns.length++] = '&myFirst';
    //Startup.lastFxns[Startup.lastFxns.length++]   = '&myLast';
    
    /* application uses the following modules and packages */
    xdc.useModule('xdc.runtime.Assert');
    xdc.useModule('xdc.runtime.Diags');
    xdc.useModule('xdc.runtime.Error');
    xdc.useModule('xdc.runtime.Log');
    xdc.useModule('xdc.runtime.Registry');
    
    xdc.useModule('ti.sysbios.knl.Semaphore');
    xdc.useModule('ti.sysbios.knl.Task');
    
    /*
     *  ======== IPC Configuration ========
     */
    //var Ipc = xdc.useModule('ti.ipc.Ipc');
    //Ipc.ProcSync_ALL;
    
    xdc.useModule('ti.ipc.ipcmgr.IpcMgr');
    
    /* describe the processors in the system */
    var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
    MultiProc.setConfig("DSP", ["HOST", "DSP"]);
    
    var BIOS      = xdc.useModule('ti.sysbios.BIOS');
    BIOS.addUserStartupFunction('&IpcMgr_ipcStartup');
    
    /*
     *  ======== SYS/BIOS Configuration ========
     */
    if (Program.build.profile == "debug") {
        BIOS.libType = BIOS.LibType_Debug;
    } else {
        BIOS.libType = BIOS.LibType_Custom;
    }
    
    /* System stack size (used by ISRs and Swis) */
    Program.sectMap[".stack"] = new Program.SectionSpec();
    Program.sectMap[".stack"].loadSegment = "IRAM";
    Program.stack = 0x2000;
    Program.heap  = 32768;
    
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    Task.common$.namedInstance = true;
    
    /* default memory heap */
    var Memory = xdc.useModule('xdc.runtime.Memory');
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var heapMemParams = new HeapMem.Params();
    heapMemParams.size = 0x10000;
    Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
    
    /* IRAM Heap Configuration */
    var iramHeapParams  	     = new HeapMem.Params;
    iramHeapParams.size 	     = 0x00005000;
    iramHeapParams.sectionName = "IRAM_HEAP";
    Program.global.iramHeap	   = HeapMem.create(iramHeapParams);
    
    /* DDR Heap Configuration */
    var ddrHeapParams  	   		 = new HeapMem.Params;
    ddrHeapParams.size 	   		 = 0x005000;
    ddrHeapParams.sectionName  = "DDR_HEAP";
    Program.global.ddrHeap     = HeapMem.create(ddrHeapParams);
    
    /* STREAMING Heap Configuration */
    var streamingDataHeapParams         = new HeapMem.Params;
    streamingDataHeapParams.size 	      = 0x005000;
    streamingDataHeapParams.sectionName = "STREAMING_DATA_HEAP";
    Program.global.streamingDataHeap	  = HeapMem.create(streamingDataHeapParams);
    
    Program.sectMap["DDR_HEAP"]  			                 = new Program.SectionSpec();
    Program.sectMap["IRAM_HEAP"] 			                 = new Program.SectionSpec();
    Program.sectMap["STREAMING_DATA_HEAP"]             = new Program.SectionSpec();
    Program.sectMap["DDR_HEAP"].loadSegment            = "DDR";
    Program.sectMap["IRAM_HEAP"].loadSegment           = "IRAM";
    Program.sectMap["STREAMING_DATA_HEAP"].loadSegment = "STREAMING_DATA";
    
    
    /*
     *  ======== MessageQ Configuration ========
     */
    /* create a heap for MessageQ messages */
    var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
    var params = new HeapBuf.Params;
    params.align = 8;
    params.blockSize = 512;
    params.numBlocks = 256;
    var msgHeap = HeapBuf.create(params);
    
    var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
    MessageQ.registerHeapMeta(msgHeap, 0);
    
    /* Setup MessageQ transport */
    var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
    MessageQ.SetupTransportProxy = VirtioSetup;
    
    /* Setup NameServer remote proxy */
    var NameServer = xdc.useModule("ti.sdo.utils.NameServer");
    var NsRemote = xdc.useModule("ti.ipc.namesrv.NameServerRemoteRpmsg");
    NameServer.SetupProxy = NsRemote;
    
    /* Enable Memory Translation module that operates on the BIOS Resource Table */
    var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
    Resource.loadSegment = "DDR";
    Resource.customTable = true;
    
    /*  Use SysMin because trace buffer address is required for Linux/QNX
     *  trace debug driver, plus provides better performance.
     */
    var System = xdc.useModule('xdc.runtime.System');
    var SysMin = xdc.useModule('ti.trace.SysMin');
    
    System.SupportProxy = SysMin;
    SysMin.bufSize  = 0x8000;
    
    Program.sectMap[".tracebuf"] = "DDR";
    Program.sectMap[".errorbuf"] = "DDR";
    
    var Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');
    
    /* Set 0xc0000000 -> 0xc3ffffff to be non-cached VirtQueue based IPC
     * Set 0xc4000000 -> 0xc4ffffff to be cached. Not currently not used
     */
    Cache.MAR192_223 = 0x00000010;
    
    /*  Configure the SYS/BIOS clock to use the lower half of Timer 1 */
    var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    Timer.timerSettings[1].master = true;
    Timer.defaultHalf = Timer.Half_LOWER;
    Clock.timerId = 1;
    
    /*
     *  ======== Instrumentation Configuration ========
     */
     /* system logger */
    var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
    var LoggerSysParams = new LoggerSys.Params();
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    Defaults.common$.logger = LoggerSys.create(LoggerSysParams);
    
    /* enable runtime Diags_setMask() for non-XDC spec'd modules */
    var Diags = xdc.useModule('xdc.runtime.Diags');
    Diags.setMaskEnabled = true;
    
    /* override diags mask for selected modules */
    xdc.useModule('xdc.runtime.Main');
    Diags.setMaskMeta("xdc.runtime.Main",
        Diags.ENTRY | Diags.EXIT | Diags.INFO, Diags.RUNTIME_ON);
    
    var Registry = xdc.useModule('xdc.runtime.Registry');
    Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
    Registry.common$.diags_EXIT  = Diags.RUNTIME_OFF;
    Registry.common$.diags_INFO  = Diags.RUNTIME_OFF;
    Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
    Registry.common$.diags_LIFECYCLE = Diags.RUNTIME_OFF;
    Registry.common$.diags_STATUS = Diags.RUNTIME_OFF;
    
    var Main = xdc.useModule('xdc.runtime.Main');
    Main.common$.diags_ASSERT = Diags.ALWAYS_ON;
    Main.common$.diags_INTERNAL = Diags.ALWAYS_ON;

    Thanks & Regards,
    Kim

  • Hi Kim,

    I think it's a good idea to start a new thread about the MessageQ related question. For LAD daemon question, the answer is that it starts running in the background during kernel bootup, as mentioned in this training: Introduction to Inter-Processor Communication (IPC) for KeyStone and SitaraTm Devices .

    Also according to IPC Quick Start Guide, there is no need to manually start LAD daemon to run the out-of-box IPC examples.

    Thanks,

    Jianzhong