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.

CCS/CC2640: How to use TI-RTOS profiling tools in CCS to determine the peak task stack usage ?

Part Number: CC2640


Tool/software: Code Composer Studio

After adding the PTM and a self-defined task in to simple_peripheral project , iphone cannot pair with CC2640, as a result of SRAM not enough . In simple_peripheral project , SBP_TASK_STACK_SIZE is 644 . I want to reduce the stask size of SimpleBLEPeripheral task and the self-defined task . So I need to determine the peak task stack usage of each task . How to use TI-RTOS profiling tools in CCS to determine the peak task stack usage ?

1.According to 《TI-RTOS Overview》 in SDK , it can be known that TI-RTOS profiling tools could be used to determine the peak task stack usage , as shown in picture 1 .

2.The location of TI-RTOS profiling tools in CCS is shown in picture 2 .

3.Attachments
(1)Simplelink_cc2640r2_sdk_1_40_00_45 can be downloaded here :

(2)CC2640R2 launchpad can be bought here :

(3)location of 《TI-RTOS Overview》 in SDK :
file:///C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/docs/blestack/ble_user_guide/html/cc2640/rtos-overview.html#


7、My developing environment :
CCS:Code Composer Studio 7.2.0
SDK:simplelink_cc2640r2_sdk_1_40_00_45
hardware:CC26640R2 launchpad develop kit
OS:win7 64 bit

  • Hi Heng,

    The best way to get a notation about the peak stack usage of a task is to use the "Runtime Object View". Using this you can see the current and peak value of a Tasks stack.

    There is no actual static or dynamic analyzing going on here to determine the maximum stack size (it simply recording the peak), so to get good numbers make sure to exercise the tasks as much as possible before checking the numbers. Also keep in mind that there is no guarantee what you see as the peak is the actual peak. Also, most of the default tasks in the example are already optimized in terms of stack size so I recommend to focus on your own custom tasks first.