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.

placement fails for objects ".cinit"

Other Parts Discussed in Thread: SYSBIOS

Hi,

We have created a test project in which we have included our own linker/command file. our own linker file contains the memory sections alone and original memory range is defined in auto generated linker/command file.

Since we were using some TI DSP api to create task, so we were getting some linking error. To remove the linking error we have added "test.cfg" file.

test.cfg file contains

var Task =   xdc.useModule('ti.sysbios.knl.Task');

Now after compiling we are getting

placement fails for object ".cinit", size 0x17f34 (page 0).  Available ranges: L2SRAM       size: 0x100000     unused: 0x34         max hole: 0xc    Test             C/C++ Problem
placement fails for object ".const", size 0x2c306 (page 0).  Available ranges: L2SRAM       size: 0x100000     unused: 0x4b         max hole: 0xc    Test             C/C++ Problem
placement fails for object ".switch", size 0x7a7 (page 0).  Available ranges: L2SRAM       size: 0x100000     unused: 0x4b         max hole: 0xc    Test             C/C++ Problem
placement fails for object ".text", size 0xbb0d0 (page 0).  Available ranges: L2SRAM       size: 0x100000     unused: 0x4b         max hole: 0xc    Test             C/C++ Problem
placement fails for object ".vecs", size 0x5ff (page 0).  Available ranges: L2SRAM       size: 0x100000     unused: 0x4b         max hole: 0xc    Test             C/C++ Problem
run placement fails for object    Test             C/C++ Problem
run placement fails for object ".cio", size 0x123 (page 0).  Available ranges: L2SRAM       size: 0x100000     unused: 0x4b         max hole: 0xc    Test             C/C++ Problem
run placement fails for object ".far", size 0x2c634a (page 0).  Available ranges: L2SRAM       size: 0x100000     unused: 0x6950b      max hole: 0x694cc    Test             C/C++ Problem
run placement fails for object ".fardata", size 0xb23b1 (page 0).  Available ranges: L2SRAM       size: 0x100000     unused: 0x4b         max hole: 0xc    Test             C/C++ Problem
run placement fails for object ".stack", size 0x1000 (page 0).  Available ranges: L2SRAM       size: 0x100000     unused: 0x4b         max hole: 0xc    Test             C/C++ Problem
run placement fails for object "GROUP_1", size 0x1cf (page 0).  Available ranges: L2SRAM       size: 0x100000     unused: 0x4b         max hole: 0xc    Test             C/C++ Problem

Thanks

Rohit

  • Rohit,

    The error messages are basically saying that those sections are too large to fit into the available memory in the L2SRAM region where they are being allocated. The messages indicate the size of the section, so you can have an idea of how big the section is. The link map file is another place to look to understand the size of the generated sections and available memory. To get rid of the errors, you would need to modify the SECTIONS allocations in the linker command file to place sections in a region with sufficient memory.

  • Hi,
    placement fails for object .text ccs5I have imported Image Processing Demo and build it succesfully. After I have add my custom files and library, it gives linker error below due to
    low memory.
    "./configPkg/linker.cmd", line 385: error: placement fails for object ".text",
       size 0x1d5cdd (page 0).  Available ranges:
       MSMCSRAM_MASTER   size: 0x100000     unused: 0x0          max hole: 0x0     
    "./configPkg/linker.cmd", line 382: error: run placement fails for object
       ".far:NDK_PACKETMEM", size 0x52b7f (page 0).  Available ranges:
       MSMCSRAM_MASTER   size: 0x100000     unused: 0x0          max hole: 0x0   
     
    AartiG said ".. to modify the SECTIONS allocations in the linker command file..."
    I find and opened linker.cmd file. there is a warning in the firs line like,
    "Do not modify this file; it is automatically generated from the template
     * linkcmd.xdt in the ti.targets.elf package and will be overwritten."
    I think we should set memory sizes in ti.targets.elf package. 
    Would you explain how can I set memory sections.
    I can adjust memory sections in CCS3.3 easily. But it is very complex in CCS 5
    Best 
    Goksel
  • Hi,
    I have imported Image Processing Demo for 6678L and build it succesfully. After I have add my custom files and library, it gives linker error below due to
    low memory.
    "./configPkg/linker.cmd", line 385: error: placement fails for object ".text",
       size 0x1d5cdd (page 0).  Available ranges:
       MSMCSRAM_MASTER   size: 0x100000     unused: 0x0          max hole: 0x0     
    "./configPkg/linker.cmd", line 382: error: run placement fails for object
       ".far:NDK_PACKETMEM", size 0x52b7f (page 0).  Available ranges:
       MSMCSRAM_MASTER   size: 0x100000     unused: 0x0          max hole: 0x0   
     
    Aartig said ".. to modify the SECTIONS allocations in the linker command file..."
    I find and opened linker.cmd file. there is a warning in the first line like,
    "Do not modify this file; it is automatically generated from the template
     * linkcmd.xdt in the ti.targets.elf package and will be overwritten."
    I think we should set memory sizes in ti.targets.elf package. 
    Would you explain how can I set memory sections.
    I can adjust memory sections in CCS3.3 easily. But it is very complex in CCS 5
    Best 
    Goksel
  • Hi Goksel,

    Which version of BIOS are you using?  Are you using SYS/BIOS 6.x?

    If so, the easiest way to do this is to use your application's BIOS configuration file (extension *.cfg).  You can use the sections map to tell the linker where to place various sections.

    For example,adding the following statement into the code of the *.cfg file

    Program.sectMap[".text"]              =    "DDR2";

    would place ".text" into the memory segment DDR2.  So you could add similar to your application's *.cfg file.

    Please refer to the SYS/BIOS User's Guide chapter titled "Memory" for more information on this.  For example, this document exists here on my PC: "C:\ti\bios_6_33_04_39\docs\Bios_User_Guide.pdf"

    Steve

  • Thank you Steve, it works.