source: rtems/cpukit/include/rtems/serdbgcnf.h @ fb5f575

Last change on this file since fb5f575 was fb5f575, checked in by Joel Sherrill <joel@…>, on 03/25/22 at 16:14:25

cpukit/include/rtems: Change license to BSD-2

Updates #3053.

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/**
4 * @file
5 *
6 * @brief Adds a GDB remote Debug Stub to an RTEMS System
7 */
8
9/*
10 * Copyright (c) 2002 IMD Ingenieurbuero fuer Microcomputertechnik
11 * All rights reserved.
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 *    notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 *    notice, this list of conditions and the following disclaimer in the
20 *    documentation and/or other materials provided with the distribution.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 */
34
35#ifndef _SERDBGCNF_H
36#define _SERDBGCNF_H
37
38#include <rtems/serdbg.h>
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44#ifdef CONFIGURE_INIT
45
46/*
47 * fallback for baud rate to use
48 */
49#ifndef CONFIGURE_SERDBG_BAUDRATE
50#define CONFIGURE_SERDBG_BAUDRATE 9600
51#endif
52
53/*
54 * fallback for device name to use
55 */
56#ifndef CONFIGURE_SERDBG_DEVNAME
57#define CONFIGURE_SERDBG_DEVNAME "/dev/tty01"
58#endif
59
60/*
61 * fill in serdbg_conf structure
62 */
63serdbg_conf_t serdbg_conf = {
64  CONFIGURE_SERDBG_BAUDRATE,
65
66#ifdef CONFIGURE_SERDBG_CALLOUT
67  CONFIGURE_SERDBG_CALLOUT,
68#else
69  NULL,
70#endif
71
72#ifdef CONFIGURE_SERDBG_USE_POLLED_TERMIOS
73  serdbg_open,
74#else
75  NULL,
76#endif
77
78  CONFIGURE_SERDBG_DEVNAME,
79
80#ifdef CONFIGURE_SERDBG_SKIP_INIT_BKPT
81  true,
82#else
83  false,
84#endif
85};
86
87int serdbg_init(void) {
88#ifdef CONFIGURE_USE_SERDBG
89  return serdbg_init_dbg();
90#else
91  return 0;
92#endif
93}
94
95#endif /* CONFIGURE_INIT */
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif /* _SERDBGCNF_H */
Note: See TracBrowser for help on using the repository browser.