Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No output from printf() in samples/02-stdio-hello with v16.3 #35

Closed
swausd opened this issue May 14, 2024 · 6 comments
Closed

No output from printf() in samples/02-stdio-hello with v16.3 #35

swausd opened this issue May 14, 2024 · 6 comments
Assignees
Labels

Comments

@swausd
Copy link

swausd commented May 14, 2024

With the current release v16.3 I get no output on hdmi screen from printf() in kernel.cpp, line 36, when running samples/02-stdio-hello. Output from fprintf() from line 37 is ok.
I get output as expected when using v16.2.

Using Raspi Zero 2 W, gcc 12.2.Rel1, 32 bit.
Am I missing some new configurations with circle step 46?

@smuehlst
Copy link
Owner

Hmm, that is interesting, but I won't be able to look into this before the weekend.

@smuehlst smuehlst added the bug label May 18, 2024
@smuehlst
Copy link
Owner

Reproduced the problem as described with a Raspberry Pi Zero:

  • With circle-stdlib v16.2 the sample 02-stdio-hello produces stdio output with printf() as expected.
  • With circle-stdlib v16.3 stdio output is missing, while stderr output still does appear on the screen.

@smuehlst smuehlst self-assigned this May 18, 2024
@smuehlst
Copy link
Owner

Also reproducible with a 64-bit build under QEMU.

@smuehlst
Copy link
Owner

smuehlst commented May 18, 2024

The problem is that stdout is for some reason no longer line-buffered. Adding a fflush(stdout) after printf(...) makes the text appear on the screen.

@smuehlst
Copy link
Owner

@swausd I committed a fix directly to the master branch and I will create a bugfix release later today. If you want to test the fix, please make sure that you also update the circle-newlib submodule where the fix was actually implemented.

@swausd
Copy link
Author

swausd commented May 19, 2024

Looks OK for me.
Thank you for the super quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants