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.

RM57L843: CCS Stack Usage View

Part Number: RM57L843

Hi,

My customer is evaluating RM57L and wants to check stack usage in their code.
Customer uses Stack Usage View in CCS.
https://software-dl.ti.com/ccs/esd/documents/ccs_stack_usage_view.html

Here is example of the snapshot.

As you can see, the yellow bar shows "488 out of 536 bytes used (91%)".
I understood 488 bytes are used and the upper limit is 536 bytes.
But it is not clear why the limit is 536bytes. In customer configuration, stack size is 2048.
Where does 536 bytes come from?

BTW, customer tried to increase the stack size to 3072, but it does not change anything.

Thanks and regards,
Koichiro Tashiro

  • Hi Koichiro-san,

    The Stack Usage view is a static view of the system stack, the information for which is generated during project build. It does not provide information on a per task basis.

    536 is the maximum system stack usage of your application. It is the worst case stack depth (the maximum amount system stack memory used by that function and all the functions it calls). 

    If you open the Memory Allocation view, you will see the stack size defined in your application (cmd file):

  • Hi QJ,

    The customer wants to know the defined stack size is enough or not.
    Are there any tools to check how much stack is actually used in runtime?

    Thanks and regards,
    Koichiro Tashiro

  • An estimation method is to allocate larger stack space, fill the stack with a sentinel value, then monitor how much you actually use during execution.