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

I meet a problem when run the messageQ module.I use the  MessageQ example in the IPC module as a reference.The difference is that I create two projects,that is  different exectuable (*.out)  files run on different cores.

in my project, core0 send message Q to core1.Some code is below:

the SharedRegion has been modified in the .cfg file.

core0 task:

{

·······························

HeapBufMP_Params_init(&heapBufParams);
heapBufParams.regionId = 0;
heapBufParams.name = HEAP_NAME;
heapBufParams.numBlocks = 1;
heapBufParams.blockSize = sizeof(MessageQ_MsgHeader);
heapHandle = HeapBufMP_create(&heapBufParams);


/* Register this heap with MessageQ */
MessageQ_registerHeap((IHeap_Handle)heapHandle, HEAPID);

·····················

}

core1 task:

{

··············

do
{
status = HeapBufMP_open(HEAP_NAME, &heapHandle);
} while (status < 0);

``````````````````

}

the problem is that core1 can't open the heap, I want to ask what should I notice before I call the HeapBufMP_open()?

Is there anything I should do to make sure the function runs properly?

Thank you very much!