SEGGER_SYSVIEW_ConfDefaults.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. /*********************************************************************
  2. * SEGGER Microcontroller GmbH *
  3. * The Embedded Experts *
  4. **********************************************************************
  5. * *
  6. * (c) 1995 - 2021 SEGGER Microcontroller GmbH *
  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 SystemView and 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. * condition is met: *
  25. * *
  26. * o Redistributions of source code must retain the above copyright *
  27. * notice, this condition and the following disclaimer. *
  28. * *
  29. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
  30. * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
  31. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
  32. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
  33. * DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
  34. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
  35. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
  36. * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
  37. * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
  38. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
  39. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
  40. * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
  41. * DAMAGE. *
  42. * *
  43. **********************************************************************
  44. * *
  45. * SystemView version: 3.32 *
  46. * *
  47. **********************************************************************
  48. -------------------------- END-OF-HEADER -----------------------------
  49. File : SEGGER_SYSVIEW_ConfDefaults.h
  50. Purpose : Defines defaults for configurable defines used in
  51. SEGGER SystemView.
  52. Revision: $Rev: 26230 $
  53. */
  54. #ifndef SEGGER_SYSVIEW_CONFDEFAULTS_H
  55. #define SEGGER_SYSVIEW_CONFDEFAULTS_H
  56. /*********************************************************************
  57. *
  58. * #include Section
  59. *
  60. **********************************************************************
  61. */
  62. #include "SEGGER_SYSVIEW_Conf.h"
  63. #include "SEGGER_RTT_Conf.h"
  64. #ifdef __cplusplus
  65. extern "C" {
  66. #endif
  67. /*********************************************************************
  68. *
  69. * Defines, fixed
  70. *
  71. **********************************************************************
  72. */
  73. //
  74. // Use auto-detection for SEGGER_SYSVIEW_CORE define
  75. // based on compiler-/toolchain-specific defines
  76. // to define SEGGER_SYSVIEW_GET_INTERRUPT_ID and SEGGER_SYSVIEW_GET_TIMESTAMP
  77. //
  78. #define SEGGER_SYSVIEW_CORE_OTHER 0
  79. #define SEGGER_SYSVIEW_CORE_CM0 1 // Cortex-M0/M0+/M1
  80. #define SEGGER_SYSVIEW_CORE_CM3 2 // Cortex-M3/M4/M7
  81. #define SEGGER_SYSVIEW_CORE_RX 3 // Renesas RX
  82. #ifndef SEGGER_SYSVIEW_CORE
  83. #if (defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __SEGGER_CC__) || (defined __GNUC__) || (defined __clang__)
  84. #if (defined __ARM_ARCH_6M__) || (defined __ARM_ARCH_8M_BASE__)
  85. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
  86. #elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__))
  87. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
  88. #endif
  89. #elif defined(__ICCARM__)
  90. #if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) \
  91. || (defined (__ARM8M_BASELINE__) && (__CORE__ == __ARM8M_BASELINE__))
  92. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
  93. #elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) \
  94. || (defined (__ARM7M__) && (__CORE__ == __ARM7M__)) \
  95. || (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) \
  96. || (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__))
  97. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
  98. #endif
  99. #elif defined(__CC_ARM)
  100. #if (defined(__TARGET_ARCH_6S_M))
  101. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
  102. #elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M))
  103. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
  104. #endif
  105. #elif defined(__TI_ARM__)
  106. #ifdef __TI_ARM_V6M0__
  107. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
  108. #elif (defined(__TI_ARM_V7M3__) || defined(__TI_ARM_V7M4__))
  109. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
  110. #endif
  111. #elif defined(__ICCRX__)
  112. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX
  113. #elif defined(__RX)
  114. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX
  115. #endif
  116. #ifndef SEGGER_SYSVIEW_CORE
  117. #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_OTHER
  118. #endif
  119. #endif
  120. /*********************************************************************
  121. *
  122. * Defines, defaults
  123. *
  124. **********************************************************************
  125. */
  126. /*********************************************************************
  127. *
  128. * Define: SEGGER_SYSVIEW_APP_NAME
  129. *
  130. * Description
  131. * The application name to be displayed in SystemView.
  132. * Default
  133. * "SystemView-enabled Application"
  134. * Notes
  135. * Convenience define to be used for SEGGER_SYSVIEW_SendSysDesc().
  136. */
  137. #ifndef SEGGER_SYSVIEW_APP_NAME
  138. #define SEGGER_SYSVIEW_APP_NAME "SystemView-enabled Application"
  139. #endif
  140. /*********************************************************************
  141. *
  142. * Define: SEGGER_SYSVIEW_DEVICE_NAME
  143. *
  144. * Description
  145. * The target device name to be displayed in SystemView.
  146. * Default
  147. * "undefined device"
  148. * Notes
  149. * Convenience define to be used for SEGGER_SYSVIEW_SendSysDesc().
  150. */
  151. #ifndef SEGGER_SYSVIEW_DEVICE_NAME
  152. #define SEGGER_SYSVIEW_DEVICE_NAME "undefined device"
  153. #endif
  154. /*********************************************************************
  155. *
  156. * Define: SEGGER_SYSVIEW_GET_INTERRUPT_ID()
  157. *
  158. * Description
  159. * Function macro to retrieve the Id of the currently active
  160. * interrupt.
  161. * Default
  162. * Call user-supplied function SEGGER_SYSVIEW_X_GetInterruptId().
  163. * Notes
  164. * For some known compilers and cores, a ready-to-use, core-specific
  165. * default is set.
  166. * ARMv7M: Read ICSR[8:0] (active vector)
  167. * ARMv6M: Read ICSR[5:0] (active vector)
  168. */
  169. #ifndef SEGGER_SYSVIEW_GET_INTERRUPT_ID
  170. #if SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3
  171. #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x1FF) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[8:0] = active vector)
  172. #elif SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM0
  173. #if defined(__ICCARM__)
  174. #if (__VER__ > 6010000)
  175. #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() (__get_IPSR()) // Workaround for IAR, which might do a byte-access to 0xE000ED04. Read IPSR instead.
  176. #else
  177. #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Older versions of IAR do not include __get_IPSR, but might also not optimize to byte-access.
  178. #endif
  179. #else
  180. #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[5:0] = active vector)
  181. #endif
  182. #else
  183. #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() // Get the currently active interrupt Id from the user-provided function.
  184. #endif
  185. #endif
  186. /*********************************************************************
  187. *
  188. * Define: SEGGER_SYSVIEW_GET_TIMESTAMP()
  189. *
  190. * Description
  191. * Function macro to retrieve a system timestamp for SYSVIEW events.
  192. * Default
  193. * Call user-supplied function SEGGER_SYSVIEW_X_GetTimestamp().
  194. * Notes
  195. * For some known compilers and cores, a ready-to-use, core-specific
  196. * default is set.
  197. * ARMv7M: Read Cortex-M Cycle Count register.
  198. *
  199. * The system timestamp clock frequency has to be passed in
  200. * SEGGER_SYSVIEW_Init().
  201. */
  202. #ifndef SEGGER_SYSVIEW_GET_TIMESTAMP
  203. #if defined (SEGGER_SYSVIEW_CORE) && (SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3)
  204. #define SEGGER_SYSVIEW_GET_TIMESTAMP() (*(U32 *)(0xE0001004)) // Retrieve a system timestamp. Cortex-M cycle counter.
  205. #else
  206. #define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() // Retrieve a system timestamp via user-defined function
  207. #endif
  208. #endif
  209. /*********************************************************************
  210. *
  211. * Define: SEGGER_SYSVIEW_TIMESTAMP_BITS
  212. *
  213. * Description
  214. * Number of valid (low-order) bits delivered in system timestamp.
  215. * Default
  216. * 32
  217. * Notes
  218. * Value has to match system timestamp clock source.
  219. */
  220. // Define number of valid bits low-order delivered by clock source.
  221. #ifndef SEGGER_SYSVIEW_TIMESTAMP_BITS
  222. #define SEGGER_SYSVIEW_TIMESTAMP_BITS 32
  223. #endif
  224. /*********************************************************************
  225. *
  226. * Define: SEGGER_SYSVIEW_RTT_CHANNEL
  227. *
  228. * Description
  229. * The RTT channel that SystemView will use.
  230. * Default
  231. * 0: Auto selection.
  232. * Notes
  233. * Value has to be lower than SEGGER_RTT_MAX_NUM_UP_BUFFERS.
  234. */
  235. #ifndef SEGGER_SYSVIEW_RTT_CHANNEL
  236. #define SEGGER_SYSVIEW_RTT_CHANNEL 0
  237. #endif
  238. // Sanity check of RTT channel
  239. #if (SEGGER_SYSVIEW_RTT_CHANNEL == 0) && (SEGGER_RTT_MAX_NUM_UP_BUFFERS < 2)
  240. #error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > 1!"
  241. #elif (SEGGER_SYSVIEW_RTT_CHANNEL >= SEGGER_RTT_MAX_NUM_UP_BUFFERS)
  242. #error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > SEGGER_SYSVIEW_RTT_CHANNEL!"
  243. #endif
  244. /*********************************************************************
  245. *
  246. * Define: SEGGER_SYSVIEW_RTT_BUFFER_SIZE
  247. *
  248. * Description
  249. * Number of bytes that SystemView uses for the RTT buffer.
  250. * Default
  251. * 1024
  252. */
  253. #ifndef SEGGER_SYSVIEW_RTT_BUFFER_SIZE
  254. #define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 1024
  255. #endif
  256. /*********************************************************************
  257. *
  258. * Define: SEGGER_SYSVIEW_SECTION
  259. *
  260. * Description
  261. * Section to place the SystemView RTT Buffer into.
  262. * Default
  263. * undefined: Do not place into a specific section.
  264. * Notes
  265. * If SEGGER_RTT_SECTION is defined, the default changes to use
  266. * this section for the SystemView RTT Buffer, too.
  267. */
  268. #if !(defined SEGGER_SYSVIEW_SECTION) && (defined SEGGER_RTT_SECTION)
  269. #define SEGGER_SYSVIEW_SECTION SEGGER_RTT_SECTION
  270. #endif
  271. /*********************************************************************
  272. *
  273. * Define: SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE
  274. *
  275. * Description
  276. * Largest cache line size (in bytes) in the target system.
  277. * Default
  278. * 0
  279. * Notes
  280. * Required in systems with caches to make sure that the SystemView
  281. * RTT buffer can be aligned accordingly.
  282. */
  283. #ifndef SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE
  284. #define SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE 0
  285. #endif
  286. /*********************************************************************
  287. *
  288. * Define: SEGGER_SYSVIEW_ID_BASE
  289. *
  290. * Description
  291. * Lowest Id reported by the application.
  292. * Default
  293. * 0
  294. * Notes
  295. * Value is usually subtracted from mailboxes, semaphores, tasks,
  296. * .... addresses, to compress event parameters.
  297. * Should be the lowest RAM address of the system.
  298. */
  299. #ifndef SEGGER_SYSVIEW_ID_BASE
  300. #define SEGGER_SYSVIEW_ID_BASE 0
  301. #endif
  302. /*********************************************************************
  303. *
  304. * Define: SEGGER_SYSVIEW_ID_SHIFT
  305. *
  306. * Description
  307. * Number of bits to shift Ids.
  308. * Default
  309. * 0
  310. * Notes
  311. * Ids are shifted to compress event parameters.
  312. * Should match the alignment of Ids (addresses),
  313. * e.g. 2 when Ids are 4 byte aligned.
  314. */
  315. #ifndef SEGGER_SYSVIEW_ID_SHIFT
  316. #define SEGGER_SYSVIEW_ID_SHIFT 0
  317. #endif
  318. /*********************************************************************
  319. *
  320. * Define: SEGGER_SYSVIEW_MAX_ARGUMENTS
  321. *
  322. * Description
  323. * Maximum number of arguments which are handled with SystemView
  324. * print routines or may be encoded in one recording function.
  325. * routines.
  326. * Default
  327. * 16
  328. */
  329. #ifndef SEGGER_SYSVIEW_MAX_ARGUMENTS
  330. #define SEGGER_SYSVIEW_MAX_ARGUMENTS 16
  331. #endif
  332. /*********************************************************************
  333. *
  334. * Define: SEGGER_SYSVIEW_MAX_STRING_LEN
  335. *
  336. * Description
  337. * Maximum string length which can be used in SystemView print and
  338. * system description routines.
  339. * Default
  340. * 128
  341. */
  342. #ifndef SEGGER_SYSVIEW_MAX_STRING_LEN
  343. #define SEGGER_SYSVIEW_MAX_STRING_LEN 128
  344. #endif
  345. /*********************************************************************
  346. *
  347. * Define: SEGGER_SYSVIEW_SUPPORT_LONG_ID
  348. *
  349. * Description
  350. * It set, support enconding Evend Ids longer than 14 bit.
  351. * Default
  352. * 1
  353. */
  354. #ifndef SEGGER_SYSVIEW_SUPPORT_LONG_ID
  355. #define SEGGER_SYSVIEW_SUPPORT_LONG_ID 1
  356. #endif
  357. /*********************************************************************
  358. *
  359. * Define: SEGGER_SYSVIEW_SUPPORT_LONG_DATA
  360. *
  361. * Description
  362. * It set, support enconding event data longer than 14 bit.
  363. * Default
  364. * 0
  365. */
  366. #ifndef SEGGER_SYSVIEW_SUPPORT_LONG_DATA
  367. #define SEGGER_SYSVIEW_SUPPORT_LONG_DATA 0
  368. #endif
  369. /*********************************************************************
  370. *
  371. * Define: SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT
  372. *
  373. * Description
  374. * If enabled, on SEGGER_SYSVIEW_PrintHost, check the format string
  375. * and if it includes unsupported formatters, use formatting on the
  376. * target instead.
  377. * Default
  378. * 0: Disabled.
  379. */
  380. #ifndef SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT
  381. #define SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT 0
  382. #endif
  383. /*********************************************************************
  384. *
  385. * Define: SEGGER_SYSVIEW_USE_INTERNAL_RECORDER
  386. *
  387. * Description
  388. * If set, an internal recorder, such as UART or IP is used.
  389. * Default
  390. * 0: Disabled.
  391. * Notes
  392. * Convenience define to be used by SEGGER_SYSVIEW_Conf(),
  393. * such as in embOS configuration to enable Cortex-M cycle counter.
  394. */
  395. #ifndef SEGGER_SYSVIEW_USE_INTERNAL_RECORDER
  396. #define SEGGER_SYSVIEW_USE_INTERNAL_RECORDER 0
  397. #endif
  398. /*********************************************************************
  399. *
  400. * Define: SEGGER_SYSVIEW_CAN_RESTART
  401. *
  402. * Description
  403. * If enabled, send the SystemView start sequence on every start
  404. * command, not just on the first one.
  405. * Enables restart when SystemView disconnected unexpectedly.
  406. * Default
  407. * 1: Enabled
  408. */
  409. #ifndef SEGGER_SYSVIEW_CAN_RESTART
  410. #define SEGGER_SYSVIEW_CAN_RESTART 1
  411. #endif
  412. /*********************************************************************
  413. *
  414. * Define: SEGGER_SYSVIEW_START_ON_INIT
  415. *
  416. * Description
  417. * Enable calling SEGGER_SYSVIEW_Start() after initialization.
  418. * Default
  419. * 0: Disabled.
  420. * Notes
  421. * Convenience define to be used by SEGGER_SYSVIEW_Conf(),
  422. * such as in embOS configuration.
  423. */
  424. #ifndef SEGGER_SYSVIEW_START_ON_INIT
  425. #define SEGGER_SYSVIEW_START_ON_INIT 0
  426. #endif
  427. /*********************************************************************
  428. *
  429. * Define: SEGGER_SYSVIEW_USE_STATIC_BUFFER
  430. *
  431. * Description
  432. * If enabled, use a static buffer instead of a buffer on the stack
  433. * for SystemView event packets.
  434. * Default
  435. * 1: Enabled.
  436. * Notes
  437. * If enabled, the static memory use by SystemView is increased by
  438. * the maximum packet size. SystemView is locked on entry of a
  439. * recording function.
  440. * If disabled, the stack usage by SystemView recording functions
  441. * might be increased by up to the maximum packet size. SystemView
  442. * is locked when writing the packet to the RTT buffer.
  443. */
  444. #ifndef SEGGER_SYSVIEW_USE_STATIC_BUFFER
  445. #define SEGGER_SYSVIEW_USE_STATIC_BUFFER 1
  446. #endif
  447. /*********************************************************************
  448. *
  449. * Define: SEGGER_SYSVIEW_MAX_PACKET_SIZE
  450. *
  451. * Description
  452. * Maximum packet size for a SystemView event.
  453. * Default
  454. * Automatically calculated.
  455. * Notes
  456. * The maximum packet size is mainly defined by the maximum string
  457. * length and the maximum number of arguments.
  458. */
  459. #ifndef SEGGER_SYSVIEW_MAX_PACKET_SIZE
  460. #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)
  461. #endif
  462. /*********************************************************************
  463. *
  464. * Define: SEGGER_SYSVIEW_POST_MORTEM_MODE
  465. *
  466. * Description
  467. * If enabled, SystemView records for post-mortem analysis instead
  468. * of real-time analysis.
  469. * Default
  470. * 0: Disabled.
  471. * Notes
  472. * For more information refer to
  473. * https://www.segger.com/products/development-tools/systemview/technology/post-mortem-mode
  474. */
  475. #ifndef SEGGER_SYSVIEW_POST_MORTEM_MODE
  476. #define SEGGER_SYSVIEW_POST_MORTEM_MODE 0
  477. #endif
  478. /*********************************************************************
  479. *
  480. * Define: SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT
  481. *
  482. * Description
  483. * Configure how frequently syncronization is sent in post-mortem
  484. * mode.
  485. * Default
  486. * 8: (1 << 8) = Every 256 Events.
  487. * Notes
  488. * In post-mortem mode, at least one sync has to be in the RTT buffer.
  489. * Recommended sync frequency: Buffer Size / 16
  490. * For more information refer to
  491. * https://www.segger.com/products/development-tools/systemview/technology/post-mortem-mode
  492. */
  493. #ifndef SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT
  494. #define SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT 8
  495. #endif
  496. /*********************************************************************
  497. *
  498. * Define: SEGGER_SYSVIEW_ON_EVENT_RECORDED()
  499. *
  500. * Description
  501. * Function macro to notify recorder about a new event in buffer.
  502. * Default
  503. * undefined: Do not notify recorder.
  504. * Notes
  505. * Used for non-J-Link recorder,
  506. * such as to enable transmission via UART or notify IP task.
  507. */
  508. #ifndef SEGGER_SYSVIEW_ON_EVENT_RECORDED
  509. #define SEGGER_SYSVIEW_ON_EVENT_RECORDED(NumBytes)
  510. #endif
  511. /*********************************************************************
  512. *
  513. * Define: SEGGER_SYSVIEW_LOCK()
  514. *
  515. * Description
  516. * Function macro to (nestable) lock SystemView recording.
  517. * Default
  518. * Use RTT Locking mechanism (defined by SEGGER_RTT_LOCK()).
  519. * Notes
  520. * If SystemView recording is not locked, recording events from
  521. * interrupts and tasks may lead to unpredictable, undefined, event
  522. * data.
  523. */
  524. #ifndef SEGGER_SYSVIEW_LOCK
  525. #define SEGGER_SYSVIEW_LOCK() SEGGER_RTT_LOCK()
  526. #endif
  527. /*********************************************************************
  528. *
  529. * Define: SEGGER_SYSVIEW_UNLOCK
  530. *
  531. * Description
  532. * Function macro to unlock SystemView recording.
  533. * Default
  534. * Use RTT Unlocking mechanism (defined by SEGGER_RTT_UNLOCK()).
  535. */
  536. #ifndef SEGGER_SYSVIEW_UNLOCK
  537. #define SEGGER_SYSVIEW_UNLOCK() SEGGER_RTT_UNLOCK()
  538. #endif
  539. #ifdef __cplusplus
  540. }
  541. #endif
  542. #endif
  543. /*************************** End of file ****************************/