Hi,
I am using IPC in a sample project for EVMK2H. But I am experiencing strange behavior of Multiproc_self() function. it always returns 0. My code is as:
/*
* ======== taskFxn ========
*/
Void taskFxn(UArg a0, UArg a1)
{
UInt16 coreID = MultiProc_self();
System_printf("enter taskFxn() by Core %d\n", coreID);
System_printf("exit taskFxn()\n");
System_flush(); /* force SysMin output to console */
}
/*
* ======== main ========
*/
Int main()
{
Task_Handle task;
Error_Block eb;
Int status;
System_printf("enter main()\n");
Error_init(&eb);
status = Ipc_start();
if (status < 0)
{
System_abort("Ipc_start failed\n");
}
task = Task_create(taskFxn, NULL, &eb);
if (task == NULL)
{
System_printf("Task_create() failed!\n");
BIOS_exit(0);
}
BIOS_start(); /* does not return */
return(0);
}
when I load .out using linux utility mpmcl on dsp0,dsp1,dsp2,dsp3. I always get coreID = 0
Regards