1# Copyright (c) 2016 Nordic Semiconductor ASA 2# SPDX-License-Identifier: Apache-2.0 3 4config ZEPHYR_SEGGER_MODULE 5 bool 6 7config HAS_SEGGER_RTT 8 bool 9 help 10 Indicates that the platform supports SEGGER J-Link RTT. 11 12config USE_SEGGER_RTT 13 bool "SEGGER RTT libraries." 14 depends on HAS_SEGGER_RTT 15 select STM32_ENABLE_DEBUG_SLEEP_STOP if SOC_FAMILY_STM32 16 help 17 Enable Segger J-Link RTT libraries for platforms that support it. 18 Selection of this option enables use of RTT for various subsystems. 19 Note that by enabling this option, RTT buffers consume more RAM. 20 21if USE_SEGGER_RTT 22 23config SEGGER_RTT_CUSTOM_LOCKING 24 bool "Custom locking" 25 help 26 Enable custom locking using Zephyr APIs. 27 28config SEGGER_RTT_CB_ALIGNMENT 29 int "Alignment of the RTT control block" 30 default 16 31 help 32 Specify the alignment of the RTT control block in memory. The default 33 alignment of 16 bytes is chosen because PyOCD fails to discover blocks 34 where the 16 byte `acID` field falls across a 32 byte boundary. 35 36config SEGGER_RTT_MAX_NUM_UP_BUFFERS 37 int "Maximum number of up-buffers" 38 default 3 39 40config SEGGER_RTT_MAX_NUM_DOWN_BUFFERS 41 int "Maximum number of down-buffers" 42 default 3 43 44config SEGGER_RTT_BUFFER_SIZE_UP 45 int "Size of the buffer for terminal output of target, up to host" 46 default 1024 47 48config SEGGER_RTT_BUFFER_SIZE_DOWN 49 int "Size of the buffer for terminal input of target, from host" 50 default 16 51 52config SEGGER_RTT_PRINTF_BUFFER_SIZE 53 int "Size of buffer for RTT printf to bulk-send chars via RTT" 54 default 64 55 56choice SEGGER_RTT_MODE 57 prompt "Mode for pre-initialized terminal channel (buffer 0)" 58 default SEGGER_RTT_MODE_NO_BLOCK_SKIP 59 60config SEGGER_RTT_MODE_NO_BLOCK_SKIP 61 bool "Skip. Do not block, output nothing." 62 63config SEGGER_RTT_MODE_NO_BLOCK_TRIM 64 bool "Trim: Do not block, output as much as fits." 65 66config SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL 67 bool "Block: Wait until there is space in the buffer." 68 69endchoice 70 71config SEGGER_RTT_MODE 72 int 73 default 2 if SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL 74 default 1 if SEGGER_RTT_MODE_NO_BLOCK_TRIM 75 default 0 76 77config SEGGER_RTT_MEMCPY_USE_BYTELOOP 78 bool "Use a simple byte-loop instead of standard memcpy" 79 80choice SEGGER_RTT_SECTION 81 prompt "Choose RTT data linker section" 82 default SEGGER_RTT_SECTION_CUSTOM 83 84config SEGGER_RTT_SECTION_NONE 85 bool "Place RTT data in the default linker section" 86 87config SEGGER_RTT_SECTION_DTCM 88 bool "Place RTT data in the DTCM linker section" 89 90config SEGGER_RTT_SECTION_CCM 91 bool "Place RTT data in the CCM linker section" 92 93if CPU_CORTEX_M 94 95config SEGGER_RTT_SECTION_CUSTOM 96 bool "Place RTT data in custom linker section at RAM start" 97 98config SEGGER_RTT_SECTION_CUSTOM_DTS_REGION 99 bool "Place RTT data in custom linker section defined by a memory region in DTS" 100 help 101 The DTS memory section needs to have the "rtt_custom_section" alias. 102 103endif 104 105endchoice 106 107if SEGGER_RTT_SECTION_CUSTOM || SEGGER_RTT_SECTION_CUSTOM_DTS_REGION 108 109config SEGGER_RTT_SECTION_CUSTOM_NAME 110 string "Name of RTT data custom linker section" 111 default ".rtt_buff_data" 112 113endif 114 115choice SEGGER_RTT_INIT_MODE 116 prompt "RTT Initialization mode" 117 help 118 RTT initialization function can avoid re-init of Control Block 119 if another program (e.g. bootloader) has already initialized it. 120 default SEGGER_RTT_INIT_MODE_STRONG_CHECK if SEGGER_RTT_SECTION_CUSTOM 121 default SEGGER_RTT_INIT_MODE_STRONG_CHECK 122 123config SEGGER_RTT_INIT_MODE_ALWAYS 124 bool "RTT Initialization done without conditions" 125 126config SEGGER_RTT_INIT_MODE_STRONG_CHECK 127 bool "RTT Initialization done if full check on Control Block ID fails" 128 129config SEGGER_RTT_INIT_MODE_WEAK_CHECK 130 bool "RTT Initialization done if partial check on Control Block ID fails" 131 132endchoice 133 134endif 135