hello everyone,
I'm trying to modify the multicore image processing example based on ipc (TMS320C6678L,CCS5.4,core0 as master and core1-6 as slave)
and the main processing code i'm going to add need heap larger than L2SRAM
By looking at the forum, I found it hard to allocate heap in different space of DDR3 with a single project(.cfg file)
so I first duplicate 6 slave project, add 7 .out and it works well
the slave core has the same cfg file:
_____________________________________
var Memory = xdc.useModule('xdc.runtime.Memory');
var Log = xdc.useModule('xdc.runtime.Log');
var Error = xdc.useModule('xdc.runtime.Error');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
var Notify = xdc.useModule('ti.sdo.ipc.Notify');
var Startup = xdc.useModule('xdc.runtime.Startup');
var System = xdc.useModule('xdc.runtime.System');
var SysStd = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;
/* Load and configure SYSBIOS packages */
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
var Sem = xdc.useModule('ti.sysbios.knl.Semaphore');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var BiosCache = xdc.useModule('ti.sysbios.hal.Cache');
var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var Exc = xdc.useModule('ti.sysbios.family.c64p.Exception');
var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
BIOS.taskEnabled = true;
Task.common$.namedInstance = true;
/* Create a Heap. */
var heapMemParams = new HeapMem.Params;
heapMemParams.size = 0x00030000 //not enough
heapMemParams.sectionName = "systemHeapslave";
var heap0 = HeapMem.create(heapMemParams);
Memory.defaultHeapInstance = heap0;
/* Load and configure the IPC packages */
var MessageQ = xdc.useModule('ti.sdo.ipc.MessageQ');
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
var HeapBufMP = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2", "CORE3", "CORE4", "CORE5", "CORE6"]);
/* Synchronize all processors (this will be done in Ipc_start) */
Ipc.procSync = Ipc.ProcSync_ALL;
var SHAREDMEM = 0x0c300000;
var SHAREDMEMSIZE = 0x00100000;
SharedRegion.translate = false;
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM,
len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
name: "MSMCSRAM_IPC",
});
/* ================ Logger configuration ================ */
//var LoggerCircBuf = xdc.useModule('ti.uia.runtime.LoggerCircBuf');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Defaults = xdc.useModule('xdc.runtime.Defaults');
var Main = xdc.useModule('xdc.runtime.Main');
var Load = xdc.useModule('ti.sysbios.utils.Load');
Load.windowInMs = 50;
Exc.common$.logger = Main.common$.logger;
Exc.enablePrint = true;
/* The application is using the UIA benchmark events. */
//var UIABenchmark = xdc.useModule('ti.uia.events.UIABenchmark');
Program.sectMap[".vecs"] = {loadSegment: "MSMCSRAM_SLAVE", loadAlign:1024};
Program.sectMap[".switch"] = {loadSegment: "MSMCSRAM_SLAVE", loadAlign:8};
Program.sectMap[".cio"] = {loadSegment: "L2SRAM", loadAlign:8};
Program.sectMap[".args"] = {loadSegment: "L2SRAM", loadAlign:8};
Program.sectMap["systemHeapslave"] = "L2SRAM";//************************************************************************
Program.sectMap[".cinit"] = "MSMCSRAM_SLAVE";
Program.sectMap[".const"] = "MSMCSRAM_SLAVE";
Program.sectMap[".text"] = "MSMCSRAM_SLAVE";
Program.sectMap["systemHeap"] = "L2SRAM";
Program.sectMap[".far"] = "L2SRAM";
Program.sectMap[".bss"] = "L2SRAM";
Program.sectMap[".rodata"] = "L2SRAM";
Program.sectMap[".neardata"] = "L2SRAM";
Program.sectMap[".code"] = "L2SRAM";
Program.sectMap[".data"] = "L2SRAM";
Program.sectMap[".sysmem"] = "L2SRAM";
Program.sectMap[".defaultStackSection"] = "L2SRAM";
Program.sectMap[".stack"] = "L2SRAM";
Program.sectMap[".plt"] = "L2SRAM";
/* Create the stack Thread Task for our application. */
var tskSlaveThread = Task.create("&slave_main");
tskSlaveThread.stackSize = 0x2000;
tskSlaveThread.priority = 0x5;
tskSlaveThread.instance.name = "slave_main";
_______________________________
after that, I move the systemHeapslave part to DDR_1,DDR3_2...DDR3_6,and an opcode exception happened
So how to make it correct?
Thanks for helping~