Generated by GPT-5-mini| Newlib | |
|---|---|
| Name | Newlib |
| Developer | Cygnus Solutions; Red Hat; Howard Chu; Nick Clifton |
| Released | 1993 |
| Programming language | C, Assembly |
| Operating system | Embedded, RTOS, bare metal, Unix-like |
| License | Permissive |
Newlib is a C standard library implementation for embedded systems and cross-development that provides libc functionality, math routines, and system call stubs. It serves embedded projects, cross-compilers, and toolchains used with microcontrollers, microprocessors, and real-time operating systems. Newlib is commonly paired with GCC, LLVM, binutils, and debugging tools to support development on diverse platforms.
Newlib originated in the early 1990s at Cygnus Solutions to support cross-compilation for embedded targets alongside GCC. It evolved through contributions from vendors such as Red Hat and maintainers including Howard Chu and Nick Clifton, growing from efforts around Embedded Systems toolchains to broader use in projects tied to GNU Project toolchains and Free Software ecosystems. Newlib incorporated ideas from standard C libraries used in BSD variants and System V heritage while responding to needs from companies like Wind River Systems, ARM Holdings, and communities around Atmel, Microchip Technology, and STMicroelectronics. Over time Newlib’s role intersected with developments in LLVM, glibc alternatives, and specialized libc projects emerging from academic and corporate research into runtime performance, portability, and size optimization.
Newlib follows a modular architecture that separates the C library API from low-level system call glue and platform-specific I/O hooks used by toolchains built with GCC or Clang. Its design emphasizes small footprint and portability across architectures such as ARM, MIPS, PowerPC, RISCV, x86, and SPARC. The library exposes POSIX-like interfaces compatible with standards from ISO/IEC and drafts from the Open Group, while allowing integration with vendor kernels like FreeRTOS, VxWorks, Zephyr Project, and eCos. Newlib’s syscall layer is intentionally thin to facilitate adaptation to hypervisors like KVM, embedded monitors such as U-Boot, and bare-metal environments used by projects around Arduino, Raspberry Pi, and BeagleBoard.
Newlib provides implementations of the C standard library, parts of the C99 and C11 math libraries, and reentrant versions of I/O functions needed by threaded environments such as those using POSIX Threads or RTOS threading APIs. Key components include stdio, stdlib, string, time, and math modules with support for floating-point operations relevant to IEEE 754 and DSP cores from Texas Instruments and Analog Devices. Newlib supplies hooks for syscalls like _write, _read, _sbrk, and _open that allow integration with filesystem layers such as FatFS, LittleFS, or host-oriented interfaces like newlib's syscalls adaptations used in cross-development with GDB. It also provides locale stubs, reentrancy structures used in environments interfacing with POSIX-like subsystems, and optional networking stubs employed in implementations for stacks like lwIP and uIP.
Newlib is widely used in cross-compilation toolchains built around GCC, Binutils, and GDB for targets including embedded ARM Cortex-M, RISC-V cores, and legacy processors supported by OpenRISC and MIPS vendors. It integrates with toolchains from vendors such as Arm Ltd., SiFive, Microchip, and distributions maintained by Red Hat and third-party projects like Sourcery CodeBench. Newlib is also adopted in LLVM/Clang-based workflows and in SDKs for platforms like NVIDIA Jetson, Espressif Systems modules, and hobbyist boards supported by PlatformIO and Yocto Project layers. Cross-build environments commonly pair Newlib with build tools including CMake, GNU Make, and Autoconf scripts.
Newlib is distributed under permissive licensing that permits commercial and open-source use, enabling incorporation into proprietary SDKs and open-source RTOS distributions. Its development model uses public repositories and collaborative patch submission, with maintainers coordinating via mailing lists and hosting platforms inspired by projects like SourceForge and modernized by GitHub and GitLab workflows. Contributions come from corporate engineers at Red Hat, silicon vendors, and independent maintainers, with governance influenced by code review practices common to GNU Project-adjacent projects and industry-consortium toolchains.
Newlib is prominent in embedded systems ecosystems used by vendors and communities around ARM Cortex-M, RISC-V development boards, and microcontroller families from Microchip Technology, NXP Semiconductors, and STMicroelectronics. It is found in SDKs distributed by companies such as Espressif Systems and in academic projects at institutions like Massachusetts Institute of Technology and University of California, Berkeley where teaching toolchains favor portable libc implementations. Newlib’s lightweight nature makes it a default choice for RTOS integrations with FreeRTOS, Zephyr Project, and specialized stacks used in space and avionics projects by organizations like NASA and aerospace contractors that require deterministic runtime behavior.
Category:C standard library implementations