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.

CC2640Stack rebuild all error: Error[Lp011]: section placement failed

Hi,

I added only a few files(sensor drivers) in the demo project:C:\ti\simplelink\ble_cc26xx_2_01_00_44423\Projects\ble\SimpleBLEPeripheral 

and I didn't make any change on the CC2640Stack but in the CC2640Stack project, when I rebuilt all there's an error came out. I copied the error info below, please help. Thanks!

Error[Lp011]: section placement failed
unable to allocate space for sections/blocks with a total estimated minimum size of 0xed19 bytes (max align 0x4) in <[0x0000f000-0x0001efff]> (total uncommitted
space 0xdfc8).

  • Hello,

    It's difficult to conclude from the description as to what is going on. Can you start with a clean SDK install, then build the default SiimpleBLEPeripheral (SBP) App & Stack projects to confirm there are no errors. Then, add your changes to the App project, one at a time, until the build breakage occurs.

    Unless you modify something in the Stack project, the size of that project shouldn't change.

    Best wishes
  • Dear JXS,

    Thanks for your reply :)

    It turns out that I turned off the optimization in c/c++ compiler, and after that when I rebuilt the project the error occured.

    So if I need to turn off the optimization or choose a low level optimization, the SRAM is not enough to use. What can I do?

    Thanks!

    Lillian

    20150825

  • BLE STACK WITH HIGH OPTIMIZATION:
    55 485 bytes of readonly code memory(54.18K)
    8 715 bytes of readonly data memory(8.5K)
    1 235 bytes of readwrite data memory(1.2K)
    WITH MEDIUM OPTIMIZATION:
    57 017 bytes of readonly code memory
    8 662 bytes of readonly data memory
    1 239 bytes of readwrite data memory
    Error[Lp011]: section placement failed unable to allocate space for sections/blocks with a total estimated minimum size of 0x2b5b bytes (max align 0x4) in <[0x0000f000-0x0001efff]> (total uncommitted space 0x2ac4).
  • Hello Lillian,

    I'm not sure why you would need to wholesale disable the optimizer for the Stack. You can disable optimizations on a per file or function basis, if needed. Note that your linker error is with flash, not SRAM.

    In any event, if you change the stack config such that it needs to grow, I suggest reviewing the "3.12 Configuration of RAM & Flash boundary using the Boundary Tool" section in the BLE 2.1 SW Developer's Guide (SWRU393). This section will explain the required changes to address this error.

    Best wishes
  • Dear JXS,
    Thanks for your patience.
    Yes, I noticed that the error is with flash. And I changed back the optimizer option for the Stack.
    Thanks again!
    Lillian
    20150826