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.

CG_XML tool Warnings

Hi,

I'm getting the following error while running call_graph.pl utility on ".out" file, created for TMS320TCI6487 processor (https://www-a.ti.com/downloads/sds_support/applications_packages/cg_xml/index.htm): 

 

 

Body of function "_BIOS_start" not found.  Spelling error?

Body of function "_CSL_intcGlobalDisable" not found.  Spelling error?

OK to call functions not in this module.

 

Not possible to compute worst case stack depth because information for function

"_BIOS_start" is not available.  Presuming frame size for

"_BIOS_start" is 0.

Not possible to compute worst case stack depth because information for function

"_CSL_intcGlobalDisable" is not available.  Presuming frame size for

"_CSL_intcGlobalDisable" is 0.

Not possible to compute worst case stack depth because information for function

"_CSL_intcGlobalRestore" is not available.  Presuming frame size for

"_CSL_intcGlobalRestore" is 0.

Not possible to compute worst case stack depth because information for function

"_CSL_intcInterruptDisable" is not available.  Presuming frame size for

"_CSL_intcInterruptDisable" is 0.

Not possible to compute worst case stack depth because information for function

"_CSL_intcInterruptEnable" is not available.  Presuming frame size for

"_CSL_intcInterruptEnable" is 0.

Not possible to compute worst case stack depth because information for function

"_CSL_intcGlobalEnable" is not available.  Presuming frame size for

"_CSL_intcGlobalEnable" is 0.

 

Could you let me know how to remove these warnings?

 

All these warnings are caused by DSP-BIOS and CSL libraries.

 

DSP-BIOS version: 5.33.03

CSL Version: csl_c6488_03.02.00.01

CG_XML version: 2.20.00

 

Regards,

Justin

 

  • Justin Antony G said:

    Body of function "_BIOS_start" not found.  Spelling error?

    Body of function "_CSL_intcGlobalDisable" not found.  Spelling error?

    OK to call functions not in this module.

    You don't show the exact invocation of call_graph and only some of the diagnostics, so this is an educated guess at what is going on.  You must be using multiple -i_cfg=file (or -i) options to specify configuration files, and you are running with --verbose (or -v).  The configuration files probably came with the BIOS and CSL libraries.   Those configuration files must contain lines like this ...

        _one_parent_function : _BIOS_start
        _another_parent_function : _CSL_intcGlobalDisable
    

    While I admit it is a bit hard to connect to what you have seen, the documentation does address this situation.  An index.htm file is in the root directory of the cg_xml install.  Load that into your favorite web browser, and you can eventually find this ...

     

    If you name a parent function for which there is no information on the main source of the function (i.e. declarations don't count), then you get a warning message and the parent function, and all the children listed, are ignored.

    If you name a child function for which there is similarly no information, you get a diagnostic. But, since this could legitimately occur in cases where you are processing only part of an application, or the routine is written in assembly, the child function is still entered in the call graph.

    The second paragraph applies to your situation.  While the configuration files indicate those functions are being called indirectly, call_graph is saying it cannot find any Dwarf debug information about those functions, and thus cannot say anything about how much stack those functions use.

    Justin Antony G said:

    Not possible to compute worst case stack depth because information for function

    "_BIOS_start" is not available.  Presuming frame size for

    "_BIOS_start" is 0.

    This is call_graph saying that it has seen calls to _BIOS_start.  (Yes, those calls are in the graph because of the configuration file, but that is not the only way this diagnostic comes up. ) However, no Dwarf debug information about the stack usage of _BIOS_start can be found, and thus call_graph cannot compute total stack usage.

    Thanks and regards,

    -George

     

     

     

     

  • Hi George,

    Thanks for your inputs.  I invoke the tool with command: 

    call_graph.pl --verbose <–i config_file> rel.xml > rel_call_graph.txt 

    I have created config file for functions (indirect calls) written by me.

    As "_BIOS_start" and other CSL calls are TI libraries, i do not know how to create "config_file" for these functions i.e the dependent child functions for these calls.

    I also do not know if CSL libraries and DSP-BIOS libraries are compliant to cg_xml format. Is there any config file available for these functions, as "c60_rts_indirect.txt", which is provided along with the cg_xml package?

    Regards,

    Justin

     

     

  • I'm confused.  The message "Body of function _BIOS_start" definitely arises from seeing _BIOS_start listed as a child function in a configuration file.  Yet it seems you are telling me that is not the case.  Please post your configuration file.

    Thanks and regards,

    -George

     

  • Hi George,

    I've attached the config file and the error log.

    Regards,

    Justin

     

     

  • Config File attached.

  • I suspect you have hit on a bug in call_graph.  However, I still cannot reproduce it.  I'd appreciate if you would post the .out file, or the .xml file.

    Thanks and regards,

    -George

     

  • Hi George,

    I'm not allowed to share this .out or xml file, as this is target binary image for our device. If you could find out any issue in call_graph.pl file, please let me know.

    Regards,

    Justin

  • I understand.  We can arrange things so that only I can see the file.  Would that be OK?

    Thanks and regards,

    -George

     

  • Hi George,

    I've created a test image. Please find attached the .out, xml and call_stack file. This is not a working image, but can still provide clue about some of DSP-BIOS calls such as "BIOS_START":

    Snapshot of log:

      _BIOS_start : wcs = ???

    The following functions are known to contain indirect function calls, but
    do not contain any information about those indirect calls in the configuration
    file specified with --i_cfg=file.  Run "perldoc call_graph.pl" for more
    information.
    ======================================================================
    _ECM_dispatch
    _EXC_exceptionHandler
    _EXC_external
    _EXC_internal
    _EXC_nmi
    _KNL_post
    _KNL_run
    _SEM_postEnterKnl
    _SYS_abort
    _SYS_exit
    _TSK_exit
    _TSK_setup
    __KNL_doTick
    __SEM_dopost
    __auto_init
    _c_int00
    Could you let me know how to get rid of these warnings?

    Regards,

    Justin

    Test_Image.zip
  • Justin,

    Thank you for posting a test case!

    Justin Antony G said:
      _BIOS_start : wcs = ???

    call_graph develops the call graph by processing the Dwarf debug information generated by the compiler.  When you see this, it means that call_graph did not find any Dwarf debug information about that function.  It cannot know the stack usage of that function, whether that function makes any calls, or the stack usage of those functions.  It may see calls to such a function.  But that is a different thing that seeing the function itself.

    Justin Antony G said:
    The following functions are known to contain indirect function calls, but
    do not contain any information about those indirect calls in the configuration
    file specified with --i_cfg=file.  Run "perldoc call_graph.pl" for more
    information.

    You can use perldoc to see the documentation if you have Perl installed.  If you don't, you can use the HTML documentation.  Load the file cg_xml_install_root/index.htm into your favorite web browser.  Click your way into the call_graph documentation.

    This is a list of functions that make indirect function calls.  Further, those functions do not have any information about them in a configuration file (such as your config_file_june5.txt).  So, the stack usage information reported by call_graph is incomplete in that the amount of stack used by these functions cannot be determined.

    This test case does not generated your earlier diagnostic: Body of function "_BIOS_start" not found.  So I still have no idea how that happened.

    Thanks and regards,

    -George