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.

How can I measure RAM,ROM and Stack utilization PER MODULE/FUNCTION

Dear Everybody ..

I'm working on a project on TMS320DM814x DaVinci™. Each core has many Software modules. I'd like to use CCS or any other way to measure how much RAM and Code size does each function and module exactly use ... I'd like to get worst-case analysis for Stack utilization for each function and module as well.

Thanks in advance

A.Shokry

  • Shokry,

    Without much effort you can analyze the text, data, bss, rodata and other relevant sections by looking at the map file generated for each binary. You might have to check stack size using a tool like CCS. 

  • how can CCS measure stack utilization .. any tips ??

    the map file gives RAM consumption per core, but I need RAM consumption per C-function .. any tips ?

    Thanks for your cooperation.

  • I'm not sure about the stack utilization to be measured from CCS. But what you can try is take the diff between the initialized value of stack pointer and try to find out the function where you find stack's value highest. But this will take some time to findout. I'm not sure, but can you check whether any profiling tools available in CCS for the same?

    You can use the same map file for finding out the text area consumed by the function, by checking the size of text section used by the function. Also if you spend some time, you can find other sections used by the functions/C file as well. Just explore the map file in detail. You'll get the required info.

    But what is your limitation w.r.t size of memory occupied by your code? What are you trying to figure out exactly. I'm asking this because memory size is not a constraint in case of DM81xx. Also even if you try hard, you can't save much of memory foot print by optimizing the code etc. Maximum to the tune of 1-2 MB of memory can be saved. But whereas if you change the logic of your application, much of the heap space can be saved. For e.g, reducing the number of buffers used for Video etc..

  • great .. I'll try this tip to find my goal .. I'm seeking RAM consumption to compare performance and for documentation purposes, not for optimization. Thanks a lot :)