1 | /*===============================================================*\ |
---|
2 | | Project: RTEMS configure remote gdb over serial line | |
---|
3 | +-----------------------------------------------------------------+ |
---|
4 | | File: serdbgcnf.h | |
---|
5 | +-----------------------------------------------------------------+ |
---|
6 | | Copyright (c) 2002 IMD | |
---|
7 | | Ingenieurbuero fuer Microcomputertechnik Th. Doerfler | |
---|
8 | | <Thomas.Doerfler@imd-systems.de> | |
---|
9 | | all rights reserved | |
---|
10 | +-----------------------------------------------------------------+ |
---|
11 | | this file declares intialization functions to add | |
---|
12 | | a gdb remote debug stub to an RTEMS system | |
---|
13 | | | |
---|
14 | +-----------------------------------------------------------------+ |
---|
15 | | date history ID | |
---|
16 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
---|
17 | | 13.05.02 creation doe | |
---|
18 | \*===============================================================*/ |
---|
19 | /* |
---|
20 | * $Id$ |
---|
21 | */ |
---|
22 | #ifndef _SERDBGCNF_H |
---|
23 | #define _SERDBGCNF_H |
---|
24 | |
---|
25 | #include <rtems/serdbg.h> |
---|
26 | |
---|
27 | #ifdef __cplusplus |
---|
28 | extern "C" { |
---|
29 | #endif |
---|
30 | |
---|
31 | #ifdef CONFIGURE_INIT |
---|
32 | |
---|
33 | /* |
---|
34 | * fallback for baud rate to use |
---|
35 | */ |
---|
36 | #ifndef CONFIGURE_SERDBG_BAUDRATE |
---|
37 | #define CONFIGURE_SERDBG_BAUDRATE 9600 |
---|
38 | #endif |
---|
39 | |
---|
40 | /* |
---|
41 | * fallback for device name to use |
---|
42 | */ |
---|
43 | #ifndef CONFIGURE_SERDBG_DEVNAME |
---|
44 | #define CONFIGURE_SERDBG_DEVNAME "/dev/tty01" |
---|
45 | #endif |
---|
46 | |
---|
47 | /* |
---|
48 | * fill in serdbg_conf structure |
---|
49 | */ |
---|
50 | serdbg_conf_t serdbg_conf = { |
---|
51 | CONFIGURE_SERDBG_BAUDRATE, |
---|
52 | |
---|
53 | #ifdef CONFIGURE_SERDBG_CALLOUT |
---|
54 | CONFIGURE_SERDBG_CALLOUT, |
---|
55 | #else |
---|
56 | NULL, |
---|
57 | #endif |
---|
58 | |
---|
59 | #ifdef CONFIGURE_SERDBG_USE_POLLED_TERMIOS |
---|
60 | serdbg_open, |
---|
61 | #else |
---|
62 | NULL, |
---|
63 | #endif |
---|
64 | |
---|
65 | CONFIGURE_SERDBG_DEVNAME, |
---|
66 | |
---|
67 | #ifdef CONFIGURE_SERDBG_SKIP_INIT_BKPT |
---|
68 | TRUE, |
---|
69 | #else |
---|
70 | FALSE, |
---|
71 | #endif |
---|
72 | }; |
---|
73 | |
---|
74 | int serdbg_init(void) { |
---|
75 | #ifdef CONFIGURE_USE_SERDBG |
---|
76 | extern int serdbg_init_dbg(void); |
---|
77 | return serdbg_init_dbg(); |
---|
78 | #else |
---|
79 | return 0; |
---|
80 | #endif |
---|
81 | } |
---|
82 | |
---|
83 | #endif /* CONFIGURE_INIT */ |
---|
84 | |
---|
85 | #ifdef __cplusplus |
---|
86 | } |
---|
87 | #endif |
---|
88 | |
---|
89 | #endif /* _SERDBGCNF_H */ |
---|