Some one told me that I can set the space zero first ,then build the program to see how much data is changed.But I dont know how to do this in CCSv5.1. Can someone tell me ?
Thanks very much for your attention.
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.
Some one told me that I can set the space zero first ,then build the program to see how much data is changed.But I dont know how to do this in CCSv5.1. Can someone tell me ?
Thanks very much for your attention.
Hi,
You would need to manually check for stack overflows using either DSP/BIOS analysis tools or debug watchpoints.
http://processors.wiki.ti.com/index.php/DSP_BIOS_Debugging_Tips#Cause:_Stack_overflow
http://processors.wiki.ti.com/index.php/Checking_for_Stack_Overflow
Regards,
Gautam
thanks for your reply.
I just want to know the stack space which the program actually use instead of stack overflows.
For example,I allocate 1M for stack ,but the program actually dont need so much.So I want to know how much space is enough for the program.
Regards,
Chunhai
In short you want to know your static usage as in:
To statically (i.e. without running the code) examine how much stack is needed, the call_graph tool from the cg_xml package can be used. http://processors.wiki.ti.com/index.php/Code_Generation_Tools_XML_Processing_Scripts
More information related to using the call_graph tool can be found here: http://processors.wiki.ti.com/index.php/Stack_issues#Finding_out_static_stack_usage
Regards,
Gautam
http://processors.wiki.ti.com/index.php/Stack_and_Heap_size_requirements
The general recommendation to determine amout of stack required is to fill the stack with a known value (can be done in linker command file by filling the .stack section), let the program run and see how much of the stack was altered by viewing it in a memory window. This should tell how much stack was used and accordingly, the stack size can be reduced or increased as needed.
but the page dont have the detail operations,so do you know how to do this.
thanks.
Are you using BIOS (TI-RTOS)? There is a tool there that can check the current stack usage.