This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem with memory map.

Hello.

 

    I'm working on porting a big application to camera with DaVinci 6446 and 128MB of RAM. I've decided not to use Codec Engine ( since it would require to rewrite big parts of our application ) - instead I've decided to use only DSPLink for ARM<->DSP communication. Until now I've been using memory map from loop example from DSPLink. However now I need more memory on DSP side so I'm creating a new memory map.

Currently Linux + CMEM takes 100MB of RAM. I want 27MB for code+data and 1MB for DSPLINKMEM.

I've created such tcf file:

var mem_ext = [
{
    comment:    "DDRALGHEAP: off-chip memory for dynamic algmem allocation",
    name:       "DDRALGHEAP",
    base:       0x86400000,   // 100MB
    len:        0x00A00000,   // 10MB
    space:      "code/data"
},
{
    comment:    "DDR2: off-chip memory for application code and data",
    name:       "DDR2",
    base:       0x86E00000,   // 110MB
    len:        0x01100000,   //  17MB
    space:      "code/data"
},
{
    comment:    "RESET_VECTOR: off-chip memory for the reset vector table",
    name:       "RESET_VECTOR",
    base:       0x87F00000,   // 127MB
    len:        0x00000080,   // 128 B
    space:      "code/data"
},
{
    comment:    "DSPLINK: off-chip memory reserved for DSPLINK code and data",
    name:       "DSPLINKMEM",
    base:       0x87F00080,   // 127MB + 128B
    len:        0x000FFF80,   //   1MB - 128B
    space:      "code/data"
}
];


var device_regs = {
    l1PMode: "32k",
    l1DMode: "16k",
    l2Mode: "64k",
    l1DHeapSize: 0x10000
};

var params = {
    clockRate: 594,
    catalogName: "ti.catalog.c6000",
    deviceName: "DM6446",
    regs: device_regs,
    mem: mem_ext
};


utils.loadPlatform("ti.platforms.generic", params);


bios.enableMemoryHeaps(prog);
bios.enableTskManager(prog);

bios.DDR2.createHeap = true;
bios.DDR2.heapSize   = 0x20000; // 128K

bios.DDRALGHEAP.createHeap = true;
bios.DDRALGHEAP.heapSize   = bios.DDRALGHEAP.len;

bios.L1DSRAM.createHeap       = true;
bios.L1DSRAM.enableHeapLabel  = true;
bios.L1DSRAM["heapLabel"]     = prog.extern("L1DHEAP");

bios.L1DSRAM.heapSize     = 0x10000;  // all of L1DSRAM's 64K for this heap

prog.module("GBL").C64PLUSMAR128to159 = 0x0000ffff;

prog.module("GBL").ENABLEALLTRC    = false;
prog.module("GBL").PROCID          = 0;

prog.module("MEM").STACKSIZE = 0x1000;


prog.module("MEM").ARGSSIZE = 256;

bios.POOL.ENABLEPOOL = true;
bios.GBL.SPECIFYRTSLIB = 1;
bios.GBL.RTSLIB = "rts64plus_eh.lib";

bios.setMemCodeSections (prog, bios.DDR2);
bios.setMemDataNoHeapSections (prog, bios.DDR2);
bios.setMemDataHeapSections (prog, bios.DDR2);

bios.enableMemoryHeaps(prog);
bios.enableRealTimeAnalysis(prog);
bios.enableRtdx(prog);
bios.enableTskManager(prog);


prog.module("MEM").BIOSOBJSEG = bios.DDR2;
prog.module("MEM").MALLOCSEG  = bios.DDR2;


prog.module("TSK").STACKSEG = bios.DDR2;


if (config.hasReportedError == false) {
    prog.gen();
}

My program ( working on normal memory map from loop sample ) fails at PROC_start.

 

What am I doing wrong? I would greatly appreciate your help.