The Stack Usage shows for some functions "2028 of 2076 bytes used". But i cant find nowhere where the stack-size of 2076 is defined.
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.
The Stack Usage shows for some functions "2028 of 2076 bytes used". But i cant find nowhere where the stack-size of 2076 is defined.
To avoid misunderstandings, could you post a couple of screenshots showing the window you are getting this information from?
Could you show this for one of the examples in the SDK and it will be easier to track in the code what you are referring to.
The message is shown in the 'Stack Usage'-View in CCS if i hover over the displayed bar:
This is from my application where i have different tasks with different stack sizes. But i have no idea where the 'Stack Usage'-View gets it 'Reference-Value' of 2076 bytes. All my stack sizes are multiple of 1024 byte.
Regards
Jan
Hello Jan.
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.
Hope that helps
ki
The data in the Stack Usage view is generated using the OFD utility from the compiler (section 11.1 of the Assembly Language Tools User's Guide).
The data should be the same as generated by the call_graph utility of the CG XML package
The attached htm document (which comes with cg_xml) may help explain the data:
/cfs-file/__key/communityserver-discussions-components-files/156/call_5F00_graph.htm
Thanks
ki
2076 signifies the maximum system stack usage of your application. It is likely the wcs (worst case stack) depth (the maximum amount system stack memory used by that function and all the functions it calls) for the entry point function of the program (usually _c_int00). All the other functions in the view will show the wcs for it, in addition to a percentage of the maximum system stack usage.
Hence for your mainTaskRfFxn, it shows 2028 out of 2076. 2028 is the wcs value of mainTaskRfFxn. 2076 is the max stack usage by the system. 2028/2076 = 97%
Hope this helps
ki