The target definition file – Comtrol eCos User Manual
Page 755
Running a Synthetic Target Application
the current standard output. Specifying
-l
causes most of the text to go into a logfile instead, although some
messages such as errors generated by the auxiliary itself will still go to stdout as well.
-t
<
file
>
,
--target
<
file
>
During initialization the I/O auxiliary reads in a target definition file. This file holds information such as which
Linux devices should be used to emulate the various eCos devices. The
-t
option can be used to specify which
target definition should be used for the current run, defaulting to
default.tdf
. It is not necessary to include
the
.tdf
suffix, this will be appended automatically if necessary.
-geometry
<
geometry
>
This option can be used to control the size and position of the main window, as per X conventions.
The I/O auxiliary loads support for the various devices dynamically and some devices may accept additional com-
mand line arguments. Details of these can be obtained using the
-h
option or by consulting the device-specific
documentation. If an unrecognised command line argument is used then a warning will be issued.
The Target Definition File
The eCos application will want to access devices such as
eth0
or
/dev/ser0
. These need to be mapped on to
Linux devices. For example some users may all traffic on the eCos
/dev/ser0
serial device to go via the Linux
serial device
/dev/ttyS1
, while ethernet I/O for the eCos
eth0
device should be mapped to the Linux ethertap
device
tap3
. Some devices may need additional configuration information, for example to limit the number of
packets that should be buffered within the I/O auxiliary. The target definition file provides all this information.
By default the I/O auxiliary will look for a file
default.tdf
. An alternative target definition can be specified on
the command line using
-t
, for example:
$ bridge_app --io -t twineth
A
.tdf
suffix will be appended automatically if necessary. If a relative pathname is used then the I/O auxiliary
will search for the target definition file in the current directory, then in
~/.ecos/synth/
, and finally in its install
location.
A typical target definition file might look like this:
synth_device console {
# appearance -foreground white -background black
filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
}
synth_device ethernet {
eth0 real eth1
eth1 ethertap tap4 00:01:02:03:FE:06
## Maximum number of packets that should be buffered per interface.
## Default 16
#max_buffer 32
## Filters for the various recognised protocols.
## By default all filters are visible and use standard colours.
filter ether
-hide 0
#filter arp
-hide 1
651