Hi,
I am trying to add IPC messageQ capabilities to helloworld
evmc6678l NDK example and I am experimenting troubles in get this implementation.
I have added the follow header files in hellowrold.c file:
/* ----------------------------------- IPC module Headers */
#include <ti/ipc/Ipc.h>
#include <ti/ipc/MessageQ.h>
#include <ti/ipc/HeapBufMP.h>
#include <ti/ipc/MultiProc.h>
I just trying to define two new functions, one
for master and one for slaves and that execute TaskTest just in core0.
In main function I added
int status;
Task_Params params;
Task_Params_init(¶ms);
params.stackSize = 0x6000;
if (MultiProc_self() == 0) {
Task_create(StackTest, ¶ms, NULL);
Task_create(core0_master, ¶ms,NULL);
}
else{
Task_create(cores_slave, ¶ms,NULL);
}
System_printf(core1QueueName,"%s", MultiProc_getName(1));
System_printf(core2QueueName,"%s", MultiProc_getName(2));
System_printf(core3QueueName,"%s", MultiProc_getName(3));
System_printf(core4QueueName,"%s", MultiProc_getName(4));
System_printf(core5QueueName,"%s", MultiProc_getName(5));
System_printf(core6QueueName,"%s", MultiProc_getName(6));
System_printf(core7QueueName,"%s", MultiProc_getName(7));
Ipc_start();
if (status < 0) {
System_abort("Ipc_start failed\n");
}
This is the code of two function added:
void core0_master() {
System_printf("En master core\n");
}
void cores_slave() {
System_printf("En Slave core\n");
}
When I run 8 cores I get next result in console window:
[C66xx_0] A0=0x1 A1=0x80fd8c20
A2=0x0 A3=0x0
A4=0x0 A5=0x80fd8548
A6=0xe9 A7=0x0
A8=0x0 A9=0x2
A10=0x0 A11=0x1
A12=0x81443b04 A13=0x7fb8fbcf
A14=0xec01001c A15=0x5f3bc93c
A16=0x814ac56c A17=0x0
A18=0x814ac53c A19=0x20
A20=0x6c A21=0x4c
A22=0xcfff9b5d A23=0xbef9b9fd
A24=0xcfbef57f A25=0x1502650d
A26=0x8f386391 A27=0xffbff67b
A28=0xdfefdfdd A29=0x0
A30=0x80fd7e78 A31=0x0
B0=0x0 B1=0x0
B2=0x1 B3=0x4000
B4=0x2 B5=0x0
B6=0x0 B7=0x8144dc80
B8=0x80fd638c B9=0x0
B10=0x8 B11=0x0
B12=0xbff1e7a6 B13=0xbefffee5
B14=0x814ace00 B15=0x814ac5e0
B16=0xfa00000 B17=0x0
B18=0xeffffeef B19=0xefdd57f7
B20=0x69 B21=0xfef1ffd7
B22=0xa76bde51 B23=0xedaf546f
B24=0x7052e649 B25=0xfae39fb7
B26=0x75d9a74f B27=0x7ba65f9f
B28=0xff02fbff B29=0x7f7f8f7f
B30=0xffffffff B31=0x0
NTSR=0x1000c
ITSR=0x0
IRP=0x0
SSR=0x0
AMR=0x0
RILC=0x0
ILC=0x0
Exception at 0x4000
EFR=0x2 NRP=0x4000
Internal exception: IERR=0x1
Instruction fetch exception
ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x00004000, sp = 0x814ac5e0.
To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
xdc.runtime.Error.raise: terminating execution
If I try to execute just core 0 nothing appears in console.
What is missing to do this example to work with 7 cores as slaves?
Julian