Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: SYSBIOS
I want to test my remining stack size.
I use IAR and know to see the stack peak.
There is a way to get the stack peak in code I want to examine the stack usage?
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.
Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: SYSBIOS
I want to test my remining stack size.
I use IAR and know to see the stack peak.
There is a way to get the stack peak in code I want to examine the stack usage?
the explanation there is related to CPU stack usage and not for all of The TASKs stack usage.
I use TI RTOS
You can use ROV (Runtime Object Viewer) to see task/thread memory usage. More information here: https://dev.ti.com/tirex/explore/content/simplelink_cc13x2_26x2_sdk_5_20_00_52/docs/ble5stack/ble_user_guide/html/ble-stack-5.x-guide/debugging-index.html#rov-in-iar
ROV is a tool that shows stack usage of each task. See the section "Viewing the State of Each Task." I would recommend reading that entire document about debugging.

Yes, I know it.
I want to set break point at point where TASK stack usage is more then 70%
I need to do it by code.
there is a way to do so?
You can use the stackSize and used fields from the Task_Stat structure returned by calling Task_stat().
See RTOS/SysBIOS Documentation here: https://dev.ti.com/tirex/content/simplelink_cc13x2_26x2_sdk_5_20_00_52/docs/tirtos/sysbios/docs/cdoc/ti/sysbios/knl/Task.html#stat