Library / SDK
picolibc/picolibc avatar
picolibc/picolibc

Picolibc for resource-constrained C applications

picolibc - a C library designed for embedded 32- and 64- bit systems.

1,666 stars318 forksCNOASSERTION

At a glance

What is it?
Picolibc provides standard C library APIs for embedded 32-bit and 64-bit systems, with particular attention to limited RAM, portable TLS, narrow I/O interfaces, and bare-metal startup support. It is a practical fit when a conventional hosted libc is too broad or imposes ABI constraints that make embedded integration difficult.
Who is it for?
Picolibc is appropriate for embedded C projects that need standard library APIs, low RAM use, and support for common embedded architectures. It is less suitable for teams requiring a documented one-command installation, POSIX functionality beyond the documented device interface, or startup and linker scripts that exactly match a custom board without modification.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 7, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • picolibc/picolibc1,666 ★ · +11
Star history
Repository2026-10-162026-11-07
picolibc/picolibc1.7k1.7k

11 Stars in the last 22 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Picolibc's embedded libc problem

Picolibc targets a specific constraint that is easy to overlook when selecting a C library for an embedded product: the target may have a working compiler and standard C interfaces, but very little RAM and an operating-system layer that does not resemble a desktop or Linux system. The project supplies standard C library APIs for small embedded systems with limited RAM. Its intended users are therefore C developers building software for constrained 32-bit and 64-bit devices, including bare-metal targets and systems that provide only device-level I/O.

The library was formed from code in Newlib and AVR Libc, but it is not simply a renamed copy of either project. The README says that Picolibc has been reformatted and restructured to make the code easier to read and maintain. It also states that Picolibc is designed and tested for embedded systems, while Newlib development has historically focused substantially on Cygwin and the ABI stability constraints associated with that environment.

That distinction matters for API and ABI work. Picolibc says it has used its embedded focus to improve interfaces for embedded systems without the same Cygwin compatibility constraints. The repository also includes libc, libm, libdl, libos, picocrt, test, documentation, and architecture-related build directories. This is a library project with broad system-level scope, not a small formatting library or a single embedded utility.

How Picolibc handles stdio, TLS, and architecture boundaries

The most distinctive design choice is the boundary between the C library and the underlying system. For standard input, output, and error streams, Picolibc does not require POSIX functions. Its documented requirement is narrow: the target must provide the ability to get and put single characters. The stdio implementation can be built on that interface while avoiding a broad dependency on a hosted operating-system API.

Picolibc also avoids internal allocation in its stdio implementation and is designed to use a minimal amount of RAM. These properties are useful when memory budgets are fixed at build time or when allocation behavior would make failure analysis difficult. The trade-off is that an application that expects file descriptors, rich POSIX streams, or a full POSIX environment may need more integration than the basic device interface provides.

Thread-local storage is handled differently from implementations that allocate a large object containing every possible thread-specific value. Picolibc uses the compiler's TLS support and allocates only the per-thread storage required by the API the application calls. The README gives `errno` as a typical example, where the application may use only four bytes for it. Architecture-specific TLS setup is supplied as `tls.c` under the relevant machine directory when available.

Architecture-specific work is also explicit. Supporting a new architecture requires libc machine files, including `setjmp` and `longjmp` support, and potentially startup code under `picocrt/machine/_architecture_`. Mathematical routines may require `libm/machine/_architecture_` additions. Atomic support for `ungetc` must be checked, and the atomic size must be configured in `libc/include/stdio.h` because the build system does not automatically detect it. This makes the design less magical and more dependent on correct target configuration.

Meson builds and supported processor targets

Picolibc uses a Meson-based build system. The README describes this as a way to avoid conflicts with Newlib's Autotools files and also notes that the library builds quickly. The repository contains `meson.build`, `meson_options.txt`, `CMakeLists.txt`, `cmake/`, and cross-compilation-related files. The presence of both Meson and CMake files is worth noting, but the README excerpt does not give a complete command sequence for either build system, so a build recipe should not be inferred from file names alone.

The documented architecture list is broad for a library aimed at embedded targets. It includes ARC in 32-bit and 64-bit forms, ARM, i386, MIPS, MSP430, Nios II, OpenRisc, Power9, Renesas RX, RISC-V, SparcV8, SuperH, Xtensa ESP32, and others. The project distinguishes architectures with integrated testing from those that have build infrastructure and continuous build validation but lack integrated testing. Microblaze, Sparc64, Xtensa ESP8266, and Xtensa LX106 appear in that second group.

This distinction should affect adoption decisions. A listed architecture does not necessarily mean that every library feature has the same test coverage. Integrated testing is explicitly described as part of patch validation, while the additional architectures have build validation but no integrated testing. For a production device, the missing integration path is a concrete reason to inspect `cross-_gcc-triple_.txt`, `do-_architecture_-configure`, and `run-_architecture_` for the selected target.

Bare-metal startup, semihosting, and QEMU validation

Picolibc includes bare-metal startup code and linker scripts for many architectures. The README presents them as a basis for writing application-specific startup code and linker scripts, not as a guarantee that they match every board. That wording is important. Memory layouts, interrupt setup, vector tables, stack placement, and device addresses are often board-specific, so a target that merely uses the same processor family may still require substantial customization.

The startup pieces under `picocrt/` support the creation of bare-metal test binaries. The documented architecture work includes QEMU scripts such as `run-_architecture_`, with ARM and RISC-V identified as examples for understanding how the cross-compilation configuration invokes them. This gives maintainers a repeatable route for running tests under emulation, although it does not prove that a user's physical board behaves identically.

Picolibc also documents built-in semihosting support for many architectures. It is intended to use existing `gdb`, `OpenOCD`, and QEMU semihosting facilities for debugging output, including situations where a serial port is not yet available. Semihosting is a development and diagnostic path, not a replacement for the device I/O implementation required by the final application. Its availability depends on the selected architecture and the relevant toolchain or emulator support.

A first-use tutorial without inventing build commands

The README excerpt does not provide installation commands, a package name, a supported package manager, or a minimal application example. Therefore, there is no verified command sequence that can be reproduced safely here. The repository's `hello-world/` directory and `doc/` directory are the concrete places to inspect for a first example, while the homepage listed by the repository is https://keithp.com/picolibc.

A first integration should begin by selecting the exact architecture and checking whether it has integrated testing. Then inspect `cross-_gcc-triple_.txt`, `meson_options.txt`, and the matching `libc/machine/_architecture_` and `picocrt/machine/_architecture_` directories. If the application uses TLS, confirm that the architecture supplies `tls.c`. If it uses floating-point math or formatting beyond integer output, inspect the relevant `libm` support and test the desired behavior on the target.

The first real use should be a small program that exercises the narrow character interface required by stdin, stdout, and stderr, then compare its behavior with the board's actual startup and linker setup. The documentation names `getc` and `putc` as the underlying interface.

Picolibc licensing and upgrade implications

Picolibc does not have one simple license label. The README says that source comes from many copyright holders and license texts, with code originating largely from Newlib. It states that the GPL-related pieces used to build the library are absent and that the remaining source uses BSD-like terms, including 2-clause and 3-clause BSD as well as older licenses with similar terms.

Two categories require separate attention. `test/printf-tests.c` and `test/testcases.c` are licensed under GPL version 2 or later. `GeneratePicolibcCrossFile.sh` is licensed under AGPL version 3 or later and is described as a helper for people building the library, not something Picolibc otherwise uses. The file `COPYING.picolibc` contains the current copyright and license information in Debian's machine-readable format. A team should inspect that file and the individual files included in its build rather than treating the repository's displayed license classification as sufficient evidence.

The project is not archived, and the last push was on 2026-10-16. Recent releases include 1.8.12 on 2026-08-01, 1.8.11 on 2026-01-27, and 1.8.10 on 2025-04-17. The README does not describe an upgrade compatibility policy, so migration costs cannot be inferred from the release list. In particular, architecture configuration, startup scripts, linker scripts, and atomic-width settings should be checked when moving between releases.

Picolibc versus Newlib and host libc assumptions

Newlib is the most direct alternative named by the README. Picolibc includes Newlib-derived code, but its stated focus is embedded 32-bit and 64-bit systems rather than the Cygwin use case that constrains Newlib's ABI work. Picolibc also adopts a narrower underlying I/O contract, no internal stdio allocation, compiler-backed TLS, Meson builds, and bare-metal startup support. A Newlib-based project may therefore remain preferable when its existing ABI, build system, and tested host integration are already established.

A host libc is a different choice rather than a direct substitute. Hosted environments generally assume more operating-system services than Picolibc's documented `getc` and `putc` requirement. That makes a host libc unsuitable as a simple drop-in choice for a minimal embedded target, but it can be appropriate for development hosts or systems that already require POSIX APIs.

The practical boundary is integration effort. Picolibc can simplify an embedded port by reducing the required OS interface and RAM use. It can also require more work when the board needs exact startup behavior, a custom linker script, unverified architecture support, or APIs outside the narrowly documented device interface. The choice depends on which side of that boundary the device falls on.

Editorial conclusion

Picolibc is appropriate for embedded C projects that need standard library APIs, low RAM use, and support for common embedded architectures. It is less suitable for teams requiring a documented one-command installation, POSIX functionality beyond the documented device interface, or startup and linker scripts that exactly match a custom board without modification. The first checks should be the target architecture directory, atomic width configuration, required OS services, and the licensing of any files selected during the build.

Frequently asked questions

What is Picolibc used for?

Picolibc provides standard C library APIs for small embedded 32-bit and 64-bit systems, especially targets with limited RAM. Its documented design includes low-overhead stdio, compiler-backed TLS, and bare-metal startup support.

Does Picolibc support embedded architectures?

The README lists ARM, RISC-V, MIPS, MSP430, ARC, Xtensa ESP32, and several other architectures. It distinguishes architectures with integrated testing from those with build infrastructure and continuous build validation but no integrated testing.

How does Picolibc handle standard input and output?

Picolibc does not require POSIX functions for stdin, stdout, or stderr. The underlying system needs to provide only the ability to get and put single characters, while the stdio implementation avoids internal allocation and uses a minimal amount of RAM.

Official sources

  1. Issues
  2. picolibc/picolibc on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/picolibc-picolibc.svg)](https://hysenlabs.com/projects/picolibc-picolibc)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/picolibc-picolibc.svg)](https://hysenlabs.com/projects/picolibc-picolibc)

Was this useful?