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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [synth/] [arch/] [current/] [doc/] [synth-gui.html] - Blame information for rev 838

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

Line No. Rev Author Line
1 786 skrzyp
<!-- Copyright (C) 2002 Free Software Foundation, 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 I/O Auxiliary's User Interface</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="Running a Synthetic Target Application"
23
HREF="synth-running.html"><LINK
24
REL="NEXT"
25
TITLE="The Console Device"
26
HREF="synth-console.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-running.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-console.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-GUI">The I/O Auxiliary's User Interface</H1
80
><DIV
81
CLASS="REFNAMEDIV"
82
><A
83
NAME="AEN304"
84
></A
85
><H2
86
>Name</H2
87
>User Interface&nbsp;--&nbsp;Controlling the I/O Auxiliary</DIV
88
><DIV
89
CLASS="REFSECT1"
90
><A
91
NAME="SYNTH-GUI-DESCRIPTION"
92
></A
93
><H2
94
>Description</H2
95
><P
96
>The synthetic target auxiliary is designed to support both extensions
97
and user customization. Support for the desired devices is dynamically
98
loaded, and each device can extend the user interface. For example it
99
is possible for a device to add menu options, place new buttons on the
100
toolbar, create its own sub-window within the overall layout, or even
101
create entire new toplevel windows. These subwindows or toplevels
102
could show graphs of activity such as interrupts or packets being
103
transferred. They could also allow users to interact with the eCos
104
application, for example by showing a number of buttons which will be
105
mapped on to digital inputs in the eCos application. Different
106
applications will have their own I/O requirements, changing the
107
host-side support files that get loaded and that may modify the user
108
interface. The I/O auxiliary also reads in user configuration scripts
109
which can enhance the interface in the same way. Therefore the exact
110
user interface will depend on the user and on the eCos application
111
being run. However the overall layout is likely to remain the same.
112
    </P
113
><DIV
114
CLASS="INFORMALFIGURE"
115
><A
116
NAME="AEN310"><P
117
></P
118
><DIV
119
CLASS="MEDIAOBJECT"
120
><P
121
><IMG
122
SRC="screen_main.gif"
123
ALIGN="CENTER"></P
124
></DIV
125
><P
126
></P
127
></DIV
128
><P
129
>The title bar identifies the window as belonging to an eCos synthetic
130
target application and lists both the application name and its process
131
id. The latter is especially useful if the application was started
132
directly from a shell prompt and the user now wants to attach a gdb
133
session. The window has a conventional menu bar with the usual
134
entries, plus a toolbar with buttons for common operations such as cut
135
and paste. Balloon help is supported.
136
    </P
137
><P
138
>There is a central <A
139
HREF="synth-gui.html#SYNTH-GUI-TEXT"
140
>text window</A
141
>,
142
possibly surrounded by various sub-windows for various devices. For
143
example there could be a row of emulated LED's above the text window,
144
and monitors of ethernet traffic and interrupt activity on the right.
145
At the bottom of the window is a status line, including a small
146
animation that shows whether or not the eCos application is still
147
running.
148
    </P
149
></DIV
150
><DIV
151
CLASS="REFSECT1"
152
><A
153
NAME="SYNTH-GUI-MENUS"
154
></A
155
><H2
156
>Menus and the Toolbar</H2
157
><P
158
>Usually there will be four menus on the menu bar:
159
<SPAN
160
CLASS="GUIMENU"
161
>File</SPAN
162
>, <SPAN
163
CLASS="GUIMENU"
164
>Edit</SPAN
165
>,
166
<SPAN
167
CLASS="GUIMENU"
168
>View</SPAN
169
> and <SPAN
170
CLASS="GUIMENU"
171
>Help</SPAN
172
>.
173
    </P
174
><DIV
175
CLASS="INFORMALFIGURE"
176
><A
177
NAME="AEN324"><P
178
></P
179
><DIV
180
CLASS="MEDIAOBJECT"
181
><P
182
><IMG
183
SRC="menu_file.gif"
184
ALIGN="CENTER"></P
185
></DIV
186
><P
187
></P
188
></DIV
189
><P
190
>On the <SPAN
191
CLASS="GUIMENU"
192
>File</SPAN
193
> menu there are three entries related to
194
saving the current contents of the central text window.
195
<SPAN
196
CLASS="GUIMENUITEM"
197
>Save</SPAN
198
> is used to save the currently visible
199
contents of the text window. Any text that is hidden because of
200
filters will not be written to the savefile. If there has been a
201
previous <SPAN
202
CLASS="GUIMENUITEM"
203
>Save</SPAN
204
> or <SPAN
205
CLASS="GUIMENUITEM"
206
>Save
207
As</SPAN
208
> operation then the existing savefile will be re-used,
209
otherwise the user will be asked to select a suitable file.
210
<SPAN
211
CLASS="GUIMENUITEM"
212
>Save As</SPAN
213
> also saves just the currently
214
visible contents but will always prompt the user for a filename.
215
<SPAN
216
CLASS="GUIMENUITEM"
217
>Save All</SPAN
218
> can be used to save the full
219
contents of the text window, including any text that is currently
220
hidden. It will always prompt for a new filename, to avoid confusion
221
with partial savefiles.
222
    </P
223
><P
224
>Usually the eCos application will be run from inside gdb or from a
225
shell prompt. Killing off the application while it is being debugged
226
in a gdb session is not a good idea, it would be better to use gdb's
227
own <B
228
CLASS="COMMAND"
229
>kill</B
230
> command. Alternatively the eCos
231
application itself can use the <TT
232
CLASS="FUNCTION"
233
>CYG_TEST_EXIT</TT
234
> or
235
<TT
236
CLASS="FILENAME"
237
>cyg_hal_sys_exit</TT
238
> functionality. However it is
239
possible to terminate the application from the I/O auxiliary using
240
<SPAN
241
CLASS="GUIMENUITEM"
242
>Kill eCos</SPAN
243
>. A clean shutdown will be
244
attempted, but that can fail if the application is currently halted
245
inside gdb or if it has crashed completely. As a last resort
246
<TT
247
CLASS="CONSTANT"
248
>SIGKILL</TT
249
> will be used.
250
    </P
251
><P
252
>When operating in graphical mode the I/O auxiliary will normally
253
continue to run even after the eCos application has exited. This
254
allows the user to examine the last few lines of output, and perhaps
255
perform actions such as saving the output to a file. The
256
<SPAN
257
CLASS="GUIMENUITEM"
258
>Exit</SPAN
259
> menu item can be used to shut down the
260
auxiliary. Note that this behaviour can be changed with command line
261
arguments <A
262
HREF="synth-running.html#SYNTH-RUNNING-ARGUMENTS"
263
><TT
264
CLASS="OPTION"
265
>--exit</TT
266
></A
267
> and
268
<A
269
HREF="synth-running.html#SYNTH-RUNNING-ARGUMENTS"
270
><TT
271
CLASS="OPTION"
272
>--no-exit</TT
273
></A
274
>.
275
    </P
276
><P
277
>If <SPAN
278
CLASS="GUIMENUITEM"
279
>Exit</SPAN
280
> is used while the eCos application
281
is still running then the I/O auxiliary will first attempt to
282
terminate the application cleanly, and then exit.
283
    </P
284
><DIV
285
CLASS="INFORMALFIGURE"
286
><A
287
NAME="AEN349"><P
288
></P
289
><DIV
290
CLASS="MEDIAOBJECT"
291
><P
292
><IMG
293
SRC="menu_edit.gif"
294
ALIGN="CENTER"></P
295
></DIV
296
><P
297
></P
298
></DIV
299
><P
300
>The <SPAN
301
CLASS="GUIMENU"
302
>Edit</SPAN
303
> menu contains the usual entries for
304
text manipulation: <SPAN
305
CLASS="GUIMENUITEM"
306
>Cut</SPAN
307
>,
308
<SPAN
309
CLASS="GUIMENUITEM"
310
>Copy</SPAN
311
>, <SPAN
312
CLASS="GUIMENUITEM"
313
>Paste</SPAN
314
>,
315
<SPAN
316
CLASS="GUIMENUITEM"
317
>Clear</SPAN
318
> and <SPAN
319
CLASS="GUIMENUITEM"
320
>Select
321
All</SPAN
322
>. These all operate on the central text window. By
323
default this window cannot be edited so the cut, paste and clear
324
operations are disabled. If the user wants to edit the contents of the
325
text window then the <SPAN
326
CLASS="GUIMENUITEM"
327
>Read Only</SPAN
328
> checkbutton
329
should be toggled.
330
    </P
331
><P
332
>The <SPAN
333
CLASS="GUIMENUITEM"
334
>Preferences</SPAN
335
> menu item brings up a
336
miscellaneous preferences dialog. One of the preferences relates to
337
online help: the I/O auxiliary does not currently have a built-in html
338
viewer; instead it will execute an external browser of some sort. With
339
the example settings shown, the I/O auxiliary will first attempt to
340
interact with an existing mozilla session. If that fails it will try
341
to run a new mozilla instance, or as a last result use the Gnome help
342
viewer.
343
    </P
344
><DIV
345
CLASS="INFORMALFIGURE"
346
><A
347
NAME="AEN363"><P
348
></P
349
><DIV
350
CLASS="MEDIAOBJECT"
351
><P
352
><IMG
353
SRC="preferences.gif"
354
ALIGN="CENTER"></P
355
></DIV
356
><P
357
></P
358
></DIV
359
><P
360
>The <SPAN
361
CLASS="GUIMENU"
362
>View</SPAN
363
> menu contains the <SPAN
364
CLASS="GUIMENUITEM"
365
>System
366
Filters</SPAN
367
> entry, used to edit the settings for the current
368
<A
369
HREF="synth-gui.html#SYNTH-GUI-TEXT"
370
>filters</A
371
>.
372
    </P
373
><DIV
374
CLASS="INFORMALFIGURE"
375
><A
376
NAME="AEN371"><P
377
></P
378
><DIV
379
CLASS="MEDIAOBJECT"
380
><P
381
><IMG
382
SRC="menu_view.gif"
383
ALIGN="CENTER"></P
384
></DIV
385
><P
386
></P
387
></DIV
388
><P
389
>The <SPAN
390
CLASS="GUIMENU"
391
>Help</SPAN
392
> menu can be used to activate online help
393
for eCos generally, for the synthetic target as a whole, and for
394
specific devices supported by the generic target. The Preferences
395
dialog can be used to select the browser that will be used.
396
    </P
397
><DIV
398
CLASS="INFORMALFIGURE"
399
><A
400
NAME="AEN377"><P
401
></P
402
><DIV
403
CLASS="MEDIAOBJECT"
404
><P
405
><IMG
406
SRC="menu_help.gif"
407
ALIGN="CENTER"></P
408
></DIV
409
><P
410
></P
411
></DIV
412
><DIV
413
CLASS="NOTE"
414
><BLOCKQUOTE
415
CLASS="NOTE"
416
><P
417
><B
418
>Note: </B
419
>At the time of writing there is no well-defined toplevel index file
420
for all eCos documentation. Hence the relevant menu item is disabled.
421
Documentation for the synthetic target and the supported devices
422
is stored as part of the package itself so can usually be found fairly
423
easily. It may be necessary to set the <TT
424
CLASS="ENVAR"
425
>ECOS_REPOSITORY</TT
426
>
427
environment variable.
428
    </P
429
></BLOCKQUOTE
430
></DIV
431
></DIV
432
><DIV
433
CLASS="REFSECT1"
434
><A
435
NAME="SYNTH-GUI-TEXT"
436
></A
437
><H2
438
>The Main Text Window</H2
439
><P
440
>The central text window holds the console output from the eCos
441
application: the screen shot above shows DHCP initialization data from
442
the TCP/IP stack, and some output from the <TT
443
CLASS="FUNCTION"
444
>main</TT
445
>
446
thread at the bottom. Some devices can insert text of their own, for
447
example the ethernet device support can be configured to show details
448
of incoming and outgoing packets. Mixing the output from the eCos
449
application and the various devices can make it easier to understand
450
the order in which events occur.
451
    </P
452
><P
453
>The appearance of text from different sources can be controlled by
454
means of filters, and it is also possible to hide some of the text.
455
For example, if tracing is enabled in the eCos configuration then the
456
trace output can be given its own colour scheme, making it stand out
457
from the rest of the output. In addition the trace output is generally
458
voluminous so it can be hidden by default, made visible only to find
459
out more about what was happening when a particular problem occurred.
460
Similarly the ethernet device support can output details of the
461
various packets being transferred, and using a different background
462
colour for this output again makes it easier to distinguish from
463
console output.
464
    </P
465
><P
466
>The default appearance for most filters is controlled via the
467
<A
468
HREF="synth-running.html#SYNTH-RUNNING-TDF"
469
>target definition file</A
470
>. An
471
example entry might be:
472
    </P
473
><TABLE
474
BORDER="5"
475
BGCOLOR="#E0E0F0"
476
WIDTH="70%"
477
><TR
478
><TD
479
><PRE
480
CLASS="PROGRAMLISTING"
481
>  filter trace {^TRACE:.*} -foreground HotPink1 -hide 1</PRE
482
></TD
483
></TR
484
></TABLE
485
><P
486
>The various colours and the hide flag for each filter can be changed
487
at run-time, using the <SPAN
488
CLASS="GUIMENUITEM"
489
>System Filters</SPAN
490
> item
491
on the <SPAN
492
CLASS="GUIMENU"
493
>View</SPAN
494
> menu. This will bring up a dialog like
495
the following:
496
    </P
497
><DIV
498
CLASS="INFORMALFIGURE"
499
><A
500
NAME="AEN395"><P
501
></P
502
><DIV
503
CLASS="MEDIAOBJECT"
504
><P
505
><IMG
506
SRC="filters.gif"
507
ALIGN="CENTER"></P
508
></DIV
509
><P
510
></P
511
></DIV
512
><P
513
>It should be noted that the text window is line-oriented, not
514
character-oriented. If an eCos application sends a partial line of
515
text then that will remain buffered until a newline character is
516
received, rather than being displayed immediately. This avoids
517
confusion when there is concurrent output from several sources.
518
    </P
519
><P
520
>By default the text window is read-only. This means it will not allow
521
cut, paste and clear operations, and keyboard input will be ignored.
522
The <SPAN
523
CLASS="GUIMENU"
524
>Edit</SPAN
525
> menu has a checkbutton <SPAN
526
CLASS="GUIMENUITEM"
527
>Read
528
Only</SPAN
529
> which can be toggled to allow write operations. For
530
example, a user could type in a reminder of what was happening at this
531
time, or paste in part of a gdb session. Such keyboard input does not
532
get forwarded to the eCos application: if the latter requires keyboard
533
input then that should happen via a separate keyboard device.
534
    </P
535
></DIV
536
><DIV
537
CLASS="REFSECT1"
538
><A
539
NAME="SYNTH-GUI-LAYOUT"
540
></A
541
><H2
542
>Positioning Optional Windows</H2
543
><P
544
>Some devices may create their own subwindows, for example to monitor
545
ethernet traffic or to provide additional I/O facilities such as
546
emulated LED's or buttons. Usually the target definition file can be
547
used to control the <A
548
HREF="synth-gui.html#SYNTH-GUI-LAYOUT"
549
>layout</A
550
> of
551
these windows. This requires an understanding of the overall layout of
552
the display.
553
    </P
554
><DIV
555
CLASS="INFORMALFIGURE"
556
><A
557
NAME="AEN407"><P
558
></P
559
><DIV
560
CLASS="MEDIAOBJECT"
561
><P
562
><IMG
563
SRC="layout.gif"
564
ALIGN="CENTER"></P
565
></DIV
566
><P
567
></P
568
></DIV
569
><P
570
>Subwindows are generally packed in one of eight frames surrounding the
571
central text window: <TT
572
CLASS="VARNAME"
573
>.main.nw</TT
574
>,
575
<TT
576
CLASS="VARNAME"
577
>.main.n</TT
578
>, <TT
579
CLASS="VARNAME"
580
>.main.ne</TT
581
>,
582
<TT
583
CLASS="VARNAME"
584
>.main.w</TT
585
>, <TT
586
CLASS="VARNAME"
587
>.main.e</TT
588
>,
589
<TT
590
CLASS="VARNAME"
591
>.main.sw</TT
592
>, <TT
593
CLASS="VARNAME"
594
>.main.s</TT
595
>, and
596
<TT
597
CLASS="VARNAME"
598
>.main.se</TT
599
>. To position a row of LED's above the text
600
window and towards the left, a target definition file could contain an
601
entry such as:
602
    </P
603
><TABLE
604
BORDER="5"
605
BGCOLOR="#E0E0F0"
606
WIDTH="70%"
607
><TR
608
><TD
609
><PRE
610
CLASS="PROGRAMLISTING"
611
>synth_device led {
612
    pack -in .main.n -side left
613
    &#8230;
614
}</PRE
615
></TD
616
></TR
617
></TABLE
618
><P
619
>Similarly, to put a traffic monitor window on the right of the text
620
window would involve something like:
621
    </P
622
><TABLE
623
BORDER="5"
624
BGCOLOR="#E0E0F0"
625
WIDTH="70%"
626
><TR
627
><TD
628
><PRE
629
CLASS="PROGRAMLISTING"
630
>    &#8230;
631
    monitor_pack -in .main.e -side bottom
632
    &#8230;</PRE
633
></TD
634
></TR
635
></TABLE
636
><P
637
>Often it will be sufficient to specify a container frame and one of
638
<TT
639
CLASS="CONSTANT"
640
>left</TT
641
>, <TT
642
CLASS="CONSTANT"
643
>right</TT
644
>,
645
<TT
646
CLASS="CONSTANT"
647
>top</TT
648
> or <TT
649
CLASS="CONSTANT"
650
>bottom</TT
651
>. Full control
652
over the positioning requires an understanding of Tcl/Tk and in
653
particular the packing algorithm, and an appropriate reference work
654
should be consulted.
655
    </P
656
></DIV
657
><DIV
658
CLASS="REFSECT1"
659
><A
660
NAME="SYNTH-GUI-GLOBAL-CONFIG"
661
></A
662
><H2
663
>Global Settings</H2
664
><DIV
665
CLASS="NOTE"
666
><BLOCKQUOTE
667
CLASS="NOTE"
668
><P
669
><B
670
>Note: </B
671
>This section still to be written - it should document the interaction
672
between X resources and ecosynth, and how users can control settings
673
such as the main foreground and background colours.
674
    </P
675
></BLOCKQUOTE
676
></DIV
677
></DIV
678
><DIV
679
CLASS="NAVFOOTER"
680
><HR
681
ALIGN="LEFT"
682
WIDTH="100%"><TABLE
683
SUMMARY="Footer navigation table"
684
WIDTH="100%"
685
BORDER="0"
686
CELLPADDING="0"
687
CELLSPACING="0"
688
><TR
689
><TD
690
WIDTH="33%"
691
ALIGN="left"
692
VALIGN="top"
693
><A
694
HREF="synth-running.html"
695
ACCESSKEY="P"
696
>Prev</A
697
></TD
698
><TD
699
WIDTH="34%"
700
ALIGN="center"
701
VALIGN="top"
702
><A
703
HREF="hal-synth-arch.html"
704
ACCESSKEY="H"
705
>Home</A
706
></TD
707
><TD
708
WIDTH="33%"
709
ALIGN="right"
710
VALIGN="top"
711
><A
712
HREF="synth-console.html"
713
ACCESSKEY="N"
714
>Next</A
715
></TD
716
></TR
717
><TR
718
><TD
719
WIDTH="33%"
720
ALIGN="left"
721
VALIGN="top"
722
>Running a Synthetic Target Application</TD
723
><TD
724
WIDTH="34%"
725
ALIGN="center"
726
VALIGN="top"
727
>&nbsp;</TD
728
><TD
729
WIDTH="33%"
730
ALIGN="right"
731
VALIGN="top"
732
>The Console Device</TD
733
></TR
734
></TABLE
735
></DIV
736
></BODY
737
></HTML
738
>

powered by: WebSVN 2.1.0

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