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.

Compiler/CC2650: program will not fit into available memory

Part Number: CC2650
Other Parts Discussed in Thread: CC2640

Tool/software: TI C/C++ Compiler

Hello :).

I am trying to take Project zero and add code to the project and since it is so full of code I get this problem:

Does anyone knows why this is happening? How can I fix it?

Tomer.

  • Hi Tomer,

    As you said, it happens because you're trying to add more code than the device has room for. We have a small section in the Software Developer's Guide on Optimizing Bluetooth low energy Stack Memory Usage (Section 10.4) (http://www.ti.com/lit/swru393 ).
  • Hello Marie,

    I cant figure out how to fix this.

    Does the linker knows how much room will the BLE Stack will use? Can I see how much room do I need to clean from my code?

    Can I make SRAM larger? What does the SRAM is doing? 

    Tomer.

  • Hello Tomer,

    You can free up flash and RAM by removing the instrumentation from Project Zero.

    Exclude the app_ble_uartlog.cfg from TOOLS folder and add the cc2640.cfg from ble_sdk_2_02_01_18\src\common\cc26xx\kernel\cc2640\config\
    Then change UARTLOG_NUM_EVT_BUF=0 in the Predefined Symbols from the app project properties.

    Best wishes
  • I did what you told me but that didnt solve the problem.

    still getting

    ""c:/ti/simplelink/ble_sdk_2_02_01_18/src/common/cc26xx/ccs/cc26xx_app.cmd", line 141: error #10099-D: program will not fit into available memory. run placement with alignment fails for section ".stack" size 0x400 . Available memory ranges:
    SRAM size: 0x4348 unused: 0x6cb max hole: 0x3b7"

    Do you have any other suggestion? 

    Tomer.

  • Hi Tomer,

    At this point you either need to reduce the RAM utilization of your added code, or port your application to simple_peripheral which is a skeleton BLE peripheral application without instrumentation.

    Best wishes