Microlib equivalent in GCC

Asked by Pradeepa Senanayake

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

Language:
English Edit question
Status:
Answered
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#1

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.