Skip to content

pkg/mpaland-printf: do not silently drop printing to stderr#22282

Open
mguetschow wants to merge 2 commits into
RIOT-OS:masterfrom
mguetschow:pkg-mpaland-printf-stderr
Open

pkg/mpaland-printf: do not silently drop printing to stderr#22282
mguetschow wants to merge 2 commits into
RIOT-OS:masterfrom
mguetschow:pkg-mpaland-printf-stderr

Conversation

@mguetschow
Copy link
Copy Markdown
Contributor

@mguetschow mguetschow commented May 12, 2026

Contribution description

Instead print it using stdio_write. Now matching behavior of RIOT integration for newlib and picolibc.

Testing procedure

Apply the following diff:

diff --git a/examples/basic/hello-world/main.c b/examples/basic/hello-world/main.c
index c1fe9bae12..5f248626e9 100644
--- a/examples/basic/hello-world/main.c
+++ b/examples/basic/hello-world/main.c
@@ -22,7 +22,7 @@ int main(void)
 {
     puts("Hello World!");
 
-    printf("You are running RIOT on a(n) %s board.\n", RIOT_BOARD);
+    fprintf(stderr, "You are running RIOT on a(n) %s board.\n", RIOT_BOARD);
     printf("This board features a(n) %s CPU.\n", RIOT_CPU);
 
     return 0;

Run on any board where mpaland-printf is selected by default (because newlib is used) since #21438

make -C examples/basic/hello-world BOARD=nrf52840dk flash term -j

On master the second line is missing.

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • none

Instead print it using stdio_write. Now matching behavior of RIOT integration for newlib and picolibc.
@github-actions github-actions Bot added the Area: pkg Area: External package ports label May 12, 2026
@crasbe crasbe added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 12, 2026
@crasbe crasbe requested a review from maribu May 12, 2026 14:46
@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented May 12, 2026

You want to fix the same issue for native too? :D
See #21808.

@riot-ci
Copy link
Copy Markdown

riot-ci commented May 12, 2026

Murdock results

✔️ PASSED

eb0a8e2 pkg/mpaland-printf: do not silently drop printing to stderr

Success Failures Total Runtime
11108 0 11108 14m:17s

Artifacts

@mguetschow
Copy link
Copy Markdown
Contributor Author

You want to fix the same issue for native too? :D See #21808.

Saw it, but that's on the RIOT term tooling side, which I'd rather not touch now :)

@mguetschow
Copy link
Copy Markdown
Contributor Author

A note to the fellow reviewer: All my editors were applying consistent CRLF line endings as soon as I touched the file (as the original carries CRLF as well). I therefore first converted all LFs into CRLF in 75382c2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants