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.

FFTC and insufficient memory

Other Parts Discussed in Thread: SYSBIOS

Hi,

I'm working on the C6670 chip and am trying to implement an application using the FFTC coprocessor. I want to submit 20 packets at once, each containing 3 blocks of data  (2048 DFT mput samples or more). 

20 * 3 * 2048 * 4 * 2= 983040 Bytes

(20 - number of packets, 3 - number - blocks, 4 - size of each input sample, 2 - input + output)

Each chip on the C6670 board contains 1024KB of L2 memory and yet I'm getting the following error:

[C66xx_0] ti.sysbios.heaps.HeapMem: line 296: out of memory: handle=0x8b3de0, size=24600
[C66xx_0] xdc.runtime.Memory: line 52: out of memory: heap=0x0, size=24600

Any hints how I could get around this? I built my application on the sample code testing the FFTC provided together with MSCDK.

Thanks

Andrzej

  • Andrzej,

    you're getting this error because you ran out of Heap memory. Heap is shared memory with mallocs and *_create() API calls (Task_create, etc...).

    You could try increasing your heap memory, creating tasks, semaphores and such statically in the .cfg file, or by statically allocating your 983040 bytes of memory.

    What version of MCSDK are you using?

  • Hi Tom,

    Thank you for your reply! I'm using MSCDK v. 1.0.0.17. Isn't creating tasks and semaphores statically going to eat up my L2 memory anyway? I already tried creating a larger heap, but then the application crashes during the linking process. I get errors like:

    "./configPkg/linker.cmd", line 290: error: run placement fails for object
       ".fardata", size 0x1a305 (page 0).  Available ranges:
       L2SRAM       size: 0x100000     unused: 0x4          max hole: 0x2       
    "./configPkg/linker.cmd", line 288: error: placement fails for object ".const",
       size 0x6345 (page 0).  Available ranges:
       L2SRAM       size: 0x100000     unused: 0x4          max hole: 0x2    

    As I may end up using even larger samples, I'm also considering allocating my heap in the MSMCSRAM. Do you know what additional steps are needed in such a scenario?

    Thank you,

    Andrzej

  • Hi,

    For larger samples, MSMCSRAM can be used for Heap allocation. You can modify the bios config file to point to MSMC:

     

    Program.sectMap["systemHeap"] = {loadSegment: "MSMCSRAM"};//Program.platform.dataMemory;

    var heapMemParams = new HeapMem.Params;

    heapMemParams.size = 0x20000;

    heapMemParams.sectionName = "systemHeap";

    Memory.defaultHeapInstance = HeapMem.create(heapMemParams);

     

    Regards,

    Arun