SEGGER_SYSVIEW_ConfDefaults.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /*********************************************************************
  2. * SEGGER MICROCONTROLLER GmbH & Co. KG *
  3. * Solutions for real time microcontroller applications *
  4. **********************************************************************
  5. * *
  6. * (c) 2015 - 2016 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. * * This software may in its unmodified form be freely redistributed *
  19. * in source form. *
  20. * * The source code may be modified, provided the source code *
  21. * retains the above copyright notice, this list of conditions and *
  22. * the following disclaimer. *
  23. * * Modified versions of this software in source or linkable form *
  24. * may not be distributed without prior consent of SEGGER. *
  25. * *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND *
  27. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, *
  28. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
  29. * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL *
  30. * SEGGER Microcontroller BE LIABLE FOR ANY DIRECT, INDIRECT, *
  31. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
  32. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS *
  33. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
  34. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, *
  35. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
  36. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
  37. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
  38. * *
  39. **********************************************************************
  40. * *
  41. * SystemView version: V2.40 *
  42. * *
  43. **********************************************************************
  44. -------------------------- END-OF-HEADER -----------------------------
  45. File : SEGGER_SYSVIEW_ConfDefaults.h
  46. Purpose : Defines defaults for configurable defines used in
  47. SEGGER SystemView.
  48. Revision: $Rev: 3734 $
  49. */
  50. #ifndef SEGGER_SYSVIEW_CONFDEFAULTS_H
  51. #define SEGGER_SYSVIEW_CONFDEFAULTS_H
  52. /*********************************************************************
  53. *
  54. * #include Section
  55. *
  56. **********************************************************************
  57. */
  58. #include "SEGGER_SYSVIEW_Conf.h"
  59. #include "SEGGER_RTT_Conf.h"
  60. #ifdef __cplusplus
  61. extern "C" {
  62. #endif
  63. /*********************************************************************
  64. *
  65. * Configuration defaults
  66. *
  67. **********************************************************************
  68. */
  69. // Number of bytes that SystemView uses for a buffer.
  70. #ifndef SEGGER_SYSVIEW_RTT_BUFFER_SIZE
  71. #define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 1024
  72. #endif
  73. // The RTT channel that SystemView will use.
  74. #ifndef SEGGER_SYSVIEW_RTT_CHANNEL
  75. #define SEGGER_SYSVIEW_RTT_CHANNEL 0
  76. #endif
  77. // Sanity check of RTT channel
  78. #if (SEGGER_SYSVIEW_RTT_CHANNEL == 0) && (SEGGER_RTT_MAX_NUM_UP_BUFFERS < 2)
  79. #error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > 1!"
  80. #elif (SEGGER_SYSVIEW_RTT_CHANNEL >= SEGGER_RTT_MAX_NUM_UP_BUFFERS)
  81. #error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > SEGGER_SYSVIEW_RTT_CHANNEL!"
  82. #endif
  83. // Place the SystemView buffer into its own/the RTT section
  84. #if !(defined SEGGER_SYSVIEW_BUFFER_SECTION) && (defined SEGGER_RTT_SECTION)
  85. #define SEGGER_SYSVIEW_BUFFER_SECTION SEGGER_RTT_SECTION
  86. #endif
  87. // Retrieve a system timestamp. This gets the Cortex-M cycle counter.
  88. #ifndef SEGGER_SYSVIEW_GET_TIMESTAMP
  89. #error "SEGGER_SYSVIEW_GET_TIMESTAMP has to be defined in SEGGER_SYSVIEW_Conf.h!"
  90. #endif
  91. // Define number of valid bits low-order delivered by clock source.
  92. #ifndef SEGGER_SYSVIEW_TIMESTAMP_BITS
  93. #define SEGGER_SYSVIEW_TIMESTAMP_BITS 32
  94. #endif
  95. // Lowest Id reported by the Application.
  96. #ifndef SEGGER_SYSVIEW_ID_BASE
  97. #define SEGGER_SYSVIEW_ID_BASE 0
  98. #endif
  99. // Number of bits to shift Ids to save bandwidth
  100. #ifndef SEGGER_SYSVIEW_ID_SHIFT
  101. #define SEGGER_SYSVIEW_ID_SHIFT 0
  102. #endif
  103. #ifndef SEGGER_SYSVIEW_GET_INTERRUPT_ID
  104. #error "SEGGER_SYSVIEW_GET_INTERRUPT_ID has to be defined in SEGGER_SYSVIEW_Conf.h!"
  105. #endif
  106. #ifndef SEGGER_SYSVIEW_MAX_ARGUMENTS
  107. #define SEGGER_SYSVIEW_MAX_ARGUMENTS 16
  108. #endif
  109. #ifndef SEGGER_SYSVIEW_MAX_STRING_LEN
  110. #define SEGGER_SYSVIEW_MAX_STRING_LEN 128
  111. #endif
  112. // Use a static buffer instead of a buffer on the stack for packets
  113. #ifndef SEGGER_SYSVIEW_USE_STATIC_BUFFER
  114. #define SEGGER_SYSVIEW_USE_STATIC_BUFFER 1
  115. #endif
  116. // Maximum packet size used by SystemView for the static buffer
  117. #ifndef SEGGER_SYSVIEW_MAX_PACKET_SIZE
  118. #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
  119. #endif
  120. // Use post-mortem analysis instead of real-time analysis
  121. #ifndef SEGGER_SYSVIEW_POST_MORTEM_MODE
  122. #define SEGGER_SYSVIEW_POST_MORTEM_MODE 0
  123. #endif
  124. // Configure how frequently syncronization is sent
  125. #ifndef SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT
  126. #define SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT 8
  127. #endif
  128. // Lock SystemView (nestable)
  129. #ifndef SEGGER_SYSVIEW_LOCK
  130. #define SEGGER_SYSVIEW_LOCK() SEGGER_RTT_LOCK()
  131. #endif
  132. // Unlock SystemView (nestable)
  133. #ifndef SEGGER_SYSVIEW_UNLOCK
  134. #define SEGGER_SYSVIEW_UNLOCK() SEGGER_RTT_UNLOCK()
  135. #endif
  136. #ifdef __cplusplus
  137. }
  138. #endif
  139. #endif
  140. /*************************** End of file ****************************/