Comtrol eCos User Manual
Page 387

Chapter 17. How to Write a Driver
-c: Output data on console instead of via GDB.
-n: No GDB.
The normal way to use it with GDB is to start the filter:
$ ser_filter -t 9000 com1 38400
In this case, the filter will be listening on port 9000 and connect to the target via the serial port
COM1
at 38400 baud.
On a UNIX host, replace "
COM1
" with a device such as "
/dev/ttyS0
".
The
-t
option enables tracing which will cause the filter to describe its actions on the console.
Now start GDB with one of the tests as an argument:
$ mips-tx39-elf-gdb -nw install/tests/io_serial/serial3
Then connect to the filter:
(gdb) target remote localhost:9000
This should result in a connection in exactly the same way as if you had connected directly to the target on the
serial line.
(gdb) c
Which should result in output similar to the below:
Continuing.
INFO:
<
BINARY:16:1!
>
PASS:
<
Binary test completed
>
INFO:
<
BINARY:128:1!
>
PASS:
<
Binary test completed
>
INFO:
<
BINARY:256:1!
>
PASS:
<
Binary test completed
>
INFO:
<
BINARY:1024:1!
>
PASS:
<
Binary test completed
>
INFO:
<
BINARY:512:0!
>
PASS:
<
Binary test completed
>
...
PASS:
<
Binary test completed
>
INFO:
<
BINARY:16384:0!
>
PASS:
<
Binary test completed
>
PASS:
<
serial13 test OK
>
EXIT:
<
done
>
If any of the individual tests fail the testing will terminate with a
FAIL
.
With tracing enabled, you would also see the filter’s status output:
The
PING
command sent from the target to determine the presence of the filter:
[400 11:35:16] Dispatching command PING
[400 11:35:16] Responding with status OK
Each of the binary commands result in output similar to:
[400 11:35:16] Dispatching command BINARY
283