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.

TMDSEVM6678: Is there any way to access stack call in TMDSEVM6678LE module ?

Part Number: TMDSEVM6678
Other Parts Discussed in Thread: TMS320C6678

hi All,

I have inherited a pretty large  C/C++ code (20K lines) and I am responsible to port the code to a TMDSEVM6678LE ... The are some statements which allocate too much memory and I need to identify them.

I can simply add a wrapper to Memory_allocate and Memory_free so that I can produce logs for large memory allocations but I need to access the name of the function calling (caller function) the Memorry_allocate and Memory_free.  

Is there any way to access stack call in  TMDSEVM6678LE module to accomplish this? 

Please let me know,

  • Hi,

    I'm not sure if I understood your question correctly. You want to trace who is calling into Memorry_allocate() and Memory_free() functions. The simplest way is to setup a break-point at the entrance of the two functions. Then the CPU will halt there, you can see the call trace in the CCS Debug view (where you connect DSP, load and run).

    Of course, there may be multiple callers, you need run, halt, run, halt .... multiple times to trace all of them.

    Regards, Eric

  • Thanks for your response.

    I just meant if I can access call stack trace inside a wrapper function ( wrapper for memory_alloc/free) just to be able to track down which part of my code allocates more memory.

    Eg. Each time memory_alloc/free is called, I can log the call stack trace and the size of the memory allocated.

    I know boost c++ library for example allows this for PC application so at runtime, I can print call stack trace.

    I am not sure though if that's possible for DSP TMS320C6678 and how if yes.

    Please let me know.

    Regards

  • Hi,

    You can use printf to print how many bytes are requested, but no info for the call trace. 

    Regards, Eric