Microlib equivalent in GCC

Asked by Pradeepa Senanayake on 2014-06-19

I have been working with Keil and used there 'microlib' when compiling my projects. But later I decided to move to Linux and open toolchains due to code size limitations and better flexibility.

Now all the project has been setup in Linux environment to use the arm-none-eabi- toolchain.

The problem is that same project I compiled using Keil and arm-none-eabi-gcc differs in size.

Keil it's aroung 70K and here it's around 200K. It's a massive overhead.

I assume that this is because stdlib eats up more resources compared to microlib.

Does GCC has something lightweight which supports malloc, printf, etc. like microlib?

Thank you

Question information

English Edit question
GNU Arm Embedded Toolchain Edit question
No assignee Edit question
Last query:
Last reply:

Hi Pradeepa,

The toolchain comes with two C libraries: newlib and newlib-nano. As its name suggests, newlib-nano is a low-footprint version of newlib. Have you tried using it? To use it, link with --spec=nano.specs

Best regards.

Can you help with this problem?

Provide an answer of your own, or ask Pradeepa Senanayake for more information if necessary.

To post a message you must log in.