aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_HOST/SEGGER_RTT_Conf.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_HOST/SEGGER_RTT_Conf.h')
-rw-r--r--lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_HOST/SEGGER_RTT_Conf.h123
1 files changed, 123 insertions, 0 deletions
diff --git a/lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_HOST/SEGGER_RTT_Conf.h b/lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_HOST/SEGGER_RTT_Conf.h
new file mode 100644
index 000000000..5aa7a699c
--- /dev/null
+++ b/lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_HOST/SEGGER_RTT_Conf.h
@@ -0,0 +1,123 @@
1/*********************************************************************
2* SEGGER Microcontroller GmbH *
3* The Embedded Experts *
4**********************************************************************
5* *
6* (c) 1995 - 2019 SEGGER Microcontroller GmbH *
7* *
8* www.segger.com Support: [email protected] *
9* *
10**********************************************************************
11* *
12* SEGGER RTT * Real Time Transfer for embedded targets *
13* *
14**********************************************************************
15* *
16* All rights reserved. *
17* *
18* SEGGER strongly recommends to not make any changes *
19* to or modify the source code of this software in order to stay *
20* compatible with the RTT protocol and J-Link. *
21* *
22* Redistribution and use in source and binary forms, with or *
23* without modification, are permitted provided that the following *
24* conditions are met: *
25* *
26* o Redistributions of source code must retain the above copyright *
27* notice, this list of conditions and the following disclaimer. *
28* *
29* o Redistributions in binary form must reproduce the above *
30* copyright notice, this list of conditions and the following *
31* disclaimer in the documentation and/or other materials provided *
32* with the distribution. *
33* *
34* o Neither the name of SEGGER Microcontroller GmbH *
35* nor the names of its contributors may be used to endorse or *
36* promote products derived from this software without specific *
37* prior written permission. *
38* *
39* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
40* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
41* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
42* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
43* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
44* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
45* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
46* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
47* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
48* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
49* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
50* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
51* DAMAGE. *
52* *
53**********************************************************************
54* *
55* RTT version: 6.44i *
56* *
57**********************************************************************
58---------------------------END-OF-HEADER------------------------------
59File : SEGGER_RTT_Conf.h
60Purpose : Implementation of SEGGER real-time transfer (RTT) which
61 allows real-time communication on targets which support
62 debugger memory accesses while the CPU is running.
63Revision: $Rev: 13430 $
64
65*/
66
67#ifndef SEGGER_RTT_CONF_H
68#define SEGGER_RTT_CONF_H
69
70#ifdef __IAR_SYSTEMS_ICC__
71 #include <intrinsics.h>
72#endif
73
74/*********************************************************************
75*
76* Defines, configurable
77*
78**********************************************************************
79*/
80
81#define SEGGER_RTT_MAX_NUM_UP_BUFFERS (2) // Max. number of up-buffers (T->H) available on this target (Default: 3)
82#define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (2) // Max. number of down-buffers (H->T) available on this target (Default: 3)
83
84#define BUFFER_SIZE_UP (1024) // Size of the buffer for terminal output of target, up to host (Default: 1k)
85#define BUFFER_SIZE_DOWN (16) // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16)
86
87#define SEGGER_RTT_PRINTF_BUFFER_SIZE (128u) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64)
88
89#define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0)
90
91/*********************************************************************
92*
93* RTT memcpy configuration
94*
95* memcpy() is good for large amounts of data,
96* but the overhead is big for small amounts, which are usually stored via RTT.
97* With SEGGER_RTT_MEMCPY_USE_BYTELOOP a simple byte loop can be used instead.
98*
99* SEGGER_RTT_MEMCPY() can be used to replace standard memcpy() in RTT functions.
100* This is may be required with memory access restrictions,
101* such as on Cortex-A devices with MMU.
102*/
103#define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 // 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop
104//
105// Example definition of SEGGER_RTT_MEMCPY to external memcpy with GCC toolchains and Cortex-A targets
106//
107//#if ((defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __GNUC__)) && (defined (__ARM_ARCH_7A__))
108// #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes) SEGGER_memcpy((pDest), (pSrc), (NumBytes))
109//#endif
110
111//
112// Target is not allowed to perform other RTT operations while string still has not been stored completely.
113// Otherwise we would probably end up with a mixed string in the buffer.
114// If using RTT from within interrupts, multiple tasks or multi processors, define the SEGGER_RTT_LOCK() and SEGGER_RTT_UNLOCK() function here.
115#if !defined(SEGGER_RTT_ASM)
116#include "ch.h"
117#define SEGGER_RTT_LOCK() do { \
118 syssts_t LockState = chSysGetStatusAndLockX()
119#define SEGGER_RTT_UNLOCK() chSysRestoreStatusX(LockState); \
120 } while(0)
121#endif
122#endif
123/*************************** End of file ****************************/