-
Notifications
You must be signed in to change notification settings - Fork 62
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
Request printf() to multitask environment #14
Comments
Hi @nopnop2002 |
Thank you for reply. |
PR is Pull Request. |
I understood what is PR. |
Actually the C runtime library is not "thread-safe". When you use a shared resource, like the serial interface you use for printf() output, you have to provide your own locking/mutex mechanism to prevent this kind of issues. And I think it might go even worse than that when multiple tasks use an MCU peripheral: the HAL framework has its "lock" mechanism but I don't know how it performs with an RTOS. |
Thanks comment. |
Yes but ESP is RTOS oriented while STM32 core not |
Thanks. |
My environment:
Arduino-IDE(Ver1.8.5) + stm32duino + nucleo F103RB
Source code:
When i used prinf(),Indication is confused.
When i used _print(),Indication is not confused.
The text was updated successfully, but these errors were encountered: