This packs the stdio implementation from [1] as alternative to what the used standard C lib provides with the intent to provide a thread-safe, smaller, and more feature-complete alternative on newlib targets. Compared to `newlib_nano` this reduces `.text` by a bit more than 200 B while adding support for standard format specifiers such as `RPIu8`, `PRIu16`, `PRIu64`, `%z`, and `%t`. Note that `newlib_nano`'s stdio can be thread-safe in reentrant mode at the cost of RAM (per thread) and latency. Especially the increase in latency can be prohibitive when real time requirements need to be met. [1]: https://github.com/mpaland/printf
919 B
@defgroup pkg_mpaland-printf mpaland's printf @ingroup pkg @brief mpaland's printf implementation is a lean, thread-safe and feature-complete printf implementation
License
Licensed under the MIT license.
Usage
Add USEPKG += mpaland-printf to the application's Makefile or compile
using USEPKG=mpaland-printf make BOARD=<BOARD> -C <APP_DIR>.
Features
The package implements all standard format specifiers. However, support for floating point is disabled by default due to the immense ROM overhead on MCUs without FPU.
@note Support for floating point formatting can be enabled
via the printf_float module, i.e., by adding
USEMODULE += printf_float to the application's Makefile.
@note Support for non-standard format specifiers such as needed for
printing from flash on AVR MCUs are not implemented.