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.

Memory placement problem

Hello,

 

As our code size increased we ran into this kind of problem:

error: run placement fails for object ".bss",   size 0x1384c (page 0).  Available ranges:   SARAM        size: 0x40000      unused: 0x1f066      max hole: 0x1f066   

I guess we are running out of memory space. 

 

Could you clarify in more detail what this message means? Looks like .bss segment is smaller that the unused SARAM space. If so, why it cannot be successfully placed there?

Could you help us with providing some optimization tips? We have size optimizations turned on but that is not enough... Are there some switches for CSL library, or DSP/BIOS which would make the code smaller?

 

Thank you...

  • Hi,

     

    Please check the size of the heap. 

    In your linker file:

    -stack 0x2000 /* PRIMANY STACK SIZE */

    -sysstack 0x1000 /* SECONDARY STACK SIZE */

    -heap 0x14000 /* HEAP AREA SIZE */

     

    Regards,

    Hyun

  • Hello,

     

    I forgot to mention that our code uses DSP/BIOS so we are not modifying the linker file manually. Heap size set in the DSP/BIOS configuration file is 0x3fd0, and stack is 0x0800

     

    I played around today with some optimizations of the code, and I can see that as the code gets more optimized the "unused" SARAM space increases but the .bss segment which is considerably smaller than that unused space still cannot be placed into memory.

    It looks like the unused space is: 137722 kB but .bss segment is 79944kB...

    The original error message I get is:

    "./biosconfcfg.cmd", line 320: error: run placement fails for object ".bss",   size 0x13848 (page 0).  Available ranges:   SARAM        size: 0x40000      unused: 0x219fa      max hole: 0x219fa 

     

    What do you suggest? Are there some settings that I can play around with?

  • Hi,

     

    You are able to increase heap size in BIOS. Open your tcf file under DSP/BIOS Config folder in your CCS. Select SYSTEM-->MEM-->SARAM. Increase heap size.

    Make sure it is word size not byte.

  • Hi Srdjan,

     

    Your problem may be caused by the compiler section settings in the TCF file. By default, the DSP/BIOS will put the .bss (global variables and static variables section) in the DARAM. In your case, the DARAM is too small for your .bss section. You can change the default setting by right click on TCF à System à MEM Memory Section Manager, then choose Properties à Compiler Sections. The following dialog box will show up:

     

     

    Make sure the .bss is using SARAM as shown above.

     

    Best regards,

     

    Ming