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 .text and .ebss



Hi There

I have just added a group of new files to my project, so I'm guessing the following error is caused by memory issues:

<Linking>
"../F28027_FLASH_PSU_Control.CMD", line 88: error: placement fails for object
".text", size 0x2019 (page 0). Available ranges:
FLASHA size: 0x1f80 unused: 0x1aee max hole: 0x1aee
"../F28027_FLASH_PSU_Control.CMD", line 103: error: run placement fails for
object ".ebss", size 0xd7e (page 1). Available ranges:
dataRAM size: 0x800 unused: 0x800 max hole: 0x800
error: errors encountered during linking; "PSU_Control.out" not built

How can I solve it though? what is .ebss?

Also, when I launched CCS this morning, blackhawk attempted to update, but failed for at least a portion of its install, maybe this has had an impact?

CCS v4.2.4.00033

EDIT: Im guessing the failed blackhawk update hasnt affectted things as removing the new files removes the error

  • Toby

    Looks like the .text section (contains the executable code) of your code is much bigger than the FLASHA memory size into which you are trying to  load the code.

    The code size is 0x2019, and the FLASHA section is only 0x1F80, out of which 0x1AEE is un-used. You'll need to store the .text section in a bigger memory section. This can be done by defining a a bigger FLASH section  in the .cmd file or  combine more than one flash sector to load the .text

    Eg:

    .text   :   >>  FLASHA | FLASHB

    Same is the case for .ebss section as well. Compiler uses this section for uninitialized global and static variables defined in your code.

    This error is more to do with the additional code you are trying to compile and load,  than any install errors.

    Regards

    Vaish

  • Toby,

    those errors are saying that the available size of memory in a particular section is not enough, you program needs more. you should increase the size of the memory section.

    Please refer to C200 compiler tools documentation for more details on ebss/data/text etc sections. You can also find help to understand linker command file in the documentation.

     

    Best Regards
    Santosh

  • Many thanks for your replies.

    I am currently making my way through the documentation, but it is slow going :)

    I'm not sure how to instruct the compiler to store it in a bigger section. I have tried as you suggested (.text : >> FLASHA | FLASHC) but with no effect, I see the following error

    <Linking>
    "../F28027_FLASH_PSU_Control.CMD", line 88: error: placement fails for object
    ".text", size 0x2019 (page 0). Available ranges:
    FLASHA size: 0x1f80 unused: 0x1aee max hole: 0x1aee
    FLASHC size: 0x2000 unused: 0x2000 max hole: 0x2000
    error: errors encountered during linking;

    Although the same method did solve the problem with .ebss. And I would have thought that the two sections combined would have been more than enough space...

    Below are the relevant memory and section commands from the F28027_FLASH.CMD file, I wonder if you might know why it has not helped the .text section? Thanks

    MEMORY
    {
    PAGE 0:
    /* Program Memory */
    /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */

    BOOT_RSVD : origin = 0x000000, length = 0x000050 /* Part of M0, BOOT rom will use this for stack */
    progRAM : origin = 0x008000, length = 0x000800

    OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */
    FLASHD : origin = 0x3F0000, length = 0x002000 /* on-chip FLASH */
    FLASHC : origin = 0x3F2000, length = 0x002000 /* on-chip FLASH */
    FLASHA : origin = 0x3F6000, length = 0x001F80 /* on-chip FLASH */
    CSM_RSVD : origin = 0x3F7F80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
    BEGIN : origin = 0x3F7FF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
    CSM_PWL : origin = 0x3F7FF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */

    IQTABLES : origin = 0x3FE000, length = 0x000B50 /* IQ Math Table in Boot */
    IQTABLES2 : origin = 0x3FEB50, length = 0x00008C /* IQ Math Table in Boot */
    IQTABLES3 : origin = 0x3FEBDC, length = 0x0000AA /* IQ Math Table in Boot */

    BOOTROM : origin = 0x3FF27C, length = 0x000D44 /* Boot ROM */
    RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM */
    VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM */

    PAGE 1 :

    /* Data Memory */
    /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
    /* Registers remain on PAGE1 */

    RAMM0 : origin = 0x000050, length = 0x0003B0
    RAMM1 : origin = 0x000400, length = 0x000400
    dataRAM : origin = 0x008800, length = 0x000800
    FLASHB : origin = 0x3F4000, length = 0x002000
    }


    SECTIONS
    {
    /* Allocate program areas: */
    .cinit : > FLASHA, PAGE = 0
    .pinit : > FLASHA, PAGE = 0
    .text : > FLASHA | FLASHC, PAGE = 0

    codestart : > BEGIN PAGE = 0
    ramfuncs : LOAD = FLASHA,
    RUN = progRAM,
    LOAD_START(_RamfuncsLoadStart),
    LOAD_END(_RamfuncsLoadEnd),
    RUN_START(_RamfuncsRunStart),
    PAGE = 0

    csmpasswds : > CSM_PWL PAGE = 0
    csm_rsvd : > CSM_RSVD PAGE = 0

    /* Allocate uninitalized data sections: */
    .stack : > RAMM0, PAGE = 1
    .ebss : > dataRAM | FLASHB, PAGE = 1
    .esysmem : > dataRAM, PAGE = 1

    /* Initalized sections go in Flash */
    /* For SDFlash to program these, they must be allocated to page 0 */
    .econst : > FLASHA PAGE = 0
    .switch : > FLASHA PAGE = 0

    /* Allocate IQ math areas: */
    IQmath : > FLASHA PAGE = 0 /* Math Code */
    IQmathTables : > IQTABLES PAGE = 0, TYPE = NOLOAD /* Math Tables In ROM */

    /* Uncomment the section below if calling the IQNexp() or IQexp()
    functions from the IQMath.lib library in order to utilize the
    relevant IQ Math table in Boot ROM (This saves space and Boot ROM
    is 1 wait-state). If this section is not uncommented, IQmathTables2
    will be loaded into other memory (SARAM, Flash, etc.) and will take
    up space, but 0 wait-state is possible.
    */
    /*
    IQmathTables2 : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
    {

    IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)

    }
    */
    /* Uncomment the section below if calling the IQNasin() or IQasin()
    functions from the IQMath.lib library in order to utilize the
    relevant IQ Math table in Boot ROM (This saves space and Boot ROM
    is 1 wait-state). If this section is not uncommented, IQmathTables2
    will be loaded into other memory (SARAM, Flash, etc.) and will take
    up space, but 0 wait-state is possible.
    */
    /*
    IQmathTables3 : > IQTABLES3, PAGE = 0, TYPE = NOLOAD
    {

    IQmath.lib<IQNasinTable.obj> (IQmathTablesRam)

    }
    */

    .reset : > RESET, PAGE = 0, TYPE = DSECT
    vectors : > VECTORS PAGE = 0, TYPE = DSECT

    }

  • Here's the link to the C28xx Compiler Guide : http://www.ti.com/lit/ug/spru514e/spru514e.pdf

    - Vaish

  • ah, reading further I see that this does not combine the sections, just gives a choice of one of the two, thus, separately, neither is large enough.../ So I should use >> instead of >

  • Another simple fix is combine FLASHA and FLASHB to one section, define it as FLASHAB. Then assign that section FLASHAB to .text, but note this will only work for consecutive flash sections. For instance you cannot combine A and C. 

    Combine:

    //FLASHB : origin = 0x3F4000, length= 0x002000 /* on-chip FLASH */
    //FLASHA : origin = 0x3F6000, length = 0x001F80 /* on-chip FLASH */

    to

    FLASHAB : origin = 0x3F4000, length = 0x003F80 /* on-chip FLASH

  • Many Thanks for your help Vaish. Great to be able to fix something that looked complex, so simply! :)

  • Hello Vaish,

    I am having same error for .ebss section. As I was going through forum I found this helpful but still haven't solved problem.

    "C:\\tidcs\\DSP2833x\\v131\\DSP2833x_common\\cmd\\F2833x_nonBIOS_flash_Flash_to_RAM.cmd", line 100: error:    run placement fails for object ".ebss", size 0xace (page 1).  Available    ranges:    RAMM1        size: 0x380        unused: 0x380        max hole: 0x380

    From the Map file I do understand that I need to increase the size of my .ebss memory. I tried to increase with RAML6 which does not give me any error but at the time of flashing it gives me a Initialize RAM warning.

    it says" because this program contains initialized RAM data it may run successfully under CCS but not as a  standalone system"

    Can you please help me to resolve this issue?

    If you need more infor please contact me.

    Thanks

    Jigar

  • I am also having issues with .ebss

    "../2837x_RAM_lnk_cpu1.cmd", line 65: error #10099-D: program will not fit into available memory.  run placement with alignment/blocking fails for section ".ebss" size 0x1b29 page 0.  Available memory ranges:

       RAMGS3       size: 0x1000       unused: 0x847        max hole: 0x802     

       RAMGS4       size: 0x1000       unused: 0x1000       max hole: 0x1000    

       RAMGS5       size: 0x1000       unused: 0x1000       max hole: 0x1000    

    error #10010: errors encountered during linking; "Trireme.out" not built

    gmake: *** [Trireme.out] Error 1

    Here is the linker entry

     

       .ebss            : >>RAMGS3 | RAMGS4 | RAMGS5,    PAGE = 0

     

    As you can see, the combined size is 0x3000, but the linker refuses to use it all.  

  • Hello,

    If you still have a question, please consider creating a new post as old posts are generally closed and no longer tracked. You can provide the necessary information regarding your issue in the new post and include a link to this post if you'd like.

    Thanks,
    Elizabeth
  • Thanks Elizabeth. I figured it out, but I will remember for future reference.