3 ms·
Embedded is a PIA, its not web development and shouldn't be treated as such. Printf isn't re-entrant, and they are calling it from multiple threads. There are
by not_the_fda 2y ago
Embedded is a PIA, its not web development and shouldn't be treated as such.
Printf isn't re-entrant, and they are calling it from multiple threads.
There are solutions with trade offs:
https://interrupt.memfault.com/blog/printf-on-embedded https://interrupt.memfault.com/blog/printf-on-embedded
Everything in embedded is a tradeoff of space, performance, or cost.
If you come at it as web development with IO you are going to have a very bad time.
- whiw 2y ago> Printf isn't re-entrant, and they are calling it from multiple threads. This! Simple schedulers generally only allow system calls (such as printf) from the main thread. If you really want to 'print' from a child thread then send a message to the main thread, asking that it prints the message contents on on behalf of the child thread.