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 global_types_gen for cgtools 20.12.0 and ELF format?



Hi,

we are using the tool global_types_gen.exe from cg_xml 2.61.00 ().

Version 2.61.00 is from 05/2018.

This does not work for out-files generated with newer compilers (20.12.0) and ELF format.

Are there any plans to update the cg_xml tools?

Are there any alternatives to extract variables and types from out-files?

Thanks,
Stephan

  • StephanS said:
    This does not work for out-files generated with newer compilers (20.12.0) and ELF format.

    Please show the commands you run, and all the system response, when you create the XML from the out files, and then process that XML with global_types_gen.  Please copy and paste the text, and do not use a screen shot.

    Thanks and regards,

    -George

  • The compiler call (20.12.2) is (example only for main.c)

    cl2000 Main.c -v28 --float_support=fpu32 --fp_mode=relaxed --cla_support=cla2 --define=_CLA_ --vcu_support=vcu0 --tmu_support=tmu0 --c_src_interlist --aliased_variables --no_rpt --opt_for_speed=4 --quiet --issue_remarks --display_error_number --verbose_diagnostics --gen_func_subsections -i"c:\ti33\c2000\cgtools_20_12_0\include" --emit_warnings_as_errors --abi=eabi -o2

    The linker call is
    lnk2000 --output_file=main.out obj_files.lkf

    with obj_files.lkf:
    main.obj
    -stack 0x300                                  
    -l"rts2800_fpu32_fast_supplement_eabi.lib"    
    -l"rts2800_fpu32_eabi.lib"                           
    -l"F021_API_F28004x_FPU32.lib"         
    -lSFO_v8_fpu_lib_build_c28_eabi.lib                                    
    --entry_point=code_start                            
    --diag_suppress=10063                            
    --abi=eabi                                                      
    DSP28004x_Periph_Registers.cmd       
    DSP28004x_Memory.cmd                                                 
    --priority                                                                      
    --reread_libs                                                                 
    --quiet                                                                           
    --rom_model                                                                     
    --warn_sections                                                             
    --emit_warnings_as_errors                                         
    --map_file=main.map
    --mapfile_contents=sym_defs                                      

    The ofd call is
    ofd2000.exe --dwarf --verbose --xml --output=main.xml main.out

    It creates the xml, no other output, no errors.

    The global_types_gen call (2.61.00) is:
    global_types_gen.exe main.xml 1>main_global_types_gen.xml

    It creates the file, but this only contains

    -------------------------------------------


    Global Data Types for main.out
    -----------------

    Structure Data...(sizes in Minimum Addressable Data Units)

    -------------------------------------------

    So it is more or less empty.

    If we do the same for non-EABI, it works.
    Since EABI seems to be the future format, we need to be able to extract variable names and structures from EABI as we do now for non-EABI.

    Regards,
    Stephan

  • Stephan,

    George is having power issues so it may be a day or so before he is able to reply.

    Regards,

    John

  • Thank you for the additional information.  I am able to reproduce the same result.

    At this point, it appears to be a problem with global_types_gen.  The best way forward is not clear.  I need to have some discussions with a few other people, and then I'll get back to you.  I expect to be able to give you some kind of update tomorrow.

    Thanks and regards,

    -George

  • I have found a workaround.  It works on small test cases.  I'm confident it will work for you.  But the only way to know for sure is to try it.

    When you compile your C code, add this build option: --symdebug:dwarf_version=3 . Please let me know if this workaround resolves the problem.

    Explanation ... When you build with --abi=eabi, the default version of Dwarf is version 4.  Dwarf version 4 encodes the type information in a way that global_types_gen does not handle.  I will file an issue against global_types_gen.

    Thanks and regards,

    -George

  • Hi George,

    yes, that worked for me. Thanks for the help!

    Regards,

    Stephan