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/TMS320C6748: Save flash memory area as COFF file by using CCS memory save utillity

Part Number: TMS320C6748
Other Parts Discussed in Thread: TMS320F28335

Tool/software: Code Composer Studio

I connected the simulator for the firmware as in the link below, and I can dump the desired area using the Memory save utility.

http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/CCSv4/Demos/MemorySave_Load.htm

The selected memory area is downloaded as a COFF file.

When the corresponding file is opened with the IDA reverse engineering analysis tool, it is recognized as a binary file rather than a COFF file.

I can't seem to convert it to a COFF file, is there a solution?

Thanks, Regards

Han

  • Hello,

    What version of CCS are you using?

    Thanks

    ki

  • Hello, Ki

    I am using CCS version 7.4.0

    Thanks,

    Han

  • the memory export to COFF seems to work for me with CCSv7.4. Can you provide the generated file? It can be of any memory range, I just want to study the format for the file.

    Thanks

    ki

  • Thanks for the answer, Ki

    I deliver multiple files converted to COFF file to you.

    The dumped memory is expected to be part of the flash memory area.

    Thanks, Regards

    Q.zip

    Han

  • Looking at the files in the zip, both seem to specify COFF format. How is it determined that is a binary format?

    Thanks

    ki

  • my reply was late, Ki.

    When I build the source code of the existing LED BLINK project, .out file is created.

    When the file is opened with IDA analysis tool, it is recognized as a COFF file as shown below.

    However, .out files using the memory save utility are recognized only as binary files.

    I'm not sure if this makes a big difference, but the LED BLINK works on the TMS320F28335 board and has the source code.

    The .out file I provided to you was created using the memory save utility.

    It does not have the source code, and it uses the JTAG simulator to extract the memory area of the 320C6748 module.

    IDA seems to have the capability to analyze C28x processes except C674X.
    Could you please introduce me to some good material for analyzing COFF files?
    I want to see what values it contains and what it does.

    Thanks, Regards

    Han

  • Han SeungJae said:
    However, .out files using the memory save utility are recognized only as binary files.

    I don't know much about the IDA tool. However, TI's ofd tool recognizes both *.out files generated from the memory save tool as COFF:


    OBJECT FILE: Question_1.out

    Object File Information

    File Name: Question_1.out
    Format: TI-COFF Version 2
    File Type: executable file
    Time Stamp: Wed Jun 10 07:50:57 2020
    Machine: TI C6x
    Machine Endian: little endian
    Entry Point: 0x00000000
    Vendor: Texas Instruments, Inc.
    Tool Version: 0.0.0
    Number of Sections: 2
    File Length: 92274806
    Symbol Table File Offset: 0x05800046
    String Table File Offset: 0x05800046
    TI-COFF f_flags: 0x0000010f
    TI-COFF f_flag: F_RELFLG (relocation info stripped)
    TI-COFF f_flag: F_LNNO (line numbers stripped)
    TI-COFF f_flag: F_LSYMS (local symbols stripped)
    CPU Generation: C6200
    Control Data Endian: little endian

    Section Information

    id name load addr run addr size align alloc
    -- ---- --------- -------- ---- ----- -----
    1 .data 0x60000000 0x60000000 0x1800000 1 Y
    2 .data 0x64000bc2 0x64000bc2 0x4000000 1 Y

    ---


    OBJECT FILE: Question_2.out

    Object File Information

    File Name: Question_2.out
    Format: TI-COFF Version 2
    File Type: executable file
    Time Stamp: Wed Jun 10 02:59:31 2020
    Machine: TI C6x
    Machine Endian: little endian
    Entry Point: 0x00000000
    Vendor: Texas Instruments, Inc.
    Tool Version: 0.0.0
    Number of Sections: 1
    File Length: 25165894
    Symbol Table File Offset: 0x01800046
    String Table File Offset: 0x00000000
    TI-COFF f_flags: 0x0000010f
    TI-COFF f_flag: F_RELFLG (relocation info stripped)
    TI-COFF f_flag: F_LNNO (line numbers stripped)
    TI-COFF f_flag: F_LSYMS (local symbols stripped)
    CPU Generation: C6200
    Control Data Endian: little endian

    Section Information

    id name load addr run addr size align alloc
    -- ---- --------- -------- ---- ----- -----
    1 .data 0x60000000 0x60000000 0x1800000 1 Y

    ---

    Note that a *.out file generated by the compiler would have additional symbolic information needed by the debugger for debug visibility. Perhaps the IDA tool is looking for that information. The information in the COFF file generated from the memory save utility has only minimal information. It really is just a basic memory dump in the COFF file format.

    Han SeungJae said:
    Could you please introduce me to some good material for analyzing COFF files?

    Check out section 9.1 of the below document:

    https://dev.ti.com/tirex/explore/node?node=ADpVeiBUkz9KK.W-OSIpsA__FUz-xrs__LATEST

    I used this utility to generate the information about the COFF files you provided.

    Thansk

    ki