Hi,
I am just begining to study the multicore dsp.And i got a problem when i run a program about the ListMP module in my 6472EVM .I attached the main code in the following:
Void tsk0_func(UArg arg0, UArg arg1)
{
Rec rec1;
gateHandle = GateMP_getDefaultRemote();
ListMP_Params_init(&listParams);
listParams.gate = gateHandle;
listParams.name = "myListMP";
listParams.regionId = 0;
listHandle = ListMP_create(&listParams);
System_printf("ListMP_create sucess\n");
rec1.data = MultiProc_self();
ListMP_putTail(listHandle,&rec1.elem);
System_exit(0);
}
Void tsk1_func(UArg arg0, UArg arg1)
{
int buf[5];
elem = NULL;
while(ListMP_open("myListMP",&listHandle)<0){
System_printf("ListMP_open failed\n");
}
System_printf("ListMP_open sucess\n");
if(MultiProc_self() != 5){
buf[MultiProc_self()] = MultiProc_self();
ListMP_putTail(listHandle,(ListMP_Elem *) &(buf[MultiProc_self()]));
}else{
while((elem = ListMP_next(listHandle,(ListMP_Elem *)elem))!= NULL){
System_printf("ListMP_Elem:%d",elem->data);
}
}
}
main()
{
Ipc_start();
/* Create a unique 'master' Task if on proc 0 */
if (MultiProc_self() == 0) {
Task_create(tsk0_func, NULL, NULL);
}
else {
Task_create(tsk1_func, NULL, NULL);
}
BIOS_start();
return (0);
}
the code about SharedRegion in the *.cfg file
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM,
len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
name: "SL2_RAM",
createHeap: true,
});
when i download the program to the 6 cores and start running,I got the problem:
ti.sdo.ipc.SharedRegion: line 327: assertion failure: A_idTooLarge: id cannot be larger than numEntries
xdc.runtime.Error.raise: terminating execution
Could anyone give me some solutions? Thank you.
I use the CCS Version: 4.2.0.10012 and ipc_1_21_02_23. The program is running in the TMS320C6472EVM.
Regards
Jianlei