I often find myself relying on console output to debug code. I am starting up in using safeRTOS for some multitask work, but I have discoverd that printf seems to be poisonous to safeRTOS and safeRTOS is poisonous to printf. Shutting off the scheduler before a call to printf and then turning it back on again seems to prevent corruption of CIO, but It will also shut off the scheduler. Is there a "task-safe" method of getting information to the console>
Would a critical section do the job, or would it suffer corruption on tasks with sufficient priority to interrupt it.
What is the intent of the ustdlib.c? is it supposed to be interrupt safe?
Thank you for the help
Hello team,
Is there an update available to this customer's inquiry?
Regards,
Michael
Michael S.
ACSC Digital Apps
i = 0; while ( i < sizeof ( g_pul_TaskStack ) / 4 ) { g_pul_TaskStack [ i ] = 0x55555555; i += 1; }
then, in the console when you tell it to analyze the stack
lp = &g_pul_TaskStack [ 0 ];
j = sizeof ( g_pul_TaskStack );
k = 0;while ( k < ( j / 4 ) && *( lp + k ) == 0x55555555 ) { k += 1; } usprintf ( Buf, "Len=%4d, Used=%4d, Free=%4dr\n", j, j - ( k * 4 ), ( k * 4 ) );