Other Parts Discussed in Thread: TCI6638K2K, SYSBIOS, TMS320C6678
Tool/software: Code Composer Studio
Hello,
I have been debugging a benchmark program I have written on one of the C66 cores of the EVMK2H.
On the first load everything appears to be OK. But after one iteration of my benchmarking loop the debugger appears to have issues controlling the device. After hitting halt / pause I get the following popup:
Trouble Halting Target CPU:
(Error -1202 @ 0x0)
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)
Here is the console output:
C66xx_0: GEL Output:
Connecting Target...
C66xx_0: GEL Output: TCI6638K2K GEL file Ver is 1.60000002
C66xx_0: GEL Output: Detected PLL bypass enabled: SECCTL[BYPASS] = 0x00800000
C66xx_0: GEL Output: (2a) MAINPLLCTL1 = 0x00000040
C66xx_0: GEL Output: (2b) PLLCTL = 0x00000048
C66xx_0: GEL Output: (2c) PLLCTL = 0x00000048
C66xx_0: GEL Output: (2d) Delay...
C66xx_0: GEL Output: (2e) SECCTL = 0x00810000
C66xx_0: GEL Output: (2f) PLLCTL = 0x0000004A
C66xx_0: GEL Output: (2g) Delay...
C66xx_0: GEL Output: (2h) PLLCTL = 0x00000048
C66xx_0: GEL Output: (4)PLLM[PLLM] = 0x0000000F
C66xx_0: GEL Output: MAINPLLCTL0 = 0x05000000
C66xx_0: GEL Output: (5) MAINPLLCTL0 = 0x07000000
C66xx_0: GEL Output: (5) MAINPLLCTL1 = 0x00000040
C66xx_0: GEL Output: (6) MAINPLLCTL0 = 0x07000000
C66xx_0: GEL Output: (7) SECCTL = 0x00890000
C66xx_0: GEL Output: (8a) Delay...
C66xx_0: GEL Output: PLL1_DIV3 = 0x00008002
C66xx_0: GEL Output: PLL1_DIV4 = 0x00008004
C66xx_0: GEL Output: PLL1_DIV7 = 0x00000000
C66xx_0: GEL Output: (8d/e) Delay...
C66xx_0: GEL Output: (10) Delay...
C66xx_0: GEL Output: (12) Delay...
C66xx_0: GEL Output: (13) SECCTL = 0x00090000
C66xx_0: GEL Output: (Delay...
C66xx_0: GEL Output: (Delay...
C66xx_0: GEL Output: (14) PLLCTL = 0x00000041
C66xx_0: GEL Output: PLL has been configured (CLKIN * PLLM / PLLD / PLLOD = PLLOUT):
C66xx_0: GEL Output: PLL has been configured (122.879997 MHz * 16 / 1 / 2 = 983.039978 MHz)
C66xx_0: GEL Output: Power on all PSC modules and DSP domains...
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=2, md=9!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=17, md=25!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=17, md=26!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=18, md=27!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=19, md=28!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=19, md=29!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=20, md=30!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=20, md=31!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=20, md=32!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=20, md=33!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=21, md=34!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=22, md=35!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=22, md=36!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=23, md=37!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=23, md=38!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=24, md=39!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=24, md=40!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=24, md=41!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=24, md=42!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=25, md=43!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=25, md=44!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=25, md=45!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=25, md=46!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=26, md=47!
C66xx_0: GEL Output: Set_PSC_State... Timeout Error #03 pd=27, md=48!
C66xx_0: GEL Output: Power on all PSC modules and DSP domains... Done.
C66xx_0: GEL Output: WARNING: SYSCLK is the input to the PA PLL.
C66xx_0: GEL Output: Completed PA PLL Setup
C66xx_0: GEL Output: PAPLLCTL0 - before: 0x0x098804C0 after: 0x0x09080500
C66xx_0: GEL Output: PAPLLCTL1 - before: 0x0x00000040 after: 0x0x00002040
C66xx_0: GEL Output: DDR begin
C66xx_0: GEL Output: XMC setup complete.
C66xx_0: GEL Output: DDR3 PLL (PLL2) Setup ...
C66xx_0: GEL Output: DDR3 PLL Setup complete, DDR3A clock now running at 666 MHz.
C66xx_0: GEL Output: DDR3A initialization complete
C66xx_0: GEL Output: DDR3 PLL Setup ...
C66xx_0: GEL Output: DDR3 PLL Setup complete, DDR3B clock now running at 800MHz.
C66xx_0: GEL Output: DDR3B initialization complete
C66xx_0: GEL Output: DDR done
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)
C66xx_0: Trouble Halting Target CPU: (Error -1202 @ 0x0) 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)
Here is my benchmark loop:
Void BenchmarkTask_RunBenchmark(UArg arg0, UArg arg1)
{
algorithms_ICovariance_dataCell_s weights[16]; // hard coded size!!!
UInt32 preTicks;
UInt32 covarTicks;
UInt32 triTicks;
UInt32 postTicks;
UInt32 covTime;
UInt32 chTime;
UInt32 triTime;
UInt32 totalTime;
Timer_Handle timerH;
BenchmarkTask_Object* obj = (BenchmarkTask_Object*)arg0;
timerH = Clock_getTimerHandle();
Log_print0(Diags_USER2,"enter loop");
while(1)
{
preTicks = Timer_getCount(timerH);
tasks_BenchmarkTask_PCovariance_RunCovariance(obj->CovarianceH, &(module->inputData[0]), &(module->choleskyData[0]));
covarTicks = Timer_getCount(timerH);
tasks_BenchmarkTask_PCholesky_RunCholesky(obj->CholeskyH, &(module->choleskyData[0]));
triTicks = Timer_getCount(timerH);
tasks_BenchmarkTask_PTrisolve_RunTrisolve(obj->TrisolveH, &(module->choleskyData[0]), &(weights[0]), &(module->outputData[0]));
postTicks = Timer_getCount(timerH);
totalTime = postTicks - preTicks;
covTime = covarTicks - preTicks;
chTime = triTicks - covarTicks;
triTime = postTicks - triTicks;
Log_print4(Diags_USER2,"%u %u %u %u", covTime, chTime, triTime, totalTime);
}
}
Here is the core's config file:
//////////////////////////////////////////////
// Generic XDC Modules for use
//////////////////////////////////////////////
var Main = xdc.useModule('xdc.runtime.Main');
// logger for diagnostics tools
//var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
//Generic Defaults - random things go here
var Defaults = xdc.useModule('xdc.runtime.Defaults');
// Diagnostics tools
var Diags = xdc.useModule('xdc.runtime.Diags');
var Log = xdc.useModule('xdc.runtime.Log');
var SysStd = xdc.useModule('xdc.runtime.SysStd');
var System = xdc.useModule('xdc.runtime.System');
var Program = xdc.useModule('xdc.cfg.Program');
var Memory = xdc.useModule('xdc.runtime.Memory');
//////////////////////////////////////////////
// BIOS Modules for use
//////////////////////////////////////////////
var Bios = xdc.useModule('ti.sysbios.BIOS');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
// bios utility for CPU loading
var Load = xdc.useModule('ti.sysbios.utils.Load');
var Timer64 = xdc.useModule('ti.sysbios.hal.Timer');
//////////////////////////////////////////////
// TI Debugging modules -- not needed for C66?
//////////////////////////////////////////////
//var ti_rtdx_driver_RtdxDvr = xdc.useModule('ti.rtdx.driver.RtdxDvr');
//var ti_rtdx_RtdxModule = xdc.useModule('ti.rtdx.RtdxModule');
//////////////////////////////////////////////
// TI Debugging modules
//////////////////////////////////////////////
var UIAErr = xdc.useModule('ti.uia.events.UIAErr');
var UIAEvt = xdc.useModule('ti.uia.events.UIAEvt');
var UIABenchmark= xdc.useModule('ti.uia.events.UIABenchmark');
var UIAStatistic= xdc.useModule('ti.uia.events.UIAStatistic');
//var UIALogger = xdc.useModule('ti.uia.loggers.LoggerRunMode');
// parameters for creating new tasks
var task_params = new Task.Params;
//////////////////////////////////////////////
// Diagnostics and Logging Configuration
//////////////////////////////////////////////
// Old logger
//var logbuf_params = new LoggerBuf.Params;
//logbuf_params.bufType = LoggerBuf.BufType_CIRCULAR;
//logbuf_params.numEntries = 512;
//logbuf_params.exitFlush = true;
//var loggerBuf = LoggerBuf.create(logbuf_params);
// New UIA Logger
//var loggerParams = new UIALogger.Params();
//loggerParams.transferBufSize = 32768;
//loggerBuf = UIALogger.create(loggerParams);
//loggerBuf.instance.name = "Main Logger";
//Load.taskEnabled = true;
var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
/* Use LoggerRunMode with real-time JTAG upload */
LoggingSetup.loggerType = LoggingSetup.LoggerType_JTAGRUNMODE;
LoggingSetup.loadLoggerSize = 1024;
LoggingSetup.mainLoggerSize = 32768;
LoggingSetup.sysbiosLoggerSize = 32768;
/* Enable CPU Load logging */
LoggingSetup.loadLogging = true;
//Main.common$.logger = loggerBuf;
Main.common$.diags_USER1 = Diags.RUNTIME_ON;
Main.common$.diags_USER2 = Diags.RUNTIME_ON;
Main.common$.diags_USER3 = Diags.RUNTIME_OFF;
Main.common$.diags_USER4 = Diags.RUNTIME_OFF;
Main.common$.diags_USER5 = Diags.RUNTIME_OFF;
Main.common$.diags_USER6 = Diags.RUNTIME_OFF;
Main.common$.diags_INFO = Diags.RUNTIME_ON;
Main.common$.diags_ANALYSIS = Diags.RUNTIME_ON;
Main.common$.diags_LIFECYCLE = Diags.RUNTIME_ON;
Main.common$.diags_INTERNAL = Diags.RUNTIME_ON;
Main.common$.diags_EXIT = Diags.RUNTIME_ON;
Main.common$.diags_ENTRY = Diags.RUNTIME_ON;
//////////////////////////////////////////////
// load program specific modules
//////////////////////////////////////////////
var Benchmark = xdc.useModule('tasks.BenchmarkTask');
Benchmark.PCovariance = xdc.useModule('algorithms.CovarianceC');
Benchmark.PCholesky = xdc.useModule('algorithms.CholeskyB');
Benchmark.PTrisolve = xdc.useModule('algorithms.TrisolveB');
// create and configure program specific XDC Instances
var covar_params = new Benchmark.PCovariance.Params;
//covar_params.NumChannels = 16;
//covar_params.NumRangeCells = 143;
var cholesky_params = new Benchmark.PCholesky.Params;
cholesky_params.matrixSize = 16;
var trisolve_params = new Benchmark.PTrisolve.Params;
trisolve_params.matrixSize = 16;
var bench_params = new Benchmark.Params;
bench_params.CovarianceH = Benchmark.PCovariance.create(covar_params);
bench_params.CholeskyH = Benchmark.PCholesky.create(cholesky_params);
bench_params.TrisolveH = Benchmark.PTrisolve.create(trisolve_params);
var bench_task = Benchmark.create(bench_params);
// create the Benchmarking task
task_params.arg0 = bench_task;
task_params.arg1 = 0;
task_params.priority = 10;
Task.create(Benchmark.RunBenchmark, task_params);
//////////////////////////////////////////////
// Global Settings
//////////////////////////////////////////////
System.SupportProxy = SysStd;
System.extendedFormats = "%f";
// period in microseconds
Clock.tickPeriod = 100000;
//////////////////////////////////////////////
// Memory Settings
//////////////////////////////////////////////
Memory.defaultHeapSize = 0x10000;
Program.heap = 0x10000
Program.stack = 0x2000;
var heap_mem_params = new HeapMem.Params;
heap_mem_params.size = 0x10000;
heap_mem_params.align = 128;
Program.global.heap = HeapMem.create(heap_mem_params);
Memory.defaultHeapInstance = Program.global.heap;
The program was built manually on the command line in linux, and then debugged on windows with CCSv7.
xdctools: 3.32.02.22
SYS/BIOS: 6.46.05.55
UIA: 2.00.06.52
I had this running at one point in 2011 on the 6678 demoboard and CCSv5 back in 2011 using I don't remember what versions of xdc, bios and uia.
Thanks!