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.

How to I customize the HEAPSIZE of an application running on CC1352 with TI-RTOS?

Hello, 

I am noticing a huge .priheap occupied in SRAM by my application, I want to know the significance of .priheap, what's the actual size used by my application and how do I customize it?

  

  • Hi Hemanth, 

    Thanks for your question, to help you solve this issue I need some more information. 

    1. Which device are you using?

    2. Which version of the SDK are you using? 

    3. Which example are you using? 

    Thanks, 
    Elin 

  • Hello Elin, 

    Sorry for the late reply,

    1. I am using CC1352 Launchpad.

    2. I am using SimpleLink CC13x2 26x2 SDK v4.20.1.04 and SimpleLink Audio Plugin v3.30.0.06.

    3. I am using pdmstream example in the Audio Plugin SDK. 

    I have found there to edit priheap size, I have hit and tried to reduce the heap size up to where the application is working fine/giving correct results.  PFA. 

    ====================================================================

    Before: 

    /*
    * ======== CC1352R1_LAUNCHXL.cmd ========
    */

    --stack_size=1024 /* C stack is also used for ISR stack */

    HEAPSIZE = 0x10000; /* Size of heap buffer used by HeapMem */

    After: 

    *
    * ======== CC1352R1_LAUNCHXL.cmd ========
    */

    --stack_size=1024 /* C stack is also used for ISR stack */

    HEAPSIZE = 0x1500; /* Size of heap buffer used by HeapMem */

    =====================================================================

    After changing to HEAPSIZE = 0x1500, it's working fine and the SRAM reduced to 20% but I wanted to know the exact/worst-case size of the heap when the application is running.

    Thank you,

  • Hi Hermanth, 

    Apologies for the delay.

    Have you made any progress on your issue? 

    Thanks, 
    Elin 

  • Hi Elin,

    No. I haven't figured out yet. If you could help me out to figure out actual heapsize of an application in CCS, it would be helpful. Details you asked for is in the above reply.

  • Hi Hermanth, 

    Thanks for sharing. 

    The Heap size is defined in the .cfg file. Based on HEAPMGR_CONFIG the configuration of the heap is slightly different. You can review the memory management chapter in the User's Guide for more information. We typically recommend to let the linker assign all the free RAM to the heap which is the default configuration in our projects. 

    Thanks, 
    Elin