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.

Compiler/SM320F28335-HT: Does Call_Graph utility work with OFD2000 for stack usage?

Part Number: SM320F28335-HT

Tool/software: TI C/C++ Compiler

I read a thread on stack usage topic and learnt Call_Graph utility is able to work with OFD6x in C6000 to generate call graph with stack usage. When I tried with OFD2000 output with Call_Graph utility, error message indicates "No .debug_info sections found", but my project does compile with -g option. Does Call_Graph utility work with OFD2000? Or any extra compilation option required to allow Call_Graph utility to process OFD2000 output and generate call graph with stack usage?

Looking forward to hearing from you. Thank you very much in adavance.

  • Consider using the Stack Usage feature built-in to CCS.  Use the menu selection VIew | Stack Usage.

    If you still want to use the call_graph utility from the cg_xml package ... To see the documentation for the scripts in the package, load the file install_location/index.htm into your web browser.  Running any OFD based utility like call_graph requires running the OFD utility (ofd2000 in your case) on the executable .out file to create an XML file.  Then the utility uses the XML file as input.  By default, the debug information is not present in the XML.  It's very big.  However, a few utilities, including call_graph, require the debug information.  When that is the case, you have to use the -g option when running the OFD utility.  Here is a typical sequence ...

    % ofd2000 -x -g file.out > file.xml
    % call_graph file.xml > graph.txt

    If you don't use -g with ofd2000, then you see this diagnostic from call_graph ...

    Ming Ma1 said:
    "No .debug_info sections found"

    Thanks and regards,

    -George

  • Thanks, George,

    I was using OFD2000 from legacy CCS3. With newer version OFD2000 from CCS9 using the command as you recommended, I am able to get result from call_graph. Unfortunately, all nodes show wcs=0. It seems that I may need to compile original project with certain option such as CE_DEBUG or something.

    Currently, I am locked in Cl2000 compiler in legacy Code Composer Studio 3.3. Which version of code composer studio start to support this feature? I read from web, seem it requires Code Generator 6.1.2, and we use 5.1.2.

    Also, what compilation option I should use to generate trace for stack calculation?

  • Here is the part of the call_graph documentation which applies ...

      LIMITATIONS RELATED TO COMPUTING STACK DEPTH
        Older compiler versions, when building with -g, prevent computing the
        stack depth. If you build with a compiler version >= than those shown
        here, then this limitation does NOT apply to you.
    
         Device Family         Minimum Compiler Version
         -------------         ------------------------
         ARM                   4.6.0
         C2000                 5.2.0
         C6000                 7.0.0
         MSP430                3.1.0
    
        If you use an older compiler version, then none of the code can be built
        with the -g switch. If the code is built with -g, a call graph can still
        be built. But the stack depth information is inaccurate.

    So, if you use a C2000 compiler version older than 5.2.0 and you want to see stack depth numbers, then you cannot build with -g.

    Note the version of CCS does not matter, only the version of the compiler.

    Thanks and regards,

    -George

  • Thanks, George.

    Our compiler version is 5.1.2. Probably I may try to rebuild project with a newer version compiler. As you mentioned, it may be inaccurate in certain cases. I will double to confirm usage.