Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 2 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
8 years, 2 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 22 Sep 2016Even 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:
- https://github.com/ARMmbed/mbed-os/pull/2745
- https://github.com/ARMmbed/mbed-os/pull/2741
- https://github.com/ARMmbed/mbed-os/pull/2715
It will still needs some effort from the user to get rid of the IO subsystem:
- use of NDEBUG
- configure your application to not flush at exit (see there: https://github.com/ARMmbed/mbed-os/pull/2741)