IT lexicon › Programming › newlib

newlib

Programming På svenska → Updated: 2026-11-03

The C standard library for systems with no operating system, and the one bundled with nearly every ARM cross-compiler.

Cygnus Solutions assembled newlib in the early 1990s from freely licensed code of various origins, because glibc was too large and too GPL-bound for customers building firmware. Red Hat bought Cygnus in 1999 and still maintains it. It sits underneath arm-none-eabi-gcc and also forms the basis of Cygwin's C library.

The trick is that newlib knows nothing about the hardware. printf works, but bottoms out in a call to _write, and malloc asks for memory through _sbrk — functions the firmware developer must supply, usually in a file called syscalls.c. Forget them and you get linker errors with baffling names. For small parts there is newlib-nano, a slimmed variant in which printf no longer eats 20 KB of flash.

← Back to the lexicon