Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Hi,
I'm having a hard time running 2 cores with different programs in debug on the c6678 evm, i can run both programs on single core with no issue, one of the programs need to be running on core 0.
both cores used to run together with no issues up until i added shared memory and notify module, i followed one of your examples and i have no idea why does this happen.
core 0 runs but i cant halt it, i can't add any break points and i get :
C66xx_0: Trouble Setting Breakpoint with the Action "Remain Halted" at 0xc230016: (Error -1202 @ 0xC23001C) Device core is hung. The debugger will attempt to force the device to a ready state to recover debug control. Your application's state will be corrupt. You should have limited access to memory and registers, but you may need to reset the device to debug further. (Emulation package 7.0.48.0)
C66xx_0: Breakpoint Manager: Retrying with a AET breakpoint
C66xx_0: Breakpoint Manager: Error enabling this function: Claim hardware resource ownership failed.
C66xx_0: Trouble Halting Target CPU: (Error -1060 @ 0x0) Device is not responding to the request. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 7.0.48.0)
no amount of restarts helps,
this is my cfg file for core 0:
/* Load all required BIOS/XDC runtime packages */
var Memory = xdc.useModule('xdc.runtime.Memory');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var Log = xdc.useModule('xdc.runtime.Log');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
var ECM = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
var Swi = xdc.useModule('ti.sysbios.knl.Swi');
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
/* Modules explicitly used in the application */
var HeapBufMP = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
var Notify = xdc.module('ti.sdo.ipc.Notify');
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
Ipc.procSync = Ipc.ProcSync_PAIR;
/*
* Get the list of names that the build device supports.
* I.e. ["CORE0", "CORE1", "CORE2" ... ]
*/
var coreNameList = MultiProc.getDeviceProcNames();
/*
* Since this is a single-image example, we don't (at build-time) which
* processor we're building for. We therefore supply 'null'
* as the local procName and allow IPC to set the local procId at runtime.
*/
MultiProc.setConfig(null, coreNameList);
var SHAREDMEM = 0x0C000000;
var SHAREDMEMSIZE = 0x00200000;
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM,
len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
name: "DDR2 RAM",
});
var timerParams = new Timer.Params();
timerParams.period = 2000; //2ms
timerParams.arg = 1;
timerParams.startMode = Timer.StartMode_AUTO;
timerParams.controlInit.invout = 1;
timerParams.emuMgtInit.free = false;
Program.global.loopTimer = Timer.create(0, "&loopTimerTick", timerParams);
var timerParams = new Timer.Params();
timerParams.period = 100000; //100ms
timerParams.arg = 1;
timerParams.startMode = Timer.StartMode_AUTO;
timerParams.controlInit.invout = 1;
timerParams.emuMgtInit.free = false;
Program.global.myTimer = Timer.create(12, "&insertDataToPipe", timerParams);
/* Load and use the CSL, CPPI and QMSS packages */
var devType = "c6678"
var Csl = xdc.useModule('ti.csl.Settings');
Csl.deviceType = devType;
/* Load the CPPI package */
//var Cppi = xdc.loadPackage('ti.drv.cppi');
/* Load the QMSS package */
//var Qmss = xdc.loadPackage('ti.drv.qmss');
/* Load the PA package */
//var Pa = xdc.useModule('ti.drv.pa.Settings');
//Pa.deviceType = devType;
/* Load the RM package */
//var Rm = xdc.loadPackage('ti.drv.rm');
var System = xdc.useModule('xdc.runtime.System');
SysMin = xdc.useModule('xdc.runtime.SysMin');
System.SupportProxy = SysMin;
/* Create a default system heap using ti.bios.HeapMem. */
var heapMemParams1 = new HeapMem.Params;
heapMemParams1.size = 8192 * 15;
heapMemParams1.sectionName = "systemHeap";
Program.global.heap0 = HeapMem.create(heapMemParams1);
/* This is the default memory heap. */
Memory.defaultHeapInstance = Program.global.heap0;
Program.sectMap["systemHeap"] = Program.platform.stackMemory;
/* Enable BIOS Task Scheduler */
BIOS.taskEnabled = true;
/*
* Enable Event Groups here and registering of ISR for specific GEM INTC is done
* using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
*/
ECM.eventGroupHwiNum[0] = 7;
ECM.eventGroupHwiNum[1] = 8;
ECM.eventGroupHwiNum[2] = 9;
ECM.eventGroupHwiNum[3] = 10;
/* Tasks creation */
var instti_sysbios_knl_PEngineTaskParams = new Task.Params();
instti_sysbios_knl_PEngineTaskParams.instance.name = "InitTaskFxn";
instti_sysbios_knl_PEngineTaskParams.priority = 12;
instti_sysbios_knl_PEngineTaskParams.stackSize = 4096;
Program.global.TSK_ETHERNET_ProcessingTask = Task.create("&InitTaskFxn", instti_sysbios_knl_PEngineTaskParams);
var swiParams = new Swi.Params();
swiParams.arg0 = 1;
swiParams.arg1 = 0;
swiParams.priority = 14;
swiParams.trigger = 0;
Program.global.PEngineReadSWI = Swi.create('&PEngineReadSWIFxn', swiParams);
swiParams.arg0 = 2;
swiParams.priority = 5;
swiParams.trigger = 3;
Program.global.SWINotifyReader = Swi.create('&SWINotifyReaderFxn', swiParams);
swiParams.arg0 = 2;
swiParams.priority = 5;
swiParams.trigger = 3;
Program.global.SWIPipeDataInsert = Swi.create('&SWIPipeDataInsertFXN', swiParams);
swiParams.arg0 = 2;
swiParams.priority = 5;
swiParams.trigger = 3;
Program.global.PEngineWriteSWI = Swi.create('&PEngineWriteSWIFxn', swiParams);
swiParams.arg0 = 2;
swiParams.priority = 14;
swiParams.trigger = 3;
Program.global.ADCPotSWI = Swi.create('&ADCPotSWIFxn', swiParams);
swiParams.arg0 = 2;
swiParams.priority = 14;
swiParams.trigger = 3;
Program.global.swiRunPIDControl = Swi.create('&swiRunPIDControlFxn', swiParams);
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
Program.global.semHandle = Semaphore.create(0);
/* Memory map */
Program.sectMap[".text"] = "MSMCSRAM";
Program.sectMap[".const"] = "L2SRAM";
Program.sectMap[".qmss"] = "L2SRAM";
Program.sectMap[".cppi"] = "L2SRAM";
Program.sectMap[".ethsect"] = "DDR3";
Program.sectMap[".L2"] = "L2SRAM";
and this is for core7 :
/* Load all required BIOS/XDC runtime packages */
var Memory = xdc.useModule('xdc.runtime.Memory');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var Log = xdc.useModule('xdc.runtime.Log');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
var ECM = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
/* Modules explicitly used in the application */
var Notify = xdc.useModule('ti.sdo.ipc.Notify');
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
var HeapBufMP = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
Ipc.procSync = Ipc.ProcSync_PAIR;
var coreNameList = MultiProc.getDeviceProcNames();
/*
* Since this is a single-image example, we don't (at build-time) which
* processor we're building for. We therefore supply 'null'
* as the local procName and allow IPC to set the local procId at runtime.
*/
MultiProc.setConfig(null, coreNameList);
var SHAREDMEM = 0x0C000000;
var SHAREDMEMSIZE = 0x00200000;
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM,
len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
name: "DDR2 RAM",
});
/* Load and use the CSL, CPPI and QMSS packages */
var devType = "c6678"
var Csl = xdc.useModule('ti.csl.Settings');
Csl.deviceType = devType;
/* Load the CPPI package */
var Cppi = xdc.loadPackage('ti.drv.cppi');
/* Load the QMSS package */
var Qmss = xdc.loadPackage('ti.drv.qmss');
/* Load the PA package */
var Pa = xdc.useModule('ti.drv.pa.Settings');
Pa.deviceType = devType;
/* Load the RM package */
var Rm = xdc.loadPackage('ti.drv.rm');
var System = xdc.useModule('xdc.runtime.System');
SysMin = xdc.useModule('xdc.runtime.SysMin');
System.SupportProxy = SysMin;
/* Create a default system heap using ti.bios.HeapMem. */
var heapMemParams1 = new HeapMem.Params;
heapMemParams1.size = 8192 * 10; //J.M 8192 * 30 Originaly
heapMemParams1.sectionName = "systemHeap";
Program.global.heap0 = HeapMem.create(heapMemParams1);
/* This is the default memory heap. */
Memory.defaultHeapInstance = Program.global.heap0;
Program.sectMap["systemHeap"] = Program.platform.stackMemory;
/* Enable BIOS Task Scheduler */
BIOS.taskEnabled = true;
/*
* Enable Event Groups here and registering of ISR for specific GEM INTC is done
* using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
*/
ECM.eventGroupHwiNum[0] = 7;
ECM.eventGroupHwiNum[1] = 8;
ECM.eventGroupHwiNum[2] = 9;
ECM.eventGroupHwiNum[3] = 10;
/* Tasks creation */
var instti_sysbios_knl_ethernetProcessingTaskParams = new Task.Params();
instti_sysbios_knl_ethernetProcessingTaskParams.instance.name = "ETHERNET_TSK_Processing";
instti_sysbios_knl_ethernetProcessingTaskParams.priority = 12;
instti_sysbios_knl_ethernetProcessingTaskParams.stackSize = 4096;
Program.global.TSK_ETHERNET_ProcessingTask = Task.create("ÐERNET_TSK_Processing", instti_sysbios_knl_ethernetProcessingTaskParams);
/* Memory map */
Program.sectMap[".text"] = "MSMCSRAM";
Program.sectMap[".const"] = "L2SRAM";
Program.sectMap[".qmss"] = "L2SRAM";
Program.sectMap[".cppi"] = "L2SRAM";
Program.sectMap[".ethsect"] = "DDR3"
both projects are based on the Ethernet single core example project
thanks,
Jameel