MSPM0G3507: Code Composer Studio produces different binaries depending on location of workspace

Part Number: MSPM0G3507

Tool/software:

My team is trying to collaborate on a firmware design using Code Composer Studio. Part of this collaboration requires us of all to be able to produce identical binaries when compiling code on different machines (or in a Docker container).

I've discovered that the binary produced is different depending on which machine it was compiled on even when CCS, GCC, and the MSPM0 SDK all have matching versions.  I ran an experiment by firing up a Docker container with a workspace that has a file path identical to that on my host machine.  The resulting binary was still different, but it had a lot more in common with the natively produced binary than it did when the workspace location was different.

With different workspace locations (note the red bar to the right)

Matching workspace location:

Why are details of the host machine making it into the output binary?


  • Hi Michael,

    Binaries can be different from machine to machine due to compiler flags, compiler versions, optimization levels, and the OS itself.

    -Matthew

  • I can produce different firmware on the exact same machine simply by changing the location of the workspace and/or the SDK on that machine. The file locations are somehow impacting the firmware.  It has nothing to do with OS, compiler version, etc.

    This is especially obvious when looking at the end of the binary which contains the file locations for all of the included SDK files.  If nothing else, I would consider it a security flaw to publish file structure information about the local machine to an embedded device that has no need to know that information.

    Why do absolute file locations have such an impact on output binaries?

  • Disregard. I didn't realize these were ELF files and not raw binary files. If I use objcopy to conver them, I get identical binary files.