Development environment: CCS 5.4 with SC-MCSDK 2_01_00_01
Target: TCI6614
There are some msgCom unit test projects created in SYSLIB folder.
I tried to run the msgCom unit test for DSP Core to DSP Core.
The following two project are loaded into Core0 and Core1.
1.Core0_msgCom_tmdxevm6614lxe_UnittestProject_little
2.Core1_msgCom_tmdxevm6614lxe_UnittestProject_little
While the Core0 is started after Core1 is started, the output message from the console is as below:
--
[C66xx_0] ***********************************
**** Message Communicator Test ****
***********************************
Debug: RM Initialization was successful
Debug: Inserting MSMC Memory Region (Core0-MSMC) @ Index 0 Start Index 0
Debug: Inserting LOCAL Memory Region (Core0-Local) @ Index 1 Start Index 128
Debug: Inserting LOCAL Memory Region (Core1-Local) @ Index 2 Start Index 256
Debug: Inserting DDR3 Memory Region (Core1-DDR3) @ Index 3 Start Index 384
Debug: RM LLD Revision: 01.00.00.15:Mar 26 2013:17:03:10
Debug: QMSS LLD Revision: 01.00.03.20:Mar 26 2013:17:02:56
Debug: CPPI LLD Revision: 01.00.02.04:Mar 26 2013:17:02:34
Error: Unable to create shared heap error code -3
[C66xx_1] Debug: RM Startup was successful
--
The error is caused by Pktlib_createHeap() function and the error code -3 means there was a resource error.
Would anyone know what the problem is, thanks in advance!
--
/* A part of main_core0.c */
/* Initialize the Shared Heaps. */
result = Pktlib_sharedHeapInit();
if(result < 0)
{
System_printf ("Error: Pktlib_sharedHeapInit %d\n", result);
return -1;
}
/* Initialize the heap configuration. */
memset ((void *)&heapCfg, 0, sizeof(Pktlib_HeapCfg));
/* Populate the heap configuration */
heapCfg.name = "MySharedHeap";
heapCfg.memRegion = ptrCfg->memRegionResponse[0].memRegionHandle;
heapCfg.sharedHeap = 1;
heapCfg.useStarvationQueue = 0;
heapCfg.dataBufferSize = TEST_MAX_DATA_SIZE;
heapCfg.numPkts = 64;
heapCfg.numZeroBufferPackets= 0;
heapCfg.dataBufferPktThreshold = 0;
heapCfg.zeroBufferPktThreshold = 0;
heapCfg.heapInterfaceTable.data_malloc = mySharedMemoryMalloc;
heapCfg.heapInterfaceTable.data_free = mySharedMemoryFree;
/* Create the Heap. */
mySharedHeapHandle = Pktlib_createHeap(&heapCfg, &errCode);
if (mySharedHeapHandle == NULL)
{
System_printf ("Error: Unable to create shared heap error code %d\n", errCode);
return -1;
}
--
Kenny