noc project
This project is inspired by projects like newlib, picolib, AVR-libc
However, design goals are different:
- Focused on embedded software for platforms with constraint resources
- Specifically avoid any OS integration within library, but rather require very limited set of functions
- Permissive license compatible with everything (so rewritten from scratch)
- Minimized third party dependencies
- C11 as development language
- Limited support of compilers, primarily clang and gcc
- UTF-8 only support for multibyte locale (TBD)
- Limited floating point support (TBD)
On x86_64 library includes platform adaptation for Linux which is used for testing. To run tests make test
Following variables are used:
ARCHdefines architecture class (x86_64, riscv32, aarch64, etc)TARGETdefines target triple to build (e.g. riscv32-unknown-unknown-elf)CCdefines compiler to use (e.g. /usr/bin/clang)CFLAGSdefine compilation flags forgccandclangCFLAGS_CLANGdefines compilation flags specific forclangCFLAGS_CLANG_LDdefines compilation flags specific forclangfor linkingCFLAGS_GCCdefines compilation flags specific forgccCFLAGS_GCC_LDdefines compilation flags specific forgccfor linkingARname ofarto use (e.g. /usr/bin/llvm-ar-15)OBJDUMPname ofobjdumpto use (e.g. /usr/bin/llvm-objdump-15)OBJDUMP_FLAGSspecific flags toOBJDUMPPLATFORM_SOURCESlist of platform specific sources to build for testsLD_SCRIPTspecifies platform specific linker script for tests
Currently only limited targets are configured as example: make ARCH=riscv32, make ARCH=aarch64
You can provide additional rules in Makefile.toolchain or call make with abovementioned variables configured for your target.
- sbrk() - allocate memory
- putnstr() - print buffer to console. can be implemented on top of putchar()
- stddef.h
- stdalign.h
- stdint.h
- stdbool.h
- stdarg.h
- x86_64 (Native and Linux hosted, for testing)
- RISC-V (both 32- and 64- bit)
- ARM (32- and 64- bit)
- GNU C 10+
- Clang 11+