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.

CC2650 + IAR: Section Placement Failed

Hi,

I was running into section placement issues in my project after adding lots of features so I followed the SWD for removing GAP BOND MGR and SNV and reduced my stack size significantly. After doing so, I  increased one of my task's stack size by a few hundred kilobytes. I then followed the SWD for adjusting RAM0/STACK ADDR boundaries and attempting to rebuild both projects (stack then app) but I am getting a section placement error in the application project. I'm assuming its something to do with where RTOS places the task stacks? Note that I am using Task_construct and I should have plenty of flash remaining after reducing the stack size by multiple kilobytes. 

Application project Usage:

37 258 bytes of readonly code memory
2 945 bytes of readonly data memory
1 284 bytes of readwrite data memory

Stack Project Usage:

63 206 bytes of readonly code memory
508 bytes of readonly data memory
1 061 bytes of readwrite data memory

Here is the error I am getting in IAR:

  • Hello,

    Your linker error is due to RAM, not flash, placement. You can try reducing the System Stack (CSTACK in IAR) and perhaps using a smaller RTOS heap.

    Best wishes
  • I'm running into this issue as well and would like to understand how to track down the cause of this. Is there a recommended procedure to identify the RAM offenders? 

  • CM2015 said:

    I followed the SWD for removing GAP BOND MGR and SNV and reduced my stack size significantly.

    I  increased one of my task's stack size by a few hundred kilobytes.

    I then followed the SWD for adjusting RAM0/STACK ADDR boundaries

    37 258 bytes of readonly code memory

    2 945 bytes of readonly data memory
    1 284 bytes of readwrite data memory

    CM2015, can you point to the documents describing removing bond manager and svn and adjusting boundaries? Also, how did you obtain the memory usage numbers of your application? Thanks.

  • Hi,

    If i remember correct the Bond manager / boundaries/ etc procedures are all found in the SWD.

    As for fixing the issue, the problem is the cc26xx have a pretty small amount of RAM /Readwrite memory. There are number of places that you need to tweak:

    1) Reduce heapmgr size via profiling

    2) Reduce rtos heap size via profiling

    3) Reduce task stack sizes via profiling

    3) I think removing bond/pairing/NSV allows for a 4K block of RAM to be freed but I'm not positive. again details should be in SWD.

    Good luck.