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.

Hard coded paths in output binary



I am using CCS5.2 with compiler 7.3.7 and was wondering how to compile the code without hard coded path information being embedded into the code. The issue becomes a problem in that I cannot create a binary with the same CRC value from two different computers unless the path to the source code is identical.

This code is compiled and then utilities used to create a ROM part in Intel hex format with a computed CRC value added to the end of the ROM space. Early compilers (CCS v3.1) did not hard code the paths to source files in the generated code. Why is it doing it now?

If I check the box to make relocatable code then I get a linker error because the 21-bit DP relative addressing is exceeded. How can I get the code generated without the hard coded path information. This hard coded information should not be in the ouput, especially if I select the Release build mode (no debug information).

Any help would be appreciated.

  • The compiler does not put any file or directory path information in the target memory parts of the object files, only in the debug information.  So, the compiler is not the reason for your problem.

    How is your CRC computed?  Are you sure it is not somehow including the debug sections?

    It is possible some other element of your build (BIOS, Codec Engine, etc.) is adding paths.  

    Thanks and regards,

    -George 

  • Ok, if it is not the compiler then it must be the linker  or make file (auto generated by CCS5.2) or some other part of the TI tool chain because the paths show up in the .out file.  The 32-bit CRC we use has been used for several years with CCS3.1 compiler/linker with no issues. Don't use the TI BIOS and verified that --symdebug:none is used.

    Like I said previously, the paths are not in the .out file with the CCS3.1 compiler and we are using the same code base to try and compile with the CCS5.2 and compiler 7.3.7.

  • The compiler does include directory paths in the debug information, thus they are present in the .out file.  But they are not present in any part of the .out file which is part of the target memory image.

    What do you see which makes you think that directory paths are somewhere in the target memory image?

    Thanks and regards,

    -George

  • I used a hex viewer and looked at both the .out file and the converted ROM binary image file that is to put into FLASH.  In addition, I took the second computer and made the build paths identical. The CRC's then matched.

    I inserted a file called PathInBinary.html that has the output file from a comparison program called Beyond Compare (used the hex viewer). If you scroll about half way down you can see in the middle of the screen where the hex code is converted to ascii that the source file paths are there (D:\.....).

     

  • I thought of another way to go about diagnosing this problem.  Use objdiff.exe from the cg_xml package to compare two .out files that should be the same, but aren't.  By default, this utility ignores all the debug sections and other meta-data in the .out file, and compares only the information relevant to the target image.  That will point you to where the difference arises.  Please give it a try and let me know what it shows you.

    Thanks and regards,

    -George