This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: /dev/??? for assabet
- From: Jesper Skov <jskov at redhat dot com>
- To: ahgu at yahoo dot com
- Cc: ecos-discuss at sourceware dot cygnus dot com
- Date: 19 Nov 2001 10:57:12 +0100
- Subject: Re: [ECOS] /dev/??? for assabet
- References: <3BF5CD75.2030508@yahoo.com>
>>>>> "Andrew" == Andrew Xiang <ahgu@yahoo.com> writes:
Andrew> I try to dump the debug msgs(printf) to the serial port,
Andrew> just follow redboot. But how do I figure out the name? I
Andrew> tried /dev/tty0,1 also ser0,1, all with no luck.
Andrew> #include <cyg/io/io.h> #include <cyg/io/serialio.h> #include
Andrew> <cyg/error/codes.h> #include <stdio.h> int main(void) {
Andrew> cyg_uint32 length; Cyg_ErrNo error; char test_msg1[]="This is
Andrew> a test message!\n"; cyg_io_handle_t serial_port_handle; error
Andrew> = cyg_io_lookup("/dev/tty1", &serial_port_handle); if (error
Andrew> == ENOERR) { length = strlen(&test_msg1[0]);
Andrew> cyg_io_write(serial_port_handle, &test_msg1[0], &length);
Andrew> } printf("andrew xiang!\n"); return 0; }
To write to the GDB debug port, you should use diag_printf, not a
serial IO call.
Jesper