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.

MessageQ and Notify are used at the same time

Other Parts Discussed in Thread: SYSBIOS

MessageQ and Notify are used at the same time

I want to use MessageQ and Notify in the same project. First, I just added "var MessageQ = xdc.useModule('ti.sdo.ipc.MessageQ'); var HeapBufMP   = xdc.useModule'ti.sdo.ipc.heaps.HeapBufMP')" to nofity_single.cfg and didn't edit the notify_single.c. But when  the program run in six cores, IPC is not syncing without any console. Who can tell me how to add the MessageQ to the notify project and let them works at the same project? Should I comment the sentence "var Notify  = xdc.useModule('ti.sdo.ipc.Notify');" when I use the MessageQ code?  Can Notify and MessageQ be used in a project? Notify_single.cfg is as follws.

var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2",
                           "CORE3", "CORE4", "CORE5"]);

var System   = xdc.useModule('xdc.runtime.System');
var SysStd   = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;

/* Modules explicitly used in the application */
var MessageQ    = xdc.useModule('ti.sdo.ipc.MessageQ');
var HeapBufMP   = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
var Notify      = xdc.useModule('ti.sdo.ipc.Notify');
var Ipc         = xdc.useModule('ti.sdo.ipc.Ipc');
var BIOS        = xdc.useModule('ti.sysbios.BIOS');
var Task        = xdc.useModule('ti.sysbios.knl.Task');
var Memory      = xdc.useModule('xdc.runtime.Memory');
Memory.defaultHeapSize = 0x40000;
Program.heap = 0x40000;

Program.sectMap["emacComm"] = "DDR2";
Program.sectMap[".text"]  = "DDR2";
Program.sectMap[".far"]  = "DDR2";

/* Synchronize all processors (this will be done in Ipc_start) */
Ipc.procSync = Ipc.ProcSync_ALL;

/* Shared Memory base address and length */
var SHAREDMEM           = 0x200000;
var SHAREDMEMSIZE       = 0xA0000;

var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
    { base: SHAREDMEM,
      len:  SHAREDMEMSIZE,
      ownerProcId: 0,
      isValid: true,
      name: "SL2_RAM",
    });

var Global       = xdc.useModule('ti.ndk.config.Global');
Global.enableCodeGeneration = false;

/* Create a semaphore with count 0 */
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
Program.global.semHandle = Semaphore.create(0);

var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
Program.global.sem = Semaphore.create(0);
var instSemaphore0Params0 = new Semaphore.Params();
instSemaphore0Params0.instance.name = "sem";
Program.global.sem = Semaphore.create(0, instSemaphore0Params0);

Platform:EVM 6472
XDCtools version: 3.20.04.68
IPC: 1.21.02.23
BIOS: 6.30.03.46
XDAIS: 6.25.01.08

 

 

  • Hi Mary,

    It is perfectly acceptable to use MessageQ + Notify in the same application.  In fact, MessageQ on C6472 internally uses Notify to interrupt the remote core when a message is put an a remote queue. 

    Mary Green said:
    But when  the program run in six cores, IPC is not syncing without any console.

    What do you mean by "without any console"? Do you never return from Ipc_start?  What do you see the cores doing when you halt the cores?

    Regards,

    Shreyas

  • Hi Shreyas,

         Thanks for your explanation.  Before I added MessageQ to notify_single.c, the program can run and print sentenses to the console window. But after MessageQ was added, the console window print nothing.  "without any console " means print nothing to the console window.

        

  • If you simply remove the line:

    var MessageQ    = xdc.useModule('ti.sdo.ipc.MessageQ');

    does your application work again?  Have you modified the .c file for the example or did you simply add MessageQ to the .cfg file?  Could you attach your CCS project if your problem continues to persist?

    Regards,

    Shreyas

  • Hi, Shreyas

             When I just remove the line

                      var MessageQ    = xdc.useModule('ti.sdo.ipc.MessageQ');

        my application doesn't work again.But when I remove the two lines

           var MessageQ    = xdc.useModule('ti.sdo.ipc.MessageQ');
           var HeapBufMP   = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');

        the application works. I just added the MessageQ(the two lines as mentioned above) to the .cfg file and added nothing to notify_single.c file of Notify example of EVM6472.  What is the meaning of "Could you attach your CCS project". I rebuilt the project when I modified it each time.          

  • By 'attach your CCS project' I was referring to zipping up your CCS project into a single file and attach it to the forum.  Could you please give this a try?  Alternatively, you could simply attach your .c & .cfg files to the forum as well.

    Thanks,

    Shreyas