7 years, 7 months ago.

What is binary size of the stdio library accompanied with mbed?

What is binary size of the stdio library accompanied with mbed?

-Hemant

1 Answer

7 years, 7 months ago.

It entirely depend of the C library used:

  • GCC: 544 bytes of static RAM + 1024 bytes of dynamic RAM / 20K of Flash
  • ARMCC: 2K of static RAM and 14.6K of Flash
  • IAR: 620 bytes of static RAM and 8868K of Flash.

Thanks Vincent for precise answer. I am using GCC for offline build. But then I have further question. For a simple blinky program, the bin size is less than 20KB, using online compiler. After exporting the same program with "GCC ARM Embed" for off-line compilation, the generated bin file size is more than 44KB. So why is there so much difference? Does it mean exported program, by default, adds the C library, but online compiler doesn't include the library?

posted by Hemant Joshi 22 Sep 2016

Even if you not use it directly, the IO subsystem is still there: I've made a series of pull request over the mbed-os tree to fix this issue:

It will still needs some effort from the user to get rid of the IO subsystem:

posted by Vincent (pan-) Coubard 22 Sep 2016