1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
12 >The Console Device</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="eCos Synthetic Target"
23 HREF="hal-synth-arch.html"><LINK
25 TITLE="The I/O Auxiliary's User Interface"
26 HREF="synth-gui.html"><LINK
29 HREF="synth-syscalls.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
71 HREF="synth-syscalls.html"
82 NAME="SYNTH-CONSOLE">The Console Device</H1
90 >The console device -- Show output from the eCos application</DIV
94 NAME="SYNTH-CONSOLE-DESCRIPTION"
99 >The eCos application can generate text output in a variety of ways,
100 including calling <TT
107 >. When the I/O auxiliary is enabled
108 the eCos startup code will instantiate a console device to process all
109 such output. If operating in text mode the output will simply go to
110 standard output, or to a logfile if the <TT
114 line option is specified. If operating in graphical mode the output
115 will go to the central text window, and optionally to a logfile as
116 well. In addition it is possible to control the appearance of the main
117 text via the target definition file, and to install extra filters for
118 certain types of text.
121 >It should be noted that the console device is line-oriented, not
122 character-oriented. This means that outputting partial lines is not
123 supported, and some functions such as <TT
130 > will not operate as expected. This
131 limitation prevents much possible confusion when using filters to
132 control the appearance of the text window, and has some performance
133 benefits - especially when the eCos application generates a great deal
134 of output such as when tracing is enabled. For most applications this
135 is not a problem, but it is something that developers should be aware
139 >The console device is output-only, it does not provide any support for
140 keyboard input. If the application requires keyboard input then that
141 should be handled by a separate eCos device package and matching
148 NAME="SYNTH-CONSOLE-INSTALL"
153 >The eCos side of the console device is implemented by the
154 architectural HAL itself, in the source file
158 >, rather than in a separate device
159 package. Similarly the host-side implementation,
163 >, is part of the architectural HAL's
164 host-side support. It gets installed automatically alongside the I/O
165 auxiliary itself, so no separate installation procedure is required.
171 NAME="SYNTH-CONSOLE-TDF"
174 >Target Definition File</H2
177 HREF="synth-running.html#SYNTH-RUNNING-TDF"
178 >target definition file</A
180 can contain a number of entries related to the console device. These
181 are all optional, they only control the appearance of text output. If
182 such control is desired then the relevant options should appear in the
195 CLASS="PROGRAMLISTING"
196 >synth_device console {
203 >The first option is <B
206 >, used to control the
207 appearance of any text generated by the eCos application that does not
208 match one of the installed filters. This option takes the same
209 argument as any other filter, for example:
218 CLASS="PROGRAMLISTING"
219 >synth_device console {
220 appearance -foreground white -background black
227 >Any number of additional filters can be created with a
231 > option, for example:
240 CLASS="PROGRAMLISTING"
241 >synth_device console {
243 filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
250 >The first argument gives the new filter a name which will be used in
252 HREF="synth-gui.html#SYNTH-GUI-TEXT"
255 should be unique. The second argument is a Tcl regular expression. The
256 console support will match each line of eCos output against this
257 regular expression, and if a match is found then the filter will be
258 used for this line of text. The above example matches any line of
259 output that begins with <TT
263 to the eCos infrastructure's tracing facilities. The remaining options
264 control the desired appearance for matched text. If some eCos output
265 matches the regular expressions for several different filters then
266 only the first match will be used.
272 NAME="SYNTH-CONSOLE-TARGET-CONFIG"
276 Configuration Options</H2
278 >There are no target-side configuration options related to the console
285 NAME="SYNTH-CONSOLE-ARGUMENTS"
288 >Command Line Arguments</H2
290 >The console device does not use any command-line arguments.
296 NAME="SYNTH-CONSOLE-HOOKS"
301 >The console device does not provide any hooks.
310 >Additional Tcl Procedures</H2
312 >The console device does not provide any additional Tcl procedures that
313 can be used by other scripts.
321 SUMMARY="Footer navigation table"
332 HREF="synth-gui.html"
350 HREF="synth-syscalls.html"
360 >The I/O Auxiliary's User Interface</TD
366 HREF="hal-synth-arch.html"