OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [synth/] [arch/] [v2_0/] [doc/] [synth-console.html] - Blame information for rev 562

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
<!-- Copyright (C) 2002 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.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>The Console Device</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Synthetic Target"
20
HREF="hal-synth-arch.html"><LINK
21
REL="PREVIOUS"
22
TITLE="The I/O Auxiliary's User Interface"
23
HREF="synth-gui.html"><LINK
24
REL="NEXT"
25
TITLE="System Calls"
26
HREF="synth-syscalls.html"></HEAD
27
><BODY
28
CLASS="REFENTRY"
29
BGCOLOR="#FFFFFF"
30
TEXT="#000000"
31
LINK="#0000FF"
32
VLINK="#840084"
33
ALINK="#0000FF"
34
><DIV
35
CLASS="NAVHEADER"
36
><TABLE
37
SUMMARY="Header navigation table"
38
WIDTH="100%"
39
BORDER="0"
40
CELLPADDING="0"
41
CELLSPACING="0"
42
><TR
43
><TH
44
COLSPAN="3"
45
ALIGN="center"
46
>eCos Synthetic Target</TH
47
></TR
48
><TR
49
><TD
50
WIDTH="10%"
51
ALIGN="left"
52
VALIGN="bottom"
53
><A
54
HREF="synth-gui.html"
55
ACCESSKEY="P"
56
>Prev</A
57
></TD
58
><TD
59
WIDTH="80%"
60
ALIGN="center"
61
VALIGN="bottom"
62
></TD
63
><TD
64
WIDTH="10%"
65
ALIGN="right"
66
VALIGN="bottom"
67
><A
68
HREF="synth-syscalls.html"
69
ACCESSKEY="N"
70
>Next</A
71
></TD
72
></TR
73
></TABLE
74
><HR
75
ALIGN="LEFT"
76
WIDTH="100%"></DIV
77
><H1
78
><A
79
NAME="SYNTH-CONSOLE">The Console Device</H1
80
><DIV
81
CLASS="REFNAMEDIV"
82
><A
83
NAME="AEN435"
84
></A
85
><H2
86
>Name</H2
87
>The console device &nbsp;--&nbsp;Show output from the eCos application</DIV
88
><DIV
89
CLASS="REFSECT1"
90
><A
91
NAME="SYNTH-CONSOLE-DESCRIPTION"
92
></A
93
><H2
94
>Description</H2
95
><P
96
>The eCos application can generate text output in a variety of ways,
97
including calling <TT
98
CLASS="FUNCTION"
99
>printf</TT
100
> or
101
<TT
102
CLASS="FUNCTION"
103
>diag_printf</TT
104
>. When the I/O auxiliary is enabled
105
the eCos startup code will instantiate a console device to process all
106
such output. If operating in text mode the output will simply go to
107
standard output, or to a logfile if the <TT
108
CLASS="OPTION"
109
>-l</TT
110
> command
111
line option is specified. If operating in graphical mode the output
112
will go to the central text window, and optionally to a logfile as
113
well. In addition it is possible to control the appearance of the main
114
text via the target definition file, and to install extra filters for
115
certain types of text.
116
    </P
117
><P
118
>It should be noted that the console device is line-oriented, not
119
character-oriented. This means that outputting partial lines is not
120
supported, and some functions such as <TT
121
CLASS="FUNCTION"
122
>fflush</TT
123
> and
124
<TT
125
CLASS="FUNCTION"
126
>setvbuf</TT
127
> will not operate as expected. This
128
limitation prevents much possible confusion when using filters to
129
control the appearance of the text window, and has some performance
130
benefits - especially when the eCos application generates a great deal
131
of output such as when tracing is enabled. For most applications this
132
is not a problem, but it is something that developers should be aware
133
of.
134
    </P
135
><P
136
>The console device is output-only, it does not provide any support for
137
keyboard input. If the application requires keyboard input then that
138
should be handled by a separate eCos device package and matching
139
host-side code.
140
    </P
141
></DIV
142
><DIV
143
CLASS="REFSECT1"
144
><A
145
NAME="SYNTH-CONSOLE-INSTALL"
146
></A
147
><H2
148
>Installation</H2
149
><P
150
>The eCos side of the console device is implemented by the
151
architectural HAL itself, in the source file
152
<TT
153
CLASS="FILENAME"
154
>synth_diag.c</TT
155
>, rather than in a separate device
156
package. Similarly the host-side implementation,
157
<TT
158
CLASS="FUNCTION"
159
>console.tcl</TT
160
>, is part of the architectural HAL's
161
host-side support. It gets installed automatically alongside the I/O
162
auxiliary itself, so no separate installation procedure is required.
163
    </P
164
></DIV
165
><DIV
166
CLASS="REFSECT1"
167
><A
168
NAME="SYNTH-CONSOLE-TDF"
169
></A
170
><H2
171
>Target Definition File</H2
172
><P
173
>The <A
174
HREF="synth-running.html#SYNTH-RUNNING-TDF"
175
>target definition file</A
176
>
177
can contain a number of entries related to the console device. These
178
are all optional, they only control the appearance of text output. If
179
such control is desired then the relevant options should appear in the
180
body of a <B
181
CLASS="COMMAND"
182
>synth_device</B
183
> entry:
184
    </P
185
><TABLE
186
BORDER="5"
187
BGCOLOR="#E0E0F0"
188
WIDTH="70%"
189
><TR
190
><TD
191
><PRE
192
CLASS="PROGRAMLISTING"
193
>synth_device console {
194
    &#8230;
195
}</PRE
196
></TD
197
></TR
198
></TABLE
199
><P
200
>The first option is <B
201
CLASS="COMMAND"
202
>appearance</B
203
>, used to control the
204
appearance of any text generated by the eCos application that does not
205
match one of the installed filters. This option takes the same
206
argument as any other filter, for example:
207
    </P
208
><TABLE
209
BORDER="5"
210
BGCOLOR="#E0E0F0"
211
WIDTH="70%"
212
><TR
213
><TD
214
><PRE
215
CLASS="PROGRAMLISTING"
216
>synth_device console {
217
    appearance -foreground white -background black
218
    &#8230;
219
}</PRE
220
></TD
221
></TR
222
></TABLE
223
><P
224
>Any number of additional filters can be created with a
225
<B
226
CLASS="COMMAND"
227
>filter</B
228
> option, for example:
229
    </P
230
><TABLE
231
BORDER="5"
232
BGCOLOR="#E0E0F0"
233
WIDTH="70%"
234
><TR
235
><TD
236
><PRE
237
CLASS="PROGRAMLISTING"
238
>synth_device console {
239
    &#8230;
240
    filter trace {^TRACE:.*} -foreground HotPink1 -hide 1
241
    &#8230;
242
}</PRE
243
></TD
244
></TR
245
></TABLE
246
><P
247
>The first argument gives the new filter a name which will be used in
248
the <A
249
HREF="synth-gui.html#SYNTH-GUI-TEXT"
250
>filters dialog</A
251
>. Filter names
252
should be unique. The second argument is a Tcl regular expression. The
253
console support will match each line of eCos output against this
254
regular expression, and if a match is found then the filter will be
255
used for this line of text. The above example matches any line of
256
output that begins with <TT
257
CLASS="LITERAL"
258
>TRACE:</TT
259
>, which corresponds
260
to the eCos infrastructure's tracing facilities. The remaining options
261
control the desired appearance for matched text. If some eCos output
262
matches the regular expressions for several different filters then
263
only the first match will be used.
264
    </P
265
></DIV
266
><DIV
267
CLASS="REFSECT1"
268
><A
269
NAME="SYNTH-CONSOLE-TARGET-CONFIG"
270
></A
271
><H2
272
>Target-side
273
  Configuration Options</H2
274
><P
275
>There are no target-side configuration options related to the console
276
device.
277
    </P
278
></DIV
279
><DIV
280
CLASS="REFSECT1"
281
><A
282
NAME="SYNTH-CONSOLE-ARGUMENTS"
283
></A
284
><H2
285
>Command Line Arguments</H2
286
><P
287
>The console device does not use any command-line arguments.
288
    </P
289
></DIV
290
><DIV
291
CLASS="REFSECT1"
292
><A
293
NAME="SYNTH-CONSOLE-HOOKS"
294
></A
295
><H2
296
>Hooks</H2
297
><P
298
>The console device does not provide any hooks.
299
    </P
300
></DIV
301
><DIV
302
CLASS="REFSECT1"
303
><A
304
NAME="AEN477"
305
></A
306
><H2
307
>Additional Tcl Procedures</H2
308
><P
309
>The console device does not provide any additional Tcl procedures that
310
can be used by other scripts.
311
    </P
312
></DIV
313
><DIV
314
CLASS="NAVFOOTER"
315
><HR
316
ALIGN="LEFT"
317
WIDTH="100%"><TABLE
318
SUMMARY="Footer navigation table"
319
WIDTH="100%"
320
BORDER="0"
321
CELLPADDING="0"
322
CELLSPACING="0"
323
><TR
324
><TD
325
WIDTH="33%"
326
ALIGN="left"
327
VALIGN="top"
328
><A
329
HREF="synth-gui.html"
330
ACCESSKEY="P"
331
>Prev</A
332
></TD
333
><TD
334
WIDTH="34%"
335
ALIGN="center"
336
VALIGN="top"
337
><A
338
HREF="hal-synth-arch.html"
339
ACCESSKEY="H"
340
>Home</A
341
></TD
342
><TD
343
WIDTH="33%"
344
ALIGN="right"
345
VALIGN="top"
346
><A
347
HREF="synth-syscalls.html"
348
ACCESSKEY="N"
349
>Next</A
350
></TD
351
></TR
352
><TR
353
><TD
354
WIDTH="33%"
355
ALIGN="left"
356
VALIGN="top"
357
>The I/O Auxiliary's User Interface</TD
358
><TD
359
WIDTH="34%"
360
ALIGN="center"
361
VALIGN="top"
362
>&nbsp;</TD
363
><TD
364
WIDTH="33%"
365
ALIGN="right"
366
VALIGN="top"
367
>System Calls</TD
368
></TR
369
></TABLE
370
></DIV
371
></BODY
372
></HTML
373
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.