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.

CCSTUDIO: Discrepancy in Binary Size from Source Build vs. Released Binary

Part Number: CCSTUDIO

I've encountered an issue where building from a source repository yields a binary with a different size compared to the released binary, despite using the same compiler version. Upon comparing the source code folder with the release version, the only difference I could identify was in the .cproject file; all other files are identical. Could this variation in the .cproject file influence the output size, or might there be other factors at play? How can I ensure my build matches the released binary size?  I have attached the 2 ".cprojects". I didn't understand of 'IS_BUILTIN_EMPTY' in .cproject files.

  • Could this variation in the .cproject file influence the output size, or might there be other factors at play?

    Do not use a comparison of the .cproject to see why the output size is different. The .*project files have all sorts of metadata in there that do not impact the build.

    I will bring this thread to a compiler expert who can provide more suggestions regarding the different in the binaries.

    Thanks

    ki

  • What binary files are compared?  How do you compare them?  Please be very precise in your answers.  Copy and paste the text of the commands, and do not use a screenshot.

    Thanks and regards,

    -George

  • jinu.francis@UPR002329 MINGW64 ~/Documents/otmr-release_bin_vs_master_bin_after_build
    $ objcopy OTMR_release_build.out -O ihex release_build.hex

    jinu.francis@UPR002329 MINGW64 ~/Documents/otmr-release_bin_vs_master_bin_after_build
    $ objcopy OTMR_master_build.out -O ihex release_download.hex

    jinu.francis@UPR002329 MINGW64 ~/Documents/otmr-release_bin_vs_master_bin_after_build
    $ diff -s release_build.hex release_download.hex

    This is not identical.

  • For each build configuration, please submit the build log and the linker map file.  

    To create one build log ... Please rebuild the entire project.  One way to do that is to right-click on the name of the project and select Rebuild Project.  Then save the contents of the Console (not Problems) view to a text file.  Use the icon named Copy Build Log (older versions of CCS) or Save build log to file (newer versions of CCS).

    The linker map file is in the directory named after the build configuration.  It has a name similar to OTMR_release_build.map.  

    Please put those 4 files in a zip and attach it to your next post.

    Thanks and regards,

    -George

  • Hi, 

    I checked the map file, from that I got which version of compiler they build. using that version of compiler fixed my issue.