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/TMS320F28335: Is there a way to patch the compiled binary files?

Part Number: TMS320F28335


Tool/software: TI C/C++ Compiler

The .out file created using CCS was made convert to an assembly file using OFD Utility.

In the assembly file, I inserted the assembly code in the middle.

In this case, the branch may go wrong when encountering a hard-coded call instruction because the executable code is pushed back from the inserted part.

So what I'm curious about is how can I regenerate the .out file using the compiler of the assembly file or .out file where the code is inserted?
I think it will be used as the term binary patch.

I am trying to load the patched binary file onto my TI board.

Thanks, Regards

Han

  • Han SeungJae said:
    The .out file created using CCS was made convert to an assembly file using OFD Utility.

    I think you mean you used the disassembler dis2000, and not the OFD utility ofd2000.  There is no way to get assembly code from the OFD utility.

    The main problem you face is that the disassembler is only designed to be a diagnostic tool.  The output is intended to be viewed by programmers, and not processed by the assembler.  We do not test the output of the disassembler by assembling it to see if it somehow matches the .out or .obj file that is disassembled.  

    That being the case, there is no way to add yet more code to the disassembly output, and then build it.

    In summary, there is unfortunately no method available for patching a compiled binary file.

    Thanks and regards,

    -George

  • Thanks for reply, George

    Han