Forum Discussion
Altera_Forum
Honored Contributor
21 years agonew printf features?
First, some background. I am using MicroC/OS-II and one of my tasks (the start task, if it matters) does the following:
for (;;)
{
OSTimeDly(OS_TICKS_PER_SEC * 2);
printf("CPU Usag...
Altera_Forum
Honored Contributor
21 years agoThis looks like a stack overflow to me. How large is the stack for this task?
The standard printf uses a surprisingly large amount of stack space (at least 1.5kB) - ticking the small printf option makes it use less. I don't remember there being any deliberate changes to printf, but the compiler was upgraded between 1.0 and 1.1 (and with it the newlib implementation of printf) so that might have increased the stack usage enough to tip your task over the edge.