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.

heapBufMP_open failed HELP!!

HI,

I'm adding messageq in my original project to make it run on multicores.

But I find that my .text is too large to fit into L2SRAM, and if it loaded on DDR,then every core shared a same copy of .out and cores will corrupt when running together.

So I copied my original project and add messageq on two projects which will generate two .out to load on core0 and core1.

I added ipc_start on both projects and heapBufMP_create on core0's project and heapBufMP_open on core1's project.  The creation is succeed but open keeps returning HeapBufMP_E_NOTFOUND. I put the open in a bios task, but why it can't get the handle of heap created by core0 on another project.1  what's wrong?

Then I created a single common.c on core0's project and add  a common.c on core1's project which links to core0's common.c . Now open works fine. I only put the heap create and open and messageq create and open in common.c. I want to get and put in other source files in both projects.Like below:

common.c

{

     if(core0) heapBufMP_create();

     else heapBufMP_open();

             .........

      messageq_create();

      messageq_open();

      if(core0)    master();

       else    slave();

}

master() defines in core0's project performs put and slave() defines in core1's project performs get.But both project can't compile right. I declared master and slave as externs but I got error says undefined master or slave.

2. Is it ok to do like above ,I mean share a common.c and perform get and put on other source files.

I'm really really in a hurry , PLEASE HELP!

thank you .

      

  • 6678  ccs5.3

    messageQ demo runs normally . I change the nameList to ["core0",“core1”] to run on two cores.

    Now I create two projects test0 and test1 which have the same .c and .cfg as the demo.

    I load test0 and test1 on core0 and core1, both cores run well.

    but if I comment out MessageQ_registerHeap , MessageQ_create  , MessageQ_open  ,alloc, put and get. Only leaves HeapBufMP_create in test0 and HeapBufMP_open in test1.

    Then core0 can HeapBufMP_create normally , but core1 get stucked

    what's the matter?

    I read the ipc usr guide but it does not give any hint, any other doc with more detail  of how to use messageq that I can refer to ?

    Thanks.

  • Hi,

    See the sections "MessageQ Allocation and Heaps" and "MessageQ Allocation Without a Heap" in the wiki link,
    http://processors.wiki.ti.com/index.php/IPC_Users_Guide/MessageQ_Module

    The test code available to initializes a HeapBufMP_Params structure and sets fields in it.
    It then creates and registers an instance of the HeapBufMP module.
    http://processors.wiki.ti.com/index.php/IPC_Users_Guide/HeapMP_Modules
    http://processors.wiki.ti.com/index.php/IPC_Users_Guide/Optimizing_IPC_Applications

  • Hi,

    I believe that, you got the detailed info from mentioned wiki pages in my previous post. Do you need further follow-up? If not, please help to close this thread.