On Fri, 27 Feb 2009 11:58:05 +0100, Robert Brusa <[email protected]> wrote:

Hi
Following a recent update (Jan 09) of ecos from V2.0 to the "unstable" version and migration to the new gnutools arm-eabi of codesourcery, I run into a hanger of a printf statement:

void IsInitMode(void)
{
        static bool first = true;
        static unsigned long int t1, t0 = 0;    // time in units of 10 ms
        t1 = cyg_current_time();
if ( ( t1 - t0 > 600 * SEC2TICS ) || first) { // msg repeats every minute
                first = false;
                printf("\nstatus is INIT - manual help required");
                t0 = t1;
        }
} //end IsInitMode

No output appears on ser0 or ser1 and a breakpoint at t0 = is never reached.

When using diag_printf instead of printf, the message is output on ser1. My system is configured to use ser1 for diagnostics. In the earlier version, printf-output also appeared on ser1. I have digged somewhat into the problem, but no conclusion so far. I can see that the output (should?) go to stdiostream. Sometimes later it calls cyg_io_write, but the device-handle is zero. A configuration error? - but which? Thanks and regards
    Robert


Hi
well the problem persists. Meanwhile I have found (no, its not the stack!) that the thread calling printf crashes somewhere shortly after a call to flush_output_unlocked() on line 660 of stream.cxx. ???? Experts - please help, this printf involves quite a lot of stuff. I got the impression, that something (the stream?) is locked, although its not clear why. Could it be that it never succeeds unlocking and hence the thread gets blocked?
   Robert

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply via email to