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.

Linker error

Other Parts Discussed in Thread: MSP430G2253, MSP430G2553

Hi,

I got the following error when I build my code.I think my code is much smaller then the device flash memory.But the following error is coming.

#10099-D</a>  program will not fit into available memory.  placement with alignment fails for section ".text" size 0xbfa .  Available memory ranges: FLASH        size: 0x7e0        unused: 0x7e0        max hole: 0x7e0    lnk_msp430g2253.cmd    /ADC_e    line 61    C/C++ Problem

         Please let me know how can I solve this problem.

Regards,

Bhaskar

  • Bhaskar,

    bhaskar reddy1 said:
    I think my code is much smaller then the device flash memory

    How are you sure about the above statement?

    what is the max flash memory supported? (is it ox7e0 itself?

    Is your program built with debug or release more? (check if it is built in debug mode, in that case it will required bigger .text size)

  • Hi,

    I am using CCS Ver 5.1.0 and My device is:MSP430G2553  ,it contains 16 KB flash which is much bigger for my application. I think I need to change some settings in my Compiler.Please let me know What are thos settings that can I made in my compiler so that I can avoid my Error.

    as Radhesh Bhat asked me the following question

    Is your program built with debug or release more? (check if it is built in debug mode, in that case it will required bigger .text size)

            I don't know in which mode I am working On .I don't know How to change my mode.While creating my project I have selected connection as TIMSP430 USB1(Default)

    Regards,

    Bhaskar

  • Hi Bhaskar,

    Right click on the project and go to properties, click under CCS Build and then compiler.

    Check under Basic Options for Debugging Model (--symdebug:none or --symdebug:skeletal), Optimization level (should be -o3)

  • bhaskar reddy1 said:
    it contains 16 KB flash which is much bigger for my application

    If your flash supports 16KB, why in your linker command file the size is set to 0x7e0 (~2KB)?

  • Bhaskar,

    Is your device a MSP430G2253 or 2553? The 2253 has only 2k Flash and it looks like you are using the linker command file (lnk_msp430g2253.cmd) for that device. If you are indeed using a 2553 device, make sure to use the correct linker command file for it (lnk_msp430g2553.cmd).

  • You've said you have a MSP430G2553, but you are using the linker command file for a MSP430G2253, which has only 2K FLASH. You need to switch the project configuration to the proper device.