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.

DSP/BIOS Maximum heap size?

Other Parts Discussed in Thread: OMAP-L138

I'm trying to build an application that's particularly heap-hungry for the C674x core of an OMAP-L138.  I've rebuilt DSP Link to give the DSP exclusive access to 29MB of physical memory.  I'm apparently running alright now with a declared heap of 1MB.  I tried pushing that up to 8MB, but the resulting DSP image will not load and run.  I've seen several mentions of a "maximium DSP/BIOS heap size" that may be processor specific, but I've not been able to find further details.

 

What, exactly, is the maximum DSP/BIOS heap size on an L138?

 

What do I do if I need more heap than that?

 

Thanks much for any insights!

  • Carl,

    Which version of DSP/BIOS are you using? Can you provide a snippet of your heap size configuration code?

    Alan

  • Hi, Alan.  I'm running DSP/BIOS 5.41.3.17.

     

    I've modified the board description .tci file as follows...

     

    /*  ============================================================================
     *  MEM : RESET_VECTOR
     *  ============================================================================
     */
    var RESET_VECTOR = prog.module("MEM").create("RESET_VECTOR");
    RESET_VECTOR.base        = 0xC2300000;
    RESET_VECTOR.len         = 0x00000080;
    RESET_VECTOR.space       = "code/data";
    RESET_VECTOR.createHeap  = false;
    RESET_VECTOR.comment     = "RESET_VECTOR";

    /*  ============================================================================
     *  MEM : DDR
     *  ============================================================================
     */
    var DDR = prog.module("MEM").instance("DDR");
    DDR.base             = RESET_VECTOR.base + RESET_VECTOR.len ;
    DDR.len              = 0x1CFFF80;
    DDR.space            = "code/data";
    DDR.createHeap       = true;
    DDR.heapSize         = 0x800000;
    DDR.comment          = "DDR";

    (there's also the standard-sized DSPLINKMEM and POOLMEM sections, which now together take the 1MB from 0xC2200000 to 0xC22FFFFF, and I kept the IRAM section as it was)

     

    My application's .tcf file includes that .tci file, and then piles on...

     

    /*  ============================================================================
     *  Set all code and data sections to use DDR
     *  ============================================================================
     */
    bios.setMemCodeSections(prog, DDR);
    bios.setMemDataNoHeapSections(prog, DDR);
    bios.setMemDataHeapSections(prog, DDR);

    /*  ============================================================================
     *  TSK : Global
     *  ============================================================================
     */
    prog.module("TSK").STACKSEG = DDR;

    /* Enable common BIOS features used by all examples */
    bios.enableRealTimeAnalysis(prog);
    bios.enableMemoryHeaps(prog);
    bios.enableRtdx(prog);
    bios.enableTskManager(prog);
    bios.setMemCodeSections(prog, prog.get("DDR"));

    /* Enable ECM Handler */
    bios.ECM.ENABLE = 1;

    /*
     * Enable heap usage.
     */
    bios.MEM.instance("DDR").createHeap = 1;
    bios.MEM.instance("DDR").heapSize = 0x100000;
    bios.MEM.BIOSOBJSEG = prog.get("DDR");
    bios.MEM.MALLOCSEG = prog.get("DDR");

     

    In this configuration, it runs fine, and I see in the link map that I have a 1MB heap.  If I change the bios.MEM.instance("DDR").heapSize to 8MB (0x800000), however (which matches the definition in the .tci file, while this one does not), the resulting DSP image file fails to load.  The ARM side hangs trying to load it into the DSP.

  • Carl,

    This sounds like the ARM side hasn't configured its MMU to allow access to all the memory required to load your application into.

    If you're able to connect to the ARM with CCS, using your application's .map file and a CCS memory view, can you confirm that all of the memory regions required by the application are accessible?

    Alan

  • Strange.  I had set this problem aside mid last week to focus on other issues that were more immediately pressing.  I got back to this one today, and now I can't reproduce the issue.  I have an image with an 8MB heap running on the DSP now, and I'm not sure what I changed that made the difference.

     

    I appreciate the help, Alan.  This one may just go to bed as a heisenbug.