pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • PebbleOS
  • Mobile App
  • Examples
  • Index 01
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

PebbleOS

  • Overview
  • Start here
    • Getting started guide
  • Pebble Firmware
    • Overview
    • Playground
    • Application SDK
  • Development
    • The pbl CLI
    • Build system
    • Samples
    • Emulator and simulator
    • Testing
    • Debugging
    • Conventions
  • System
    • Architecture overview
    • Kernel
    • Drivers
    • Subsystems
    • Libraries
      • C library
      • Utilities
      • Bluetooth utilities
      • Fuel gauge
      • Kraepelin
      • van Hees
      • Shared definitions
    • Third-party
  • Hardware
    • Boards
    • Board Add-ons
    • Programmers
  • Community
    • Contribution Guidelines
  • Reference
    • Reference
    • Kconfig options

C library

PebbleOS links against a standard C library chosen at build time. lib/c connects it to the kernel: its locks are kernel mutexes, its heap is the kernel’s, as it may not grow one of its own, and assert(), like the assertions of the utilities, logs and stops the system. With CONFIG_CONSOLE_STDOUT, printf() writes to the console.

Directory

lib/c

Kconfig

C library choice, always built

C libraries

C library

Kconfig

Picolibc, the default: smallest, from the toolchain or third_party/picolibc

CONFIG_LIBC_PICOLIBC

Newlib, complete but largest

CONFIG_LIBC_NEWLIB

Newlib nano, with a C99 printf linked ahead of its own

CONFIG_LIBC_NEWLIB_NANO

The host’s, on native boards

CONFIG_LIBC_HOST

Generated from PebbleOS 12b6c531f. This page is maintained in the pebbleos repository: docs/libraries/c.md.