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.

CCS/CODECOMPOSER: .out file Variable extraction

Part Number: CODECOMPOSER


Tool/software: Code Composer Studio

Hi, 

is there a possibility to extract all global variables and there addresses and lengths from the compiler .out file (C2000 processor).

I need also the struct members and there types of global variables.

Thank You.

Best Regards

  • We have solutions for some of your requests, but not all of them.

    Tobias Ofenberger81 said:
    is there a possibility to extract all global variables and there addresses and lengths from the compiler .out file (C2000 processor).

    The utility nm2000 shows the addresses of all the global symbols.  We have no utility which shows the lengths of global variables.  However, for the narrower case of global variables that are const (which implies they are initialized), consider using the disassembler dis2000 with the option --all.  Both of these utilities are documented in the C2000 assembly tools manual.

    Tobias Ofenberger81 said:
    I need also the struct members and there types of global variables.

    The cg_xml package contains a utility named global_types_gen which shows the layout of all the structures and unions.

    Thanks and regards,

    -George

  • Hi George,

    thank you for your fast reply. 

    I have one more question: Where can I find a full documentation of the construction of the COFF .out file? I now this file:

    https://www.ti.com/lit/an/spraao8/spraao8.pdf?&ts=1589359897036

    Is there anywhere more documentation? E.g. where can I find the DWARF section inside the .out file? 

    With the DWARF section i could write a own parse function to get my needed addresses, offsets and section member informations.

    Thank you.

    Tobias 

  • Please see the article A Brief History of TI Object File Formats.

    Please understand that the C28x tools are undergoing the transition from COFF ABI (which uses the COFF object file format) to EABI (which uses ELF object file format).  I'm not sure when it will happen, but support for COFF ABI will eventually end.

    Tobias Ofenberger81 said:
    With the DWARF section i could write a own parse function to get my needed addresses, offsets and section member informations.

    It is possible.  But it would take a significant programming effort.

    Thanks and regards,

    -George

  • Sorry the link isn't working. 

    I know that this is a significant programming effort, but my colleague has allready programmed a DWARF parser for an .elf file. I want to add a support for a .out file of this .dll. I think this is not too much work, because the DWARF format is a standard? Therefore it is important for me to have a full documentation about the .out file. 

    Tobias  

  • Tobias Ofenberger81 said:
    Sorry the link isn't working. 

    I fixed it.  Please try again.  You'll see that we support Dwarf version 3, and are changing over to Dwarf version 4.

    Thanks and regards,

    -George