I've developed a codec and integrated it into a DSP server on DM6467. It works well until I place a part of my codes on L2 instead of DDR2.
Then, it failed to Load DSP server on ARM926, and returns:
@0,788,701us: [+0 T:0x40969490] OP - Processor_create_d> Enter(proc=0x5db18)
@0,788,778us: [+2 T:0x40969490] OP - Processor_create_d> Initializing DSP PROC...
@0,788,860us: [+2 T:0x40969490] OP - Processor_create_d> Using DspLink config data for entry #0 [server 'DM6467.x64P']
@0,788,964us: [+2 T:0x40969490] OP - Processor_create_d> Adding DSP segment #0 to Link configuration: name='DDR2', startAddress=0x8fa00000, sizeInBytes=0x400000, shared=1, syncd=0
@0,789,074us: [+2 T:0x40969490] OP - Processor_create_d> Adding DSP segment #1 to Link configuration: name='DSPLINKMEM', startAddress=0x8fe00000, sizeInBytes=0x100000, shared=1, syncd=0
@0,789,181us: [+2 T:0x40969490] OP - Processor_create_d> Adding DSP segment #2 to Link configuration: name='RESET_VECTOR', startAddress=0x8ff00000, sizeInBytes=0x80, shared=1, syncd=0
@0,789,281us: [+2 T:0x40969490] OP - Processor_create_d> Adding DSP segment #3 to Link configuration: name='DDRALGHEAP', startAddress=0x8b500000, sizeInBytes=0x4500000, shared=0, syncd=0
@0,789,474us: [+2 T:0x40969490] OP - Processor_create_d> DOPOWERCONTROL was=0; now=0
@0,797,302us: [+2 T:0x40969490] OP - Processor_create_d> Attaching to DSP PROC...
@0,803,146us: [+2 T:0x40969490] OP - Processor_create_d> Opening MSGQ pool...
@0,803,692us: [+2 T:0x40969490] OP - Processor_create_d> Loading DM6467.x64P on DSP (1 args)...
@0,860,240us: [+2 T:0x40969490] OP - Processor_create_d> Starting DSP PROC...
@16,666,477us: [+7 T:0x40969490] OP - Processor_create_d> Loading and starting DSP server 'DM6467.x64P' FAILED, status=[0x80008017] (look for error code 'DSP_EBASE + 0x17' in dsplink*/packages/dsplink/gpp/inc/usr/errbase.h)
@16,666,626us: [+0 T:0x40969490] OP - Processor_delete_d> Enter (proc=0x5db18)
@16,666,716us: [+2 T:0x40969490] OP - Processor_delete_d> Closing remote transport...
@16,666,823us: [+6 T:0x40969490] OP - Processor_delete_d> Closing remote transport FAILED, status=0x80008000.
@16,666,912us: [+2 T:0x40969490] OP - Processor_delete_d> Stopping DSP...
@16,667,012us: [+6 T:0x40969490] OP - Processor_delete_d> Stopping DSP FAILED, status=0x80008000
@16,667,102us: [+2 T:0x40969490] OP - Processor_delete_d> Closing pool...
@16,667,613us: [+2 T:0x40969490] OP - Processor_delete_d> Detaching from DSP...
@16,674,256us: [+2 T:0x40969490] OP - Processor_delete_d> Destroying DSP... (object, that is)
@16,674,941us: [+0 T:0x40969490] OP - Processor_delete_d> return
@16,675,059us: [+2 T:0x40969490] OP - Processor_create_d> return (0)
I found 'DSP_EBASE + 0x17' is DSP_ETIMEOUT in errbase.h. It looks like my DSP server doesn't respond.
If I place those codes in DDR2, there's no such problem.
I also tried to place some datas, not codes, on L2, there's no problem too.
So, what problem could it be?
-----------------------------------------------------------------
Here is .tcf of DSP server:
var mem_ext = [
{
comment: "DDRALGHEAP: off-chip memory for dynamic algmem allocation",
name: "DDRALGHEAP",
base: 0x8B500000,
len: 0x04500000,
space: "code/data"
},
{
comment: "DDR2: off-chip memory for code and data",
name: "DDR2",
base: 0x8FA00000,
len: 0x00400000,
space: "code/data"
},
{
comment: "DSPLINK: off-chip memory for DSPLINK code and data",
name: "DSPLINKMEM",
base: 0x8FE00000,
len: 0x00100000,
space: "code/data"
},
{
comment: "RESET_VECTOR: off-chip memory for the reset vector table",
name: "RESET_VECTOR",
base: 0x8FF00000,
len: 0x00000080,
space: "code/data"
},
];
var device_regs = {
l1PMode: "32k",
l1DMode: "32k",
l2Mode: "64k"
};
var params = {
clockRate: 594,
catalogName: "ti.catalog.c6000",
deviceName: "DM6467",
regs: device_regs,
mem: mem_ext
};
/*
* Customize generic platform with parameters specified above.
*/
utils.loadPlatform("ti.platforms.generic", params);
/* ===========================================================================
* Enable heaps and tasks
* ===========================================================================
*/
bios.enableMemoryHeaps(prog);
bios.enableTskManager(prog);
/* ===========================================================================
* Create heaps in memory segments that are to have heap
* ===========================================================================
*/
bios.DDR2.createHeap = true;
bios.DDR2.heapSize = 0x00040000; // 256K
bios.DDRALGHEAP.createHeap = true;
bios.DDRALGHEAP.heapSize = bios.DDRALGHEAP.len;
/* ===========================================================================
* GBL
* ===========================================================================
*/
prog.module("GBL").ENABLEALLTRC = false;
prog.module("GBL").PROCID = 0;
prog.module("GBL").C64PLUSCONFIGURE = true ;
prog.module("GBL").C64PLUSL2CFG = "64k" ;
prog.module("GBL").C64PLUSL1DCFG = "32k" ;
prog.module("GBL").C64PLUSL1PCFG = "32k" ;
prog.module("GBL").C64PLUSMAR128to159 = 0x0000ffff;
/* ===========================================================================
* HWI
* ===========================================================================
*/
bios.HWI_INT4.interruptSelectNumber = 16
bios.HWI_INT5.interruptSelectNumber = 17
/* ===========================================================================
* MEM
* ===========================================================================
*/
prog.module("MEM").STACKSIZE = 0x1000 ;
prog.module("TSK").STACKSIZE = 0x1000 ;
/* ===========================================================================
* Global Settings
* ===========================================================================
*/
prog.module("MEM").ARGSSIZE = 200;
/* ===========================================================================
* Enable MSGQ and POOL Managers
* ===========================================================================
*/
bios.MSGQ.ENABLEMSGQ = true;
bios.POOL.ENABLEPOOL = true;
/* ===========================================================================
* Set all code and data sections to use DDR
* ===========================================================================
*/
bios.setMemCodeSections (prog, bios.DDR2) ;
bios.setMemDataNoHeapSections (prog, bios.DDR2) ;
bios.setMemDataHeapSections (prog, bios.DDRALGHEAP) ;
/* ===========================================================================
* MEM : Global
* ===========================================================================
*/
prog.module("MEM").BIOSOBJSEG = bios.DDRALGHEAP;
prog.module("MEM").MALLOCSEG = bios.DDRALGHEAP;
/* ===========================================================================
* TSK : Global
* ===========================================================================
*/
prog.module("TSK").STACKSEG = bios.DDRALGHEAP ;
bios.TSK.instance("TSK_idle").stackSize = 0x1000;
//Fix for clock
prog.module("CLK").SPECIFYRATE = true;
prog.module("CLK").INPUTCLK = 148.5;
/* ===========================================================================
* Generate configuration files...
* ===========================================================================
*/
if (config.hasReportedError == false) {
bios.MEM.instance("IRAM").createHeap = 1;
bios.MEM.instance("IRAM").heapSize = 0x00008000;
bios.MEM.instance("IRAM").enableHeapLabel = 1;
bios.MEM.instance("IRAM").heapLabel = prog.extern("IRAM_HEAP", "asm");
bios.MEM.instance("IRAM").space = "code/data";
// !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!
prog.gen();
}
.cmd of DSP server:
SECTIONS
{
.intCode > IRAM
.csl_vect > DDR2
}