tree: d4cfea08b7418ef43bf27935470bc78c2d5fcef6 [path history] [tgz]
  1. freestanding/
  2. bitfield.c
  3. bitfield.h
  4. log.c
  5. log.h
  6. macros.h
  7. memory.c
  8. memory.h
  9. meson.build
  10. mmio.c
  11. mmio.h
  12. print.c
  13. print.h
  14. print_test.cc
  15. README.md
  16. stdasm.h
sw/device/lib/base/README.md

libbase, the OpenTitan Standard Library

This subtree provides headers and libraries known collectively as libbase, which serve as OpenTitan's ersatz libc.

Differences from a libc

libbase is not a libc, even though it implements a number of libc symbols, and should not be used as such. libbase is, rather, a place for base libraries which may need to make use of more compiler/platform intrinsics than average, in order to present a safe, stable, and uesful interface that other parts of OpenTitan can rely on.

In general, a library exposing general utilities for working close to the hardware should live in this subtree: for example, a library providing memcpy and related symbols. A library for talking to a particular peripheral, like a UART port, is a non-example.