EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Standard C library alternatives to newlib.

Started by robostanley November 26, 2012
I have been using the GNU Tools for ARM Embedded Processors for almost a year now on Cortex-M3 parts and I have been pretty happy with it. When using the same tools on smaller Cortex-M0 parts such as the LPC11U24, I have found that I have to be very careful what features I end up pulling in from newlib since it can use up valuable kilobytes. In many cases, the best solution has been just to remove the dependency on the standard C library but for those cases where this isn't an ideal solution, I was wondering if there are alternatives to newlib that you knowledgeable folks would recommend?

Thanks so much for your help!

An Engineer's Guide to the LPC2100 Series

> I have been using the GNU Tools for ARM Embedded Processors for almost a
> year now on Cortex-M3 parts and I have been pretty happy with it. When
> using the same tools on smaller Cortex-M0 parts such as the LPC11U24, I
> have found that I have to be very careful what features I end up pulling
> in from newlib since it can use up valuable kilobytes. In many cases, the
> best solution has been just to remove the dependency on the standard C
> library but for those cases where this isn't an ideal solution, I was
> wondering if there are alternatives to newlib that you knowledgeable folks
> would recommend?

There are two elements to this:

The first is that you need to provide runtime support for the compiler, e.g.
64-bit integer division. This you can do by constructing yourself something
from compiler-rt or equivalent (by extracting whatever newlib uses).

The second is the support, and extent, for the C API. This is harder, and
depends what you need. I don't have a suggestion for this--typically
commercial vendors will provide a small-footprint library as part of their
value proposition. If vendors don't do this, then you need to question what
value they add. :-)

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
SolderCore Development Platform http://www.soldercore.com


Memfault Beyond the Launch