Not working in freertos, are you sure it's threadsafe?
mttbx opened this issue · 3 comments
I use this function in freertos. It makes freertos stucked in one task(thread, can't switch to other tasks). And when I call osDelay, it returns osErrorISR.
I can assure you, that printf is perfectly threadsafe. It's heavily used and tested under freertos without any problems (in both preemption modes).
I think you have to check the stack size of your tasks, printf needs a configurable amount of size on the stack. If your task stack is not big enough, your freertos might crash, depending on your system config. Your mileage may vary.
@mttbx : You should also check actual output function, it may be not thread safe/callable from ISR context ...
Thank you! I closed my issue because I found I may think it the wrong way.