Skip to main content
William Huang
Associate II
Apr 23, 2018 5:14 PM UTC
Question

Different binary sizes when building

Posted on April 23, 2018 at 19:14

HI there,

This isn't a question related to ST products, but I'm just curious about something that I started noticing. I am developing my project on Atollic TrueSTUDIO, and when I build the project using the CDT Manged builder, it prints out the size information. I also have a makefile that builds the project as well. I run the makefile under Cygwin and have it print the size information, and the size is different from what was reported by Atollic. I also tried the exact same makefile under MSYS, and the size is also different from both the Cygwin build and the Atollic build. In all cases, the difference in size are just a few bytes.

The project still functions normally (from what I see so far), but I just find weird (and maybe worrisome) that the build sizes are all different.

I was wondering if anyone else has seen this and if they know anything about it? Thanks.

    This topic has been closed for replies.

    3 replies

    AvaTar
    Senior III
    Apr 23, 2018 5:33 PM UTC
    Posted on April 23, 2018 at 19:33

    Different toolchains (compiler, linker) or different settings, usually.

    Probably the latter in your case.

    You could compare the effective build commands in both cases.

    William Huang
    Associate II
    Apr 23, 2018 7:59 PM UTC
    Posted on April 23, 2018 at 19:59

    If comparing builds in cygwin and MSYS, I am using the same makefile and some toolchain (arm-atollic-eabi-), so the settings are the same, atleast from a makefile stand-point.

    AvaTar
    Senior III
    Apr 24, 2018 7:32 AM UTC
    Posted on April 24, 2018 at 07:32

    Are the sources all the same, including startup code ?

    All linked libraries are identical ?