pkg/mpaland-printf: Add alternative stdio as package #20664
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
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 asRPIu8
,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.Testing procedure
A test application has been added in
tests/sys/snprintf
. This will use the package ifnewlib
is used. It should pass, but removingMakefile.board.dep
(which pulls in thempaland-printf
package) should a failing test.Issues/PRs references
#20361