1 /********************************************************************* 2 * SEGGER Microcontroller GmbH & Co. KG * 3 * The Embedded Experts * 4 ********************************************************************** 5 * * 6 * (c) 2015 - 2017 SEGGER Microcontroller GmbH & Co. KG * 7 * * 8 * www.segger.com Support: support@segger.com * 9 * * 10 ********************************************************************** 11 * * 12 * SEGGER SystemView * Real-time application analysis * 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 & Co. KG * 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 * SystemView version: V2.42 * 56 * * 57 ********************************************************************** 58 -------------------------- END-OF-HEADER ----------------------------- 59 File : SEGGER_SYSVIEW_ConfDefaults.h 60 Purpose : Defines defaults for configurable defines used in 61 SEGGER SystemView. 62 Revision: $Rev: 3734 $ 63 */ 64 65 #ifndef SEGGER_SYSVIEW_CONFDEFAULTS_H 66 #define SEGGER_SYSVIEW_CONFDEFAULTS_H 67 68 /********************************************************************* 69 * 70 * #include Section 71 * 72 ********************************************************************** 73 */ 74 75 #include "SEGGER_SYSVIEW_Conf.h" 76 #include "SEGGER_RTT_Conf.h" 77 78 #ifdef __cplusplus 79 extern "C" { 80 #endif 81 82 /********************************************************************* 83 * 84 * Configuration defaults 85 * 86 ********************************************************************** 87 */ 88 89 // Number of bytes that SystemView uses for a buffer. 90 #ifndef SEGGER_SYSVIEW_RTT_BUFFER_SIZE 91 #define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 1024 92 #endif 93 94 // The RTT channel that SystemView will use. 95 #ifndef SEGGER_SYSVIEW_RTT_CHANNEL 96 #define SEGGER_SYSVIEW_RTT_CHANNEL 0 97 #endif 98 // Sanity check of RTT channel 99 #if (SEGGER_SYSVIEW_RTT_CHANNEL == 0) && (SEGGER_RTT_MAX_NUM_UP_BUFFERS < 2) 100 #error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > 1!" 101 #elif (SEGGER_SYSVIEW_RTT_CHANNEL >= SEGGER_RTT_MAX_NUM_UP_BUFFERS) 102 #error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > SEGGER_SYSVIEW_RTT_CHANNEL!" 103 #endif 104 105 // Place the SystemView buffer into its own/the RTT section 106 #if !(defined SEGGER_SYSVIEW_BUFFER_SECTION) && (defined SEGGER_RTT_SECTION) 107 #define SEGGER_SYSVIEW_BUFFER_SECTION SEGGER_RTT_SECTION 108 #endif 109 110 // Retrieve a system timestamp. This gets the Cortex-M cycle counter. 111 #ifndef SEGGER_SYSVIEW_GET_TIMESTAMP 112 #error "SEGGER_SYSVIEW_GET_TIMESTAMP has to be defined in SEGGER_SYSVIEW_Conf.h!" 113 #endif 114 115 // Define number of valid bits low-order delivered by clock source. 116 #ifndef SEGGER_SYSVIEW_TIMESTAMP_BITS 117 #define SEGGER_SYSVIEW_TIMESTAMP_BITS 32 118 #endif 119 120 // Lowest Id reported by the Application. 121 #ifndef SEGGER_SYSVIEW_ID_BASE 122 #define SEGGER_SYSVIEW_ID_BASE 0 123 #endif 124 125 // Number of bits to shift Ids to save bandwidth 126 #ifndef SEGGER_SYSVIEW_ID_SHIFT 127 #define SEGGER_SYSVIEW_ID_SHIFT 0 128 #endif 129 130 #ifndef SEGGER_SYSVIEW_GET_INTERRUPT_ID 131 #error "SEGGER_SYSVIEW_GET_INTERRUPT_ID has to be defined in SEGGER_SYSVIEW_Conf.h!" 132 #endif 133 134 #ifndef SEGGER_SYSVIEW_MAX_ARGUMENTS 135 #define SEGGER_SYSVIEW_MAX_ARGUMENTS 16 136 #endif 137 138 #ifndef SEGGER_SYSVIEW_MAX_STRING_LEN 139 #define SEGGER_SYSVIEW_MAX_STRING_LEN 128 140 #endif 141 142 // Use a static buffer instead of a buffer on the stack for packets 143 #ifndef SEGGER_SYSVIEW_USE_STATIC_BUFFER 144 #define SEGGER_SYSVIEW_USE_STATIC_BUFFER 1 145 #endif 146 147 // Maximum packet size used by SystemView for the static buffer 148 #ifndef SEGGER_SYSVIEW_MAX_PACKET_SIZE 149 #define SEGGER_SYSVIEW_MAX_PACKET_SIZE SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_ARGUMENTS * SEGGER_SYSVIEW_QUANTA_U32 150 #endif 151 152 // Use post-mortem analysis instead of real-time analysis 153 #ifndef SEGGER_SYSVIEW_POST_MORTEM_MODE 154 #define SEGGER_SYSVIEW_POST_MORTEM_MODE 0 155 #endif 156 157 // Configure how frequently syncronization is sent 158 #ifndef SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT 159 #define SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT 8 160 #endif 161 162 // Lock SystemView (nestable) 163 #ifndef SEGGER_SYSVIEW_LOCK 164 #define SEGGER_SYSVIEW_LOCK() SEGGER_RTT_LOCK() 165 #endif 166 167 // Unlock SystemView (nestable) 168 #ifndef SEGGER_SYSVIEW_UNLOCK 169 #define SEGGER_SYSVIEW_UNLOCK() SEGGER_RTT_UNLOCK() 170 #endif 171 172 #ifdef __cplusplus 173 } 174 #endif 175 176 #endif 177 178 /*************************** End of file ****************************/ 179