[ECOS] turn off diag_printf?

Dave Milter davemilter@gmail.com
Tue Oct 6 07:34:00 GMT 2009

I used arm cpu from at91 family and its DBGU channel for working with redboot.

When my application starting it used dbgu for diag_printf and also
ordinary printf working via
this channel, now I want interrupt driven IO via this DBGU serial
port, but only after full initialization.

So I want such scheme:
redboot - diag_printf working

ecos app:
- initialization - diag_printf working
- main function is called - diag_printf working
- somehow switch off diag_printf - now it nothing print to DBGU port (1)
- interrupt driven IO via DBGU port is activated

I have problem with (1), how should I do it?

I find such code:

    CYGACC_COMM_IF_CH_DATA_SET(*comm, &at91_ser_channels[0]);
    CYGACC_COMM_IF_WRITE_SET(*comm, cyg_hal_plf_serial_dbg_write);
    CYGACC_COMM_IF_READ_SET(*comm, cyg_hal_plf_serial_dbg_read);
    CYGACC_COMM_IF_PUTC_SET(*comm, cyg_hal_plf_serial_dbg_putc);
    CYGACC_COMM_IF_GETC_SET(*comm, cyg_hal_plf_serial_dbg_getc);
    CYGACC_COMM_IF_CONTROL_SET(*comm, cyg_hal_plf_serial_dbg_control);
    CYGACC_COMM_IF_DBG_ISR_SET(*comm, cyg_hal_plf_serial_dbg_isr);
    CYGACC_COMM_IF_GETC_TIMEOUT_SET(*comm, cyg_hal_plf_serial_dbg_getc_timeout);

if I replace in this code function like cyg_hal_plf_serial_dbg_write
with empty functions,
diag_printf stop send something to DBGU?

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

More information about the Ecos-discuss mailing list