Hello,
Can you please help me with these errors?
[C674X_0] ti.sdo.ipc.SharedRegion: line 302: assertion failure: A_regionInvalid: Region is invalid
ti.sysbios.gates.GateMutex: line 114: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details.
[C674X_0] xdc.runtime.Error.raise: terminating execution
I have a test application 6646.myMsqQ.zip that is quite close to the syslink messageQ example. I tried commenting out as much as possible to find the error. As soon as I don't comment out the following code (on ARM side), I get the assertion on the DSP:
It's an almost 1:1 copy from the messageQ example:
/* Create Heap and register it with MessageQ */
if (status >= 0) {
HeapMemMP_Params_init (&heapMemParams);
heapMemParams.sharedAddr = NULL;
gbl_com_handles.heapSize = ( HeapMemMP_sharedMemReq (&heapMemParams)
+ (gbl_app_info.heapNumMsg * gbl_app_info.heapMsgSize));
gbl_com_handles.srHeap = SharedRegion_getHeap (0);
if (gbl_com_handles.srHeap == NULL) {
status = MessageQ_E_FAIL;
Osal_printf ("SharedRegion_getHeap failed for %d processor."
" srHeap: [0x%x]\n",
DSP_PROC_ID,
gbl_com_handles.srHeap);
}
else {
gbl_com_handles.pSharedMem = Memory_alloc (gbl_com_handles.srHeap,
gbl_com_handles.heapSize,
gbl_app_info.heapAlign,
NULL);
if (gbl_com_handles.pSharedMem == NULL) {
status = MessageQ_E_FAIL;
Osal_printf ("Memory_alloc failed for %d processor."
" pSharedMem: [0x%x]\n",
DSP_PROC_ID,
gbl_com_handles.pSharedMem);
}
else {
gbl_com_handles.cleanupCode = 1;
heapMemParams.name = gbl_app_info.heapName;
heapMemParams.sharedAddr = gbl_com_handles.pSharedMem;
heapMemParams.sharedBufSize = ( gbl_app_info.heapNumMsg
* gbl_app_info.heapMsgSize);
gbl_com_handles.heapHandle = HeapMemMP_create (&heapMemParams);
if (gbl_com_handles.heapHandle == NULL) {
status = MessageQ_E_FAIL;
Osal_printf ("HeapMemMP_create failed for %d processor."
" Handle: [0x%x]\n",
DSP_PROC_ID,
gbl_com_handles.heapHandle);
}
else {
gbl_com_handles.cleanupCode = 2;
}
}
}
}
Many thanks for your help,
Markus