how to find the stack usage in task?
i am using task_stat() function. how can i use this function in my task to calculate the stack usage for each function within the task.
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.
hussen said:how to find the stack usage in task?
i am using task_stat() function. how can i use this function in my task to calculate the stack usage for each function within the task.
Hi Hussen,
I'm going to move this to the BIOS forum. I think they will be able to help.
-Lori
TSK_stat() cannot be used to get stack usage for each function. It only provides total stack usage. I'll ping the compiler team to see if there are any tools to help with this.
Regards,
-Karl-
You could use the cg_xml utilities that use the OFD tool from the compiler. These will compute the Worst Case Stack usage for each function.
http://processors.wiki.ti.com/index.php/Code_Generation_Tools_XML_Processing_Scripts
Mark
You should use the cg_xml scripts which are available from the wiki page I listed:
http://processors.wiki.ti.com/index.php/Code_Generation_Tools_XML_Processing_Scripts
The base OFD utility is in the compiler directory for each ISA. For example, in your CCS4 directory, look for tools/compiler/c2000/bin/ofd2000.exe
Mark