* [ECOS] Serial Testing Problems!
@ 2001-08-08 9:06 Chris C.
2001-08-08 10:49 ` Jonathan Larmour
0 siblings, 1 reply; 5+ messages in thread
From: Chris C. @ 2001-08-08 9:06 UTC (permalink / raw)
To: ecos-discuss
Hi
I have modified the serial.c in the \ecos\examples. I use it to test the
serial read/write for the EB40. Part of the code is shown below:
cyg_io_handle_t handle;
Cyg_ErrNo err;
const char test_string[] = "serial example is working correctly!\n";
cyg_uint32 len = strlen(test_string);
unsigned char buffer[16];
int len1;
printf("Starting serial example\n");
err = cyg_io_lookup( "/dev/ser1", &handle );
if (ENOERR == err) {
printf("Found /dev/haldiag. Writing string....\n");
err = cyg_io_read(handle, &buffer[0], &len1);
err = cyg_io_write( handle, test_string, &len );
}
I used insight to debug and I found that the function "cyg_io_write" will
call the device driver function "at91eb40_serial_putc" but the
"cyg_io_read" had not call the "at91eb40_serial_getc". Why?
Also, there are some testing programs in the io\serial but some of the
programs need ser_filter to run. Where can I find it?
Does eCos have any testing programs that are used to test the serial device
driver[read/wirte]? [the testing program will not share the serial port
with GDB]
Thanks! :D
----------------------------------------------------
Chris
_________________________________________________________________________
Sure, you can have free email. But free Email, Voicemail and Faxmail?
Check it out at http://www.2bzd.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Serial Testing Problems!
2001-08-08 9:06 [ECOS] Serial Testing Problems! Chris C.
@ 2001-08-08 10:49 ` Jonathan Larmour
2001-08-09 1:02 ` Jesper Skov
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Larmour @ 2001-08-08 10:49 UTC (permalink / raw)
To: Chris C.; +Cc: ecos-discuss
"Chris C." wrote:
>
> Hi
>
> I have modified the serial.c in the \ecos\examples. I use it to test the
> serial read/write for the EB40. Part of the code is shown below:
>
> cyg_io_handle_t handle;
> Cyg_ErrNo err;
> const char test_string[] = "serial example is working correctly!\n";
> cyg_uint32 len = strlen(test_string);
> unsigned char buffer[16];
> int len1;
>
> printf("Starting serial example\n");
>
> err = cyg_io_lookup( "/dev/ser1", &handle );
>
> if (ENOERR == err) {
> printf("Found /dev/haldiag. Writing string....\n");
> err = cyg_io_read(handle, &buffer[0], &len1);
> err = cyg_io_write( handle, test_string, &len );
> }
>
> I used insight to debug and I found that the function "cyg_io_write" will
> call the device driver function "at91eb40_serial_putc" but the
> "cyg_io_read" had not call the "at91eb40_serial_getc". Why?
Dunno, sorry. No immediate reason I can think of. Note the function name is
at91_serial_getc though.
> Also, there are some testing programs in the io\serial but some of the
> programs need ser_filter to run. Where can I find it?
In the host tools: cvs co ecos/host
You can build the host tools with "./configure ; make"
> Does eCos have any testing programs that are used to test the serial device
> driver[read/wirte]? [the testing program will not share the serial port
> with GDB]
This is what ser_filter is designed to solve - you run ser_filter and tell
it which serial port to use. You then connect from GDB to a TCP port
provided by ser_filter.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Serial Testing Problems!
2001-08-08 10:49 ` Jonathan Larmour
@ 2001-08-09 1:02 ` Jesper Skov
2001-08-09 8:53 ` Jonathan Larmour
0 siblings, 1 reply; 5+ messages in thread
From: Jesper Skov @ 2001-08-09 1:02 UTC (permalink / raw)
To: Jonathan Larmour; +Cc: Chris C., ecos-discuss
>>>>> "Jonathan" == Jonathan Larmour <jlarmour@redhat.com> writes:
>> Also, there are some testing programs in the io\serial but some of
>> the programs need ser_filter to run. Where can I find it?
Jonathan> In the host tools: cvs co ecos/host
Jonathan> You can build the host tools with "./configure ; make"
I'm not sure that'll work. Autoconf for ser_filter was (IIRC) disabled
due to some conflicts with the other host tools which I didn't have
time to sort out.
I think it's still possible to invoke make in the
host/tools/ecostest/unix directory and have it DTRT - but it's a long
time since I tried it last, so it may require some hand holding.
Jesper
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Serial Testing Problems!
2001-08-09 1:02 ` Jesper Skov
@ 2001-08-09 8:53 ` Jonathan Larmour
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Larmour @ 2001-08-09 8:53 UTC (permalink / raw)
To: Jesper Skov; +Cc: Chris C., ecos-discuss
Jesper Skov wrote:
>
> >>>>> "Jonathan" == Jonathan Larmour <jlarmour@redhat.com> writes:
>
> >> Also, there are some testing programs in the io\serial but some of
> >> the programs need ser_filter to run. Where can I find it?
>
> Jonathan> In the host tools: cvs co ecos/host
>
> Jonathan> You can build the host tools with "./configure ; make"
>
> I'm not sure that'll work. Autoconf for ser_filter was (IIRC) disabled
> due to some conflicts with the other host tools which I didn't have
> time to sort out.
>
> I think it's still possible to invoke make in the
> host/tools/ecostest/unix directory and have it DTRT - but it's a long
> time since I tried it last, so it may require some hand holding.
Works straight off for me, although I didn't test the resulting executable.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Serial Testing Problems!
2001-08-09 8:53 Chris C.
@ 2001-08-10 9:55 ` Jonathan Larmour
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Larmour @ 2001-08-10 9:55 UTC (permalink / raw)
To: Chris C.; +Cc: ecos-discuss
"Chris C." wrote:
>
> >> Also, there are some testing programs in the io\serial but some of
> >> the programs need ser_filter to run. Where can I find it?
>
> Jonathan> In the host tools: cvs co ecos/host
> Jonathan> You can build the host tools with "./configure ; make"
>
> I tried to build the host tools but there were some errors .Can anyone give
> me the ser_filter? (I use Win2000, Cygwin)
Actually you may already have a binary in the tools/bin subdirectory of
wherever you installed eCos.
> When will eCos call the function 'at91_serial_getc' (at91_serial.c)? Does
> cyg_io_read call it?
Eventually, via serial_read in io/serial.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-08-10 9:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-08 9:06 [ECOS] Serial Testing Problems! Chris C.
2001-08-08 10:49 ` Jonathan Larmour
2001-08-09 1:02 ` Jesper Skov
2001-08-09 8:53 ` Jonathan Larmour
2001-08-09 8:53 Chris C.
2001-08-10 9:55 ` Jonathan Larmour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).