Skip to content

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

Merged
maribu merged 2 commits into
RIOT-OS:masterfrom
mguetschow:pkg-mpaland-printf-stderr
Jun 9, 2026
Merged

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

Conversation

@mguetschow

@mguetschow mguetschow commented May 12, 2026

Copy link
Copy Markdown
Contributor

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

crasbe commented May 12, 2026

Copy link
Copy Markdown
Contributor

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

@riot-ci

riot-ci commented May 12, 2026

Copy link
Copy Markdown

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

@mguetschow
mguetschow requested review from maribu and removed request for maribu June 9, 2026 12:34
@maribu

maribu commented Jun 9, 2026

Copy link
Copy Markdown
Member

I wonder if we should just vendor in mpaland_printf at some point. I doubt that upstream will get any activity anymore anyway and reviews would be much easier when not having to review a patch to a patch 🤣

@maribu
maribu enabled auto-merge June 9, 2026 12:59
@crasbe

crasbe commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

I wonder if we should just vendor in mpaland_printf at some point. I doubt that upstream will get any activity anymore anyway and reviews would be much easier when not having to review a patch to a patch 🤣

Perhaps rather in RIOT-OS/mpaland_printf than in the main repository though 🤔

@maribu
maribu added this pull request to the merge queue Jun 9, 2026
Merged via the queue into RIOT-OS:master with commit 9a34d00 Jun 9, 2026
29 checks passed
@mguetschow
mguetschow deleted the pkg-mpaland-printf-stderr branch June 10, 2026 08:04
@mguetschow

Copy link
Copy Markdown
Contributor Author

Thanks! ❤️

@MrKevinWeiss MrKevinWeiss added this to the Release 2026.07 milestone Jul 15, 2026
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.

5 participants