1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | |
---|
5 | This directory contains three useful packages related to the termios I/O |
---|
6 | system: |
---|
7 | |
---|
8 | PACKAGE SERDBGIO |
---|
9 | ================ |
---|
10 | "serdbgio" provides the "serial gdb" standard I/O functions "getDebugChar" |
---|
11 | and "putDebugChar" for any device driver supporting polled termios mode. |
---|
12 | |
---|
13 | The initialization function "serdbg_open" opens the v.24 port intended |
---|
14 | for the serial debug connection, and sets the desired baud rate. The |
---|
15 | "getDebugChar" and "putDebugChar" functions then interact with the |
---|
16 | corresponding driver using the calls intended for polled termios |
---|
17 | operation. |
---|
18 | |
---|
19 | Specification for the debug device, baud rate and other parameters is |
---|
20 | done in a global structure of type "serdbg_conf_t". A configuration |
---|
21 | mechanism quite similar to the overall RTEMS configuration is available. |
---|
22 | |
---|
23 | PACKAGE SERDBG |
---|
24 | ============== |
---|
25 | "serdbg" provides a means to optionally initialize and/or start a |
---|
26 | serial gdb session as soon as possible, this means as soon as all |
---|
27 | drivers have been initialized. The serial debug I/O functions can |
---|
28 | either be integrated as special routines of the BSP drivers, or using |
---|
29 | the package "serdbgio" |
---|
30 | |
---|
31 | PACKAGE TERMIOS_PRINTK |
---|
32 | ====================== |
---|
33 | "termios_printk" provides a standard output function suitable to use |
---|
34 | with "printk". It uses the same technique as serdbgio, hooking the |
---|
35 | interface between a polled device driver and the termios system. |
---|
36 | |
---|
37 | |
---|
38 | REQUIREMENTS |
---|
39 | ============ |
---|
40 | |
---|
41 | - These two packages can be used with any polled termios device |
---|
42 | driver. |
---|
43 | - For standard initialization, they need a modified "bsppost.c" |
---|
44 | to perform the initialization calls. |
---|
45 | |
---|
46 | USAGE |
---|
47 | ===== |
---|
48 | |
---|
49 | For using these packages add the following to your "init" module or |
---|
50 | your "system.h" file (Note: most macro settings fall back to a |
---|
51 | default, if not set.): |
---|
52 | |
---|
53 | /* |
---|
54 | * CONFIGURE_USE_SERDBG |
---|
55 | * set this macro, if you want to connect gdb over a serial line |
---|
56 | * when set, the debug stub will be connected after driver |
---|
57 | * initialization in "bsppost.c" |
---|
58 | */ |
---|
59 | #define CONFIGURE_USE_SERDBG |
---|
60 | |
---|
61 | |
---|
62 | /* |
---|
63 | * CONFIGURE_SERDBG_SKIP_INIT_BKPT |
---|
64 | * set this macro, if you do not want the gdb interface to wait for a |
---|
65 | * debugger connection directly after initialization |
---|
66 | * If you set this macro, the gdb stub will only hook various |
---|
67 | * exception vectors when called from "bsppost.c". |
---|
68 | */ |
---|
69 | /* #define CONFIGURE_SERDBG_SKIP_INIT_BKPT */ |
---|
70 | |
---|
71 | /* |
---|
72 | * CONFIGURE_SERDBG_USE_POLLED_TERMIOS |
---|
73 | * set this macro, if you want "serdbgio" to provide the I/O |
---|
74 | * functions for the serial gdb connection |
---|
75 | */ |
---|
76 | #define CONFIGURE_SERDBG_USE_POLLED_TERMIOS |
---|
77 | |
---|
78 | /* |
---|
79 | * CONFIGURE_SERDBG_DEVNAME |
---|
80 | * use this macro to specify the serial device to use |
---|
81 | * for "serdbgio". |
---|
82 | * Only used, when CONFIGURE_SERDBG_USE_POLLED_TERMIOS is set |
---|
83 | */ |
---|
84 | #define CONFIGURE_SERDBG_DEVNAME "/dev/tty03" |
---|
85 | |
---|
86 | /* |
---|
87 | * CONFIGURE_SERDBG_BAUDRATE |
---|
88 | * use this macro to specify the baud rate to use |
---|
89 | * for "serdbgio". |
---|
90 | * Only used, when CONFIGURE_SERDBG_USE_POLLED_TERMIOS is set |
---|
91 | */ |
---|
92 | #define CONFIGURE_SERDBG_BAUDRATE 57600 |
---|
93 | |
---|
94 | /* |
---|
95 | * CONFIGURE_SERDBG_CALLOUT |
---|
96 | * use this macro to specify a routine that will called during I/O polling |
---|
97 | * Only used, when CONFIGURE_SERDBG_USE_POLLED_TERMIOS is set |
---|
98 | * This function of type "void pollfnc(void)" can be used for e.g. |
---|
99 | * tickling a watchdog |
---|
100 | */ |
---|
101 | /* #define CONFIGURE_SERDBG_CALLOUT tickle_my_watchdog_fnc */ |
---|
102 | |
---|
103 | #include <serdbgcnf.h> |
---|
104 | |
---|
105 | /* |
---|
106 | * CONFIGURE_USE_TERMIOS_PRINTK |
---|
107 | * set this macro, if you want printk output to be sent to a serial |
---|
108 | * driver using the polled termios interface |
---|
109 | * when set, the printk output function will be connected after driver |
---|
110 | * initialization in "bsppost.c" |
---|
111 | */ |
---|
112 | #define CONFIGURE_USE_TERMIOS_PRINTK |
---|
113 | |
---|
114 | /* |
---|
115 | * CONFIGURE_TERMIOS_PRINTK_DEVNAME |
---|
116 | * use this macro to specify the serial device to use |
---|
117 | * for printk output. |
---|
118 | * Only used, when CONFIGURE_USE_TERMIOS_PRINTK is set |
---|
119 | */ |
---|
120 | #define CONFIGURE_TERMIOS_PRINTK_DEVNAME "/dev/console" |
---|
121 | |
---|
122 | /* |
---|
123 | * CONFIGURE_TERMIOS_PRINTK_BAUDRATE |
---|
124 | * use this macro to specify the baudrate to use |
---|
125 | * for printk output. |
---|
126 | * Only used, when CONFIGURE_USE_TERMIOS_PRINTK is set |
---|
127 | */ |
---|
128 | #define CONFIGURE_TERMIOS_PRINTK_BAUDRATE 9600 |
---|
129 | |
---|
130 | /* |
---|
131 | * CONFIGURE_TERMIOS_PRINTK_CALLOUT |
---|
132 | * use this macro to specify a routine that will called during I/O polling |
---|
133 | * This function of type "void pollfnc(void)" can be used for e.g. |
---|
134 | * tickling a watchdog |
---|
135 | */ |
---|
136 | /* #define CONFIGURE_TERMIOS_PRINTK_CALLOUT tickle_my_watchdog_fnc */ |
---|
137 | |
---|
138 | #include <termios_printk_cnf.h> |
---|