I noticed that if I use printf in a task it uses around 200 bytes of stack (I check that with vTaskList()). I also implemented printf-stdarg.c but it makes no difference at all. the biggest problem is that, if I make stack owerflow with printf it is not detected, but if I make stack overflov by making big array it is detected.
Does anyone know where problem might be ?
If you overflow the stack with printf, then level 1 checking will only see the problem if your task switches during the call to printf, while with an array in the task, if you switch any time in that function.
level 2 checking can work better, but depending on what you do, the printf might not overwrite the check bytes, but only stuff past them, so the overflow might not get detected.
Thanks for your reply, using level 2 checking solved the problem.