This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TMS320TCI6608: IPC debugging

Part Number: TMS320TCI6608

Tool/software: TI-RTOS

Dear Champs,

My customer wants to implement IPC using IPC framework, but it was not worked.

Is there 'DEBUG' option to print out debug information for IPC debugging?

Could you please let me know how customer can debug IPC efficiently?

In my customer case, even IPC_start() function was not worked. I think there should be an issue in their cfg file.

And could you please check their cfg file?

var Program = xdc.useModule('xdc.cfg.Program'); 

// Program.heap = 0x1000; 
Program.endian = "big"; 
var BIOS = xdc.useModule('ti.sysbios.BIOS'); 
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem'); 
var ti_sysbios_knl_Clock = xdc.useModule('ti.sysbios.knl.Clock'); 
var Memory = xdc.useModule('xdc.runtime.Memory'); 
var ti_sysbios_knl_Event = xdc.useModule('ti.sysbios.knl.Event'); 
var ti_sysbios_hal_Hwi = xdc.useModule('ti.sysbios.hal.Hwi'); 
var xdc_runtime_Timestamp = xdc.useModule('xdc.runtime.Timestamp'); 
var xdc_runtime_TimestampStd = xdc.useModule('xdc.runtime.TimestampStd'); 
var ti_sysbios_hal_Cache = xdc.useModule('ti.sysbios.hal.Cache'); 
//var Timer = xdc.useModule('ti.sysbios.hal.Timer'); 
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer'); 

Timer.timerSettings[8].ownerCoreId = 0; 
Timer.timerSettings[9].ownerCoreId = 1; 
Timer.timerSettings[10].ownerCoreId = 2; 
Timer.timerSettings[11].ownerCoreId = 3; 
Timer.timerSettings[12].ownerCoreId = 4; 
Timer.timerSettings[13].ownerCoreId = 5; 
Timer.timerSettings[14].ownerCoreId = 6; 
Timer.timerSettings[15].ownerCoreId = 7; 

var Reset=xdc.useModule('xdc.runtime.Reset'); 
Reset.fxns[Reset.fxns.length++]='&ResetFunc'; 

/* 
 * These modules are included to support functionalities as system_printf - Optionals Includes 
 */ 
//var System = xdc.useModule('xdc.runtime.System'); 
//var SysStd = xdc.useModule('xdc.runtime.SysStd'); 
//System.SupportProxy = SysStd; 


/* 
* Memory Sections defined for the system default heap and the shared heap(used by MCN) 
*/ 
Program.sectMap[".systemHeap"] = new Program.SectionSpec(); 
Program.sectMap[".systemHeap"].loadSegment = "L2SRAM"; 

/* Create a default system heap using ti.bios.HeapMem. */ 
var defaultHeapMemParams = new HeapMem.Params; 
defaultHeapMemParams.size = 2 * 1024; 
defaultHeapMemParams.sectionName = ".systemHeap"; 
Program.global.defaultHeap = HeapMem.create(defaultHeapMemParams); 
Memory.defaultHeapInstance = Program.global.defaultHeap;/* This is the default memory heap. */ 


/* Check !! */ 
Program.sectMap[".cppiSharedHeapMem"] = new Program.SectionSpec(); 
Program.sectMap[".cppiSharedHeapMem"].loadSegment = "MSMCSYSTEM"; 

var sharedHeapMemParamsC0 = new HeapMem.Params; 
sharedHeapMemParamsC0.size = 16 * 1024; 
sharedHeapMemParamsC0.align = 64; 
sharedHeapMemParamsC0.sectionName = ".cppiSharedHeapMem"; 
Program.global.cppiSharedHeapC0 = HeapMem.create(sharedHeapMemParamsC0); 

var sharedHeapMemParamsC1 = new HeapMem.Params; 
sharedHeapMemParamsC1.size = 16 * 1024; 
sharedHeapMemParamsC1.align = 64; 
sharedHeapMemParamsC1.sectionName = ".cppiSharedHeapMem"; 
Program.global.cppiSharedHeapC1 = HeapMem.create(sharedHeapMemParamsC1); 

var sharedHeapMemParamsC2 = new HeapMem.Params; 
sharedHeapMemParamsC2.size = 16 * 1024; 
sharedHeapMemParamsC2.align = 64; 
sharedHeapMemParamsC2.sectionName = ".cppiSharedHeapMem"; 
Program.global.cppiSharedHeapC2 = HeapMem.create(sharedHeapMemParamsC2); 

var sharedHeapMemParamsC3 = new HeapMem.Params; 
sharedHeapMemParamsC3.size = 1 * 1024; 
sharedHeapMemParamsC3.align = 64; 
sharedHeapMemParamsC3.sectionName = ".cppiSharedHeapMem"; 
Program.global.cppiSharedHeapC3 = HeapMem.create(sharedHeapMemParamsC3); 

var sharedHeapMemParamsC4 = new HeapMem.Params; 
sharedHeapMemParamsC4.size = 1 * 1024; 
sharedHeapMemParamsC4.align = 64; 
sharedHeapMemParamsC4.sectionName = ".cppiSharedHeapMem"; 
Program.global.cppiSharedHeapC4 = HeapMem.create(sharedHeapMemParamsC4); 

var sharedHeapMemParamsC5 = new HeapMem.Params; 
sharedHeapMemParamsC5.size = 1 * 1024; 
sharedHeapMemParamsC5.align = 64; 
sharedHeapMemParamsC5.sectionName = ".cppiSharedHeapMem"; 
Program.global.cppiSharedHeapC5 = HeapMem.create(sharedHeapMemParamsC5); 

var sharedHeapMemParamsC6 = new HeapMem.Params; 
sharedHeapMemParamsC6.size = 1 * 1024; 
sharedHeapMemParamsC6.align = 64; 
sharedHeapMemParamsC6.sectionName = ".cppiSharedHeapMem"; 
Program.global.cppiSharedHeapC6 = HeapMem.create(sharedHeapMemParamsC6); 

var sharedHeapMemParamsC7 = new HeapMem.Params; 
sharedHeapMemParamsC7.size = 1 * 1024; 
sharedHeapMemParamsC7.align = 64; 
sharedHeapMemParamsC7.sectionName = ".cppiSharedHeapMem"; 
Program.global.cppiSharedHeapC7 = HeapMem.create(sharedHeapMemParamsC7); 



Program.sectMap[".csl_vect"] = new Program.SectionSpec(); 
Program.sectMap[".csl_vect"].loadSegment = "L2SRAM"; 

Program.sectMap[".ethDrvData"] = new Program.SectionSpec(); 
Program.sectMap[".ethDrvData"].loadSegment = "L2SRAM"; 

Program.sectMap[".ethDrvSharedData"] = new Program.SectionSpec(); 
Program.sectMap[".ethDrvSharedData"].loadSegment = "MSMCSYSTEM"; 

Program.sectMap[".mcnDriverInternalMem"] = new Program.SectionSpec(); 
Program.sectMap[".mcnDriverInternalMem"].loadSegment = "L2SRAM"; 

Program.sectMap[".ipcDataMem"] = new Program.SectionSpec(); 
Program.sectMap[".ipcDataMem"].loadSegment = "L2SRAM"; 

Program.sectMap[".sharedDescMemory"] = new Program.SectionSpec(); 
Program.sectMap[".sharedDescMemory"].loadSegment = "MSMCSYSTEM"; 

Program.sectMap[".qmss"] = new Program.SectionSpec(); 
Program.sectMap[".qmss"].loadSegment = "MSMCSYSTEM"; 

Program.sectMap[".cppi"] = new Program.SectionSpec(); 
Program.sectMap[".cppi"].loadSegment = "MSMCSYSTEM"; 

Program.sectMap[".sharedMemory"] = new Program.SectionSpec(); 
Program.sectMap[".sharedMemory"].loadSegment = "MSMCSYSTEM"; 

var ti_sysbios_knl_Task = xdc.useModule('ti.sysbios.knl.Task'); 
ti_sysbios_knl_Task.enableIdleTask = true; 
ti_sysbios_knl_Task.idleTaskStackSize = 2048; 
ti_sysbios_knl_Task.allBlockedFunc = ti_sysbios_knl_Task.allBlockedFunction; 

var sysbios_knl_Task0Params0 = new ti_sysbios_knl_Task.Params(); 
sysbios_knl_Task0Params0.instance.name = "DownlinkSchedulingThread"; 
sysbios_knl_Task0Params0.priority = 12; 
sysbios_knl_Task0Params0.stackSize = 4096; 
sysbios_knl_Task0Params0.stackSection = ".taskStackSection"; 
Program.global.Task0 = ti_sysbios_knl_Task.create("&DownlinkSchedulingThread", sysbios_knl_Task0Params0); 

var sysbios_knl_Task1Params0 = new ti_sysbios_knl_Task.Params(); 
sysbios_knl_Task1Params0.instance.name = "DownlinkSchedulingInitThread"; 
sysbios_knl_Task1Params0.priority = 13; 
sysbios_knl_Task1Params0.stackSize = 4096; 
sysbios_knl_Task1Params0.stackSection = ".taskStackSection"; 
Program.global.Task1 = ti_sysbios_knl_Task.create("&DownlinkSchedulingInitThread", sysbios_knl_Task1Params0); 

var ti_sysbios_knl_Idle = xdc.useModule('ti.sysbios.knl.Idle'); 
ti_sysbios_knl_Idle.addFunc('&IdleTask'); 


/* 
 * Semaphore Handling 
 */ 

var ti_sysbios_knl_Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore'); 
ti_sysbios_knl_Semaphore.supportsEvents = true; 


var sysbios_knl_Semaphore0Params0 = new ti_sysbios_knl_Semaphore.Params(); 
sysbios_knl_Semaphore0Params0.instance.name = "DownlinkSchedulingSemaphore"; 
Program.global.DownlinkSchedulingSemaphore = ti_sysbios_knl_Semaphore.create(null, sysbios_knl_Semaphore0Params0); 

var sysbios_knl_Semaphore0Params0 = new ti_sysbios_knl_Semaphore.Params(); 
sysbios_knl_Semaphore0Params0.instance.name = "DownlinkSchedulingInitSemaphore"; 
Program.global.DownlinkSchedulingInitSemaphore = ti_sysbios_knl_Semaphore.create(null, sysbios_knl_Semaphore0Params0); 



ti_sysbios_knl_Clock.tickPeriod = 1; 

var ExceptionISR_HwiParams = new ti_sysbios_hal_Hwi.Params(); 
ExceptionISR_HwiParams.enableInt = false; 
ExceptionISR_HwiParams.eventId = 3; 
var sysbios_hal_Hwi0 = ti_sysbios_hal_Hwi.create(4, "&ExceptionISR", ExceptionISR_HwiParams); 

var SlotInterrupt_HwiParams = new ti_sysbios_hal_Hwi.Params(); 
SlotInterrupt_HwiParams.enableInt = false; 
SlotInterrupt_HwiParams.eventId = 86; 
var sysbios_hal_Hwi1 = ti_sysbios_hal_Hwi.create(5, "&DownlinkInterrupt", SlotInterrupt_HwiParams); 

var IpcInterrupt_HwiParams = new ti_sysbios_hal_Hwi.Params(); 
IpcInterrupt_HwiParams.enableInt = false; 
IpcInterrupt_HwiParams.eventId = 91; 
var sysbios_hal_Hwi2 = ti_sysbios_hal_Hwi.create(6, "&IpcInterrupt", IpcInterrupt_HwiParams); 

/********************** EDMA LLD **********************/ 

/*use modules*/ 
var Task = xdc.useModule ("ti.sysbios.knl.Task"); 
var BIOS = xdc.useModule ("ti.sysbios.BIOS"); 
var ECM = xdc.useModule ("ti.sysbios.family.c64p.EventCombiner"); 
var Startup = xdc.useModule ("xdc.runtime.Startup"); 
var System = xdc.useModule ("xdc.runtime.System"); 
var Log = xdc.useModule ("xdc.runtime.Log"); 
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi'); 
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore'); 
var Cache = xdc.useModule('ti.sysbios.hal.Cache'); 
var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc'); 


/* USE EDMA3 Sample App */ 
xdc.loadPackage('ti.sdo.edma3.drv.sample'); 
var ti_sdo_edma3_drv_DRV = xdc.useModule('ti.sdo.edma3.drv.DRV'); 
var ti_sdo_edma3_drv_sample_DrvSample = xdc.useModule('ti.sdo.edma3.drv.sample.DrvSample'); 

var Exception = xdc.useModule('ti.sysbios.family.c64p.Exception'); 
Exception.exceptionHook = "&ExceptionHook"; 
var PlatformLib = xdc.loadPackage('ti.platform.evmc6678l'); 

My customer's SW are

- IPC Version: 1.22.05.27
- SYS/BIOS: 6.31.04.27

- XDC tool :  xdctools_3_20_08_88

Thanks and Best Regards,

SI.

  • Dear Champs,

    I found there was no configuration related with IPC in previous cfg file and I attached it again after adding IPC.

    var Program = xdc.useModule('xdc.cfg.Program'); 
    
    // Program.heap = 0x1000; 
    Program.endian = "big"; 
    var BIOS = xdc.useModule('ti.sysbios.BIOS'); 
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem'); 
    var ti_sysbios_knl_Clock = xdc.useModule('ti.sysbios.knl.Clock'); 
    var Memory = xdc.useModule('xdc.runtime.Memory'); 
    var ti_sysbios_knl_Event = xdc.useModule('ti.sysbios.knl.Event'); 
    var ti_sysbios_hal_Hwi = xdc.useModule('ti.sysbios.hal.Hwi'); 
    var xdc_runtime_Timestamp = xdc.useModule('xdc.runtime.Timestamp'); 
    var xdc_runtime_TimestampStd = xdc.useModule('xdc.runtime.TimestampStd'); 
    var ti_sysbios_hal_Cache = xdc.useModule('ti.sysbios.hal.Cache'); 
    //var Timer = xdc.useModule('ti.sysbios.hal.Timer'); 
    var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer'); 
    
    Timer.timerSettings[8].ownerCoreId = 0; 
    Timer.timerSettings[9].ownerCoreId = 1; 
    Timer.timerSettings[10].ownerCoreId = 2; 
    Timer.timerSettings[11].ownerCoreId = 3; 
    Timer.timerSettings[12].ownerCoreId = 4; 
    Timer.timerSettings[13].ownerCoreId = 5; 
    Timer.timerSettings[14].ownerCoreId = 6; 
    Timer.timerSettings[15].ownerCoreId = 7; 
    
    var Reset=xdc.useModule('xdc.runtime.Reset'); 
    Reset.fxns[Reset.fxns.length++]='&ResetFunc'; 
    
    /* 
     * These modules are included to support functionalities as system_printf - Optionals Includes 
     */ 
    //var System = xdc.useModule('xdc.runtime.System'); 
    //var SysStd = xdc.useModule('xdc.runtime.SysStd'); 
    //System.SupportProxy = SysStd; 
    
    
    /* 
    * Memory Sections defined for the system default heap and the shared heap(used by MCN) 
    */ 
    Program.sectMap[".systemHeap"] = new Program.SectionSpec(); 
    Program.sectMap[".systemHeap"].loadSegment = "L2SRAM"; 
    
    /* Create a default system heap using ti.bios.HeapMem. */ 
    var defaultHeapMemParams = new HeapMem.Params; 
    defaultHeapMemParams.size = 2 * 1024; 
    defaultHeapMemParams.sectionName = ".systemHeap"; 
    Program.global.defaultHeap = HeapMem.create(defaultHeapMemParams); 
    Memory.defaultHeapInstance = Program.global.defaultHeap;/* This is the default memory heap. */ 
    
    
    /* Check !! */ 
    Program.sectMap[".cppiSharedHeapMem"] = new Program.SectionSpec(); 
    Program.sectMap[".cppiSharedHeapMem"].loadSegment = "MSMCSYSTEM"; 
    
    var sharedHeapMemParamsC0 = new HeapMem.Params; 
    sharedHeapMemParamsC0.size = 16 * 1024; 
    sharedHeapMemParamsC0.align = 64; 
    sharedHeapMemParamsC0.sectionName = ".cppiSharedHeapMem"; 
    Program.global.cppiSharedHeapC0 = HeapMem.create(sharedHeapMemParamsC0); 
    
    var sharedHeapMemParamsC1 = new HeapMem.Params; 
    sharedHeapMemParamsC1.size = 16 * 1024; 
    sharedHeapMemParamsC1.align = 64; 
    sharedHeapMemParamsC1.sectionName = ".cppiSharedHeapMem"; 
    Program.global.cppiSharedHeapC1 = HeapMem.create(sharedHeapMemParamsC1); 
    
    var sharedHeapMemParamsC2 = new HeapMem.Params; 
    sharedHeapMemParamsC2.size = 16 * 1024; 
    sharedHeapMemParamsC2.align = 64; 
    sharedHeapMemParamsC2.sectionName = ".cppiSharedHeapMem"; 
    Program.global.cppiSharedHeapC2 = HeapMem.create(sharedHeapMemParamsC2); 
    
    var sharedHeapMemParamsC3 = new HeapMem.Params; 
    sharedHeapMemParamsC3.size = 1 * 1024; 
    sharedHeapMemParamsC3.align = 64; 
    sharedHeapMemParamsC3.sectionName = ".cppiSharedHeapMem"; 
    Program.global.cppiSharedHeapC3 = HeapMem.create(sharedHeapMemParamsC3); 
    
    var sharedHeapMemParamsC4 = new HeapMem.Params; 
    sharedHeapMemParamsC4.size = 1 * 1024; 
    sharedHeapMemParamsC4.align = 64; 
    sharedHeapMemParamsC4.sectionName = ".cppiSharedHeapMem"; 
    Program.global.cppiSharedHeapC4 = HeapMem.create(sharedHeapMemParamsC4); 
    
    var sharedHeapMemParamsC5 = new HeapMem.Params; 
    sharedHeapMemParamsC5.size = 1 * 1024; 
    sharedHeapMemParamsC5.align = 64; 
    sharedHeapMemParamsC5.sectionName = ".cppiSharedHeapMem"; 
    Program.global.cppiSharedHeapC5 = HeapMem.create(sharedHeapMemParamsC5); 
    
    var sharedHeapMemParamsC6 = new HeapMem.Params; 
    sharedHeapMemParamsC6.size = 1 * 1024; 
    sharedHeapMemParamsC6.align = 64; 
    sharedHeapMemParamsC6.sectionName = ".cppiSharedHeapMem"; 
    Program.global.cppiSharedHeapC6 = HeapMem.create(sharedHeapMemParamsC6); 
    
    var sharedHeapMemParamsC7 = new HeapMem.Params; 
    sharedHeapMemParamsC7.size = 1 * 1024; 
    sharedHeapMemParamsC7.align = 64; 
    sharedHeapMemParamsC7.sectionName = ".cppiSharedHeapMem"; 
    Program.global.cppiSharedHeapC7 = HeapMem.create(sharedHeapMemParamsC7); 
    
    
    
    Program.sectMap[".csl_vect"] = new Program.SectionSpec(); 
    Program.sectMap[".csl_vect"].loadSegment = "L2SRAM"; 
    
    Program.sectMap[".ethDrvData"] = new Program.SectionSpec(); 
    Program.sectMap[".ethDrvData"].loadSegment = "L2SRAM"; 
    
    Program.sectMap[".ethDrvSharedData"] = new Program.SectionSpec(); 
    Program.sectMap[".ethDrvSharedData"].loadSegment = "MSMCSYSTEM"; 
    
    Program.sectMap[".mcnDriverInternalMem"] = new Program.SectionSpec(); 
    Program.sectMap[".mcnDriverInternalMem"].loadSegment = "L2SRAM"; 
    
    Program.sectMap[".ipcDataMem"] = new Program.SectionSpec(); 
    Program.sectMap[".ipcDataMem"].loadSegment = "L2SRAM"; 
    
    Program.sectMap[".sharedDescMemory"] = new Program.SectionSpec(); 
    Program.sectMap[".sharedDescMemory"].loadSegment = "MSMCSYSTEM"; 
    
    Program.sectMap[".qmss"] = new Program.SectionSpec(); 
    Program.sectMap[".qmss"].loadSegment = "MSMCSYSTEM"; 
    
    Program.sectMap[".cppi"] = new Program.SectionSpec(); 
    Program.sectMap[".cppi"].loadSegment = "MSMCSYSTEM"; 
    
    Program.sectMap[".sharedMemory"] = new Program.SectionSpec(); 
    Program.sectMap[".sharedMemory"].loadSegment = "MSMCSYSTEM"; 
    
    var ti_sysbios_knl_Task = xdc.useModule('ti.sysbios.knl.Task'); 
    ti_sysbios_knl_Task.enableIdleTask = true; 
    ti_sysbios_knl_Task.idleTaskStackSize = 2048; 
    ti_sysbios_knl_Task.allBlockedFunc = ti_sysbios_knl_Task.allBlockedFunction; 
    
    var sysbios_knl_Task0Params0 = new ti_sysbios_knl_Task.Params(); 
    sysbios_knl_Task0Params0.instance.name = "DownlinkSchedulingThread"; 
    sysbios_knl_Task0Params0.priority = 12; 
    sysbios_knl_Task0Params0.stackSize = 4096; 
    sysbios_knl_Task0Params0.stackSection = ".taskStackSection"; 
    Program.global.Task0 = ti_sysbios_knl_Task.create("&DownlinkSchedulingThread", sysbios_knl_Task0Params0); 
    
    var sysbios_knl_Task1Params0 = new ti_sysbios_knl_Task.Params(); 
    sysbios_knl_Task1Params0.instance.name = "DownlinkSchedulingInitThread"; 
    sysbios_knl_Task1Params0.priority = 13; 
    sysbios_knl_Task1Params0.stackSize = 4096; 
    sysbios_knl_Task1Params0.stackSection = ".taskStackSection"; 
    Program.global.Task1 = ti_sysbios_knl_Task.create("&DownlinkSchedulingInitThread", sysbios_knl_Task1Params0); 
    
    var ti_sysbios_knl_Idle = xdc.useModule('ti.sysbios.knl.Idle'); 
    ti_sysbios_knl_Idle.addFunc('&IdleTask'); 
    
    
    /* 
     * Semaphore Handling 
     */ 
    
    var ti_sysbios_knl_Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore'); 
    ti_sysbios_knl_Semaphore.supportsEvents = true; 
    
    
    var sysbios_knl_Semaphore0Params0 = new ti_sysbios_knl_Semaphore.Params(); 
    sysbios_knl_Semaphore0Params0.instance.name = "DownlinkSchedulingSemaphore"; 
    Program.global.DownlinkSchedulingSemaphore = ti_sysbios_knl_Semaphore.create(null, sysbios_knl_Semaphore0Params0); 
    
    var sysbios_knl_Semaphore0Params0 = new ti_sysbios_knl_Semaphore.Params(); 
    sysbios_knl_Semaphore0Params0.instance.name = "DownlinkSchedulingInitSemaphore"; 
    Program.global.DownlinkSchedulingInitSemaphore = ti_sysbios_knl_Semaphore.create(null, sysbios_knl_Semaphore0Params0); 
    
    
    
    ti_sysbios_knl_Clock.tickPeriod = 1; 
    
    var ExceptionISR_HwiParams = new ti_sysbios_hal_Hwi.Params(); 
    ExceptionISR_HwiParams.enableInt = false; 
    ExceptionISR_HwiParams.eventId = 3; 
    var sysbios_hal_Hwi0 = ti_sysbios_hal_Hwi.create(4, "&ExceptionISR", ExceptionISR_HwiParams); 
    
    var SlotInterrupt_HwiParams = new ti_sysbios_hal_Hwi.Params(); 
    SlotInterrupt_HwiParams.enableInt = false; 
    SlotInterrupt_HwiParams.eventId = 86; 
    var sysbios_hal_Hwi1 = ti_sysbios_hal_Hwi.create(5, "&DownlinkInterrupt", SlotInterrupt_HwiParams); 
    
    var IpcInterrupt_HwiParams = new ti_sysbios_hal_Hwi.Params(); 
    IpcInterrupt_HwiParams.enableInt = false; 
    IpcInterrupt_HwiParams.eventId = 91; 
    var sysbios_hal_Hwi2 = ti_sysbios_hal_Hwi.create(6, "&IpcInterrupt", IpcInterrupt_HwiParams); 
    
    /********************** EDMA LLD **********************/ 
    
    /*use modules*/ 
    var Task = xdc.useModule ("ti.sysbios.knl.Task"); 
    var BIOS = xdc.useModule ("ti.sysbios.BIOS"); 
    var ECM = xdc.useModule ("ti.sysbios.family.c64p.EventCombiner"); 
    var Startup = xdc.useModule ("xdc.runtime.Startup"); 
    var System = xdc.useModule ("xdc.runtime.System"); 
    var Log = xdc.useModule ("xdc.runtime.Log"); 
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi'); 
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore'); 
    var Cache = xdc.useModule('ti.sysbios.hal.Cache'); 
    var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc'); 
    
    
    /* USE EDMA3 Sample App */ 
    xdc.loadPackage('ti.sdo.edma3.drv.sample'); 
    var ti_sdo_edma3_drv_DRV = xdc.useModule('ti.sdo.edma3.drv.DRV'); 
    var ti_sdo_edma3_drv_sample_DrvSample = xdc.useModule('ti.sdo.edma3.drv.sample.DrvSample'); 
    
    var Exception = xdc.useModule('ti.sysbios.family.c64p.Exception'); 
    Exception.exceptionHook = "&ExceptionHook"; 
    var PlatformLib = xdc.loadPackage('ti.platform.evmc6678l'); 
    
    
    //// ---->>>> 여기에서부터 IPC 사용을 위해 추가한 부분임 
    var Ipc = xdc.useModule('ti.sdo.ipc.Ipc'); 
    var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc'); 
    var GateMP = xdc.useModule('ti.sdo.ipc.GateMP'); 
    
    MultiProc.setConfig("CORE4", ["CORE4", "CORE5"]); 
    
    /* To avoid wasting shared memory for MessageQ transports */ 
    for (var i = 0; i < MultiProc.numProcessors; i++) { 
     Ipc.setEntryMeta({ 
     remoteProcId: i, 
     setupMessageQ: false, 
     }); 
    } 
    
    
    /* Shared Memory Map */ 
    var SHAREDMEM = 0xC0380000; 
    var SHAREDMEMSIZE = 0x0002000; 
    
    /* 
     * Need to define the shared region. The IPC modules use this 
     * to make portable pointers. All processors need to add this 
     * call with their base address of the shared memory region. 
     * If the processor cannot access the memory, do not add it. 
     */ 
    
    var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion'); 
    
    SharedRegion.numEntries = 2; 
    SharedRegion.translate = false; 
    
    SharedRegion.setEntryMeta(0, 
    { base: SHAREDMEM, 
     len: SHAREDMEMSIZE, 
     ownerProcId: 0, 
     isValid: true, 
     cacheEnable: false, 
     cacheLineSize: 0, 
     createHeap: true, 
     name: "shared_mem0" 
    }); 
    
    
    
    
    

    The error code of IPC_attach() function was '-11' - 'IPC_E_NOTREADY', and can you guess why this error was occurred?

    my customer's code is as below.

    main()
    {
    ....

    #ifdef IPCAPI_TEST1
    //IPCAPI0113
    SDM_MemoryPrintf("core%d : call Ipc_start()\n",uCoreId);
    if ( (IpcStatus=Ipc_start()) < 0 ) {
    SDM_MemoryPrintf("core%d: IPC Start failed: %d\n", uCoreId, IpcStatus);
    }
    else
    {
    int mId, rId, nWait=0, status;
    SDM_MemoryPrintf("core%d IPC Attach Start\n", uCoreId);
    mId=MultiProc_self();
    SDM_MemoryPrintf("core%d MultiProc_self(): %d\n", uCoreId, mId);
    if ( mId ) {
    Task_sleep(1);
    rId = 0;
    }else{
    rId = 1;
    }
    SDM_MemoryPrintf("core%d IPC attach start\n", uCoreId);
    while ( (status=Ipc_attach(rId)) < 0 && ++nWait < 1000 ) {
    int i;
    Task_sleep(1);
    for(i=0; i < 5000; i++ );
    }
    IpcAttachStatus = status;
    SDM_MemoryPrintf("core%d IPC Attach done. %d\n", uCoreId, IpcAttachStatus);
    }
    SDM_MemoryPrintf("core%d : Ipc_start() done. ret=%d, IpcAttachStatus:%d\n",uCoreId,IpcStatus,IpcAttachStatus);
    #endif

    // Init_GateMP(); //IPCAPIend -- move to DownlinkSchedulingThread.c

    BIOS_start();
    }

    Thanks and Best Regards,

    SI.

  • And, I found they enabled IPC for DSP4 and DSP5 only. is it possible to use IPC only for 2 DSP cores of DSP4 and DSP5 ?

    Thanks and Best Regards,
    SI.
  • Hi,

    is it possible to use IPC only for 2 DSP cores of DSP4 and DSP5


    Yes, this should be possible.

    You have MultiProc.setConfig("CORE4", ["CORE4", "CORE5"]);. Can you try changing the following line: "ownerProcId: 0," in SharedRegion.setEntryMeta.

    Best Regards,
    Yordan
  • Hi Yordan,

    Do you mean "OwnerProcId: 0" should be changed to "OwnerProcId: 4" as host core is DSP4?
    Could you please explain the meaning of "OwnerProcId"?

    Thanks and Best Regards,
    SI.
  • Hi Yordan,

    There is still an issue even when they changed to "OwnerProcId: 4".

    I'm suspecting below as they used only Core4 and Core5, and I'm worrying there will be no core who has 'rId = 1'.
    Do you agree this is a problem?

    if ( mId ) {
    Task_sleep(1);
    rId = 0;
    }else{
    rId = 1;
    }


    Thanks and Best Regards,
    SI.