Hi,
I'm using DSP/BIOS 5.42.01.09 with XDCTools 3.24.5.48 in CCS6 under Linux. I work with C6745 DSP at custom board with 8Mb SDRAM.
I have some problems with placing task stack into SDRAM.
- BIOS goes to restart when try to execute task with stack in SDRAM
- Tasks with different stack location has different stackPeak value in ROV
- Task stack located in SDRAM seems to be uninitialized at main() entry point (filled with 0xBEBEBEBE)
Could anyone help me?
Below I list minimal working example to illustrate my problem:
I use a bit modified DSP/BIOS tsk example from evmC6747 package (RED marks changes since original example)
SDRAM configuration performed by GEL, before application starts
TCF
utils.loadPlatform("ti.platforms.evm6747");
bios.enableRealTimeAnalysis(prog);
bios.enableMemoryHeaps(prog);
bios.enableRtdx(prog);
bios.enableTskManager(prog);
bios.IRAM.createHeap = true;
bios.IRAM.enableHeapLabel = true;
bios.IRAM["heapLabel"] = prog.extern("SEG0");
bios.IRAM.heapSize = 0x2000;
bios.MEM.BIOSOBJSEG = prog.get("IRAM");
bios.MEM.MALLOCSEG = prog.get("IRAM");
bios.GBL.C64PLUSCONFIGURE = 0;
bios.GBL.C64PLUSMAR128to159 = 0x0000ffff;
bios.CLK.TIMERSELECT = "Timer 0"; /* Select Timer 0 to drive BIOS CLK */
bios.CLK.RESETTIMER = true; /* Take the selected timer our of reset */
bios.LOG_system.bufLen = 512;
var trace = bios.LOG.create("trace");
trace.bufLen = 1024;
trace.logType = "circular";
var task0 = bios.TSK.create("task0");
task0.priority = 1;
task0["fxn"] = prog.extern("task");
task0.arg0 = 0;
var task1 = bios.TSK.create("task1");
task1.priority = 1;
task1["fxn"] = prog.extern("task");
task1.arg0 = 1;
task1.stackMemSeg = prog.get("SDRAM");
var task2 = bios.TSK.create("task2");
task2.priority = 1;
task2["fxn"] = prog.extern("task");
task2.arg0 = 2;
// !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!
if (config.hasReportedError == false) {
prog.gen();
}
Task view of ROV:
name | handle | state | priority | timeout | time | block | stackBase | stackSize | stackPeak |
TSK_idle | 0x1180c60c | Ready | 0 | 0 | 0 | 0x1180a6e0 | 1024 | 168 | |
task0 | 0x1180c66c | Ready | 1 | 0 | 0 | 0x1180aee0 | 1024 | 100 | |
task1 | 0x1180c6cc | Ready | 1 | 0 | 0 | 0xc0000000 | 1024 | 0 | |
task2 | 0x1180c72c | Ready | 1 | 0 | 0 | 0x1180b2e0 | 1024 | 100 |
Memory dumps at main() entry point
task0$stkptr
BEBEBEBE 00000000 00000000 11803320 00000000 11802AF8 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1180A5A4
11802C60 00000000 00000000 BEBEBEBE
task1$stkptr
BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE
BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE
BEBEBEBE BEBEBEBE BEBEBEBE BEBEBEBE
Memory dumps at BIOS_init() entry
task0$stkptr
BEBEBEBE 00000000 00000000 11803320 00000000 11802AF8 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1180A5A4
11802C60 00000000 00000000 BEBEBEBE
task1$stkptr
BEBEBEBE 00000000 00000000 11803320 00000000 11802AF8 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000001 00000000 00000000 00000000 00000000 00000000 1180A5A4
11802C60 00000000 00000000 BEBEBEBE