Picolibc: A C Library for Smaller Systems
summary
A compact C library forked from newlib that targets tiny microcontrollers (tested on 32–128 KB ROM, 4–32 KB RAM), replaces newlib stdio with an AVR-libc style implementation, drops libgloss, and eliminates the 656-byte __reent by using thread-local storage so TLS variables only link when needed. Build uses an overlay meson build system, math uses Ryu conversions to avoid malloc, startup/linker scripts and semi‑hosting are provided, tests run under QEMU/kwemu across ARM, AArch64, RISC‑V and x86 and the CI builds 1,121 times with 1,026 test runs.
AI-written summary · about
chapters (25)
- 0:00Intro
- 0:40Small System Considerations
- 1:28Embedded Libc Needs
- 2:14Developer First Steps
- 3:59newlib concerns
- 8:35Math code
- 10:50stdio
- 13:53Thread Local Storage
- 15:11Example Startup Code (crto)
- 16:59Linker script
- 19:18Testing
- 21:28Test Status
- 23:45Recent Picolibc Work
- 25:04hello.c
- 26:28Compiling
- 27:13Size of hello.elf
- 27:31Running on hardware
- 27:55Running under qemu
- 28:26Using the float printf code
- 29:15Comparing sizes (cortex m3)
- 30:02Blinky Lights!
- 30:34Projects with picolibc support
- 33:44RIOT
- 36:06Personal Projects
- 38:32Picolibc Aspirations
related talks
42mpicolibc: a C library for small 32-bit systems
47mUsing Picolibc in Embedded Systems
47mUsing Picolibc in Embedded Systems
32mOpen Source C/C++ Embedded Toolchains Using LLVM
06mCompile-time Initialization & Build Library for Composing Modular Firmware
45mFil-C: memory safety with fanatical C/C++ compatibility
36muClibc Today: Still Makes Sense
46molibc: Another C Runtime Library
