drivers/segger: Refine Kconfig option

1.Add SEGGER_SYSVIEW_RTT_CHANNEL option
2.SEGGER_RTT_BUFFER_SIZE_UP always default to 1KB
3.SEGGER_SYSVIEW_RTT_BUFFER_SIZE default to SEGGER_RTT_BUFFER_SIZE_UP

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-27 13:34:25 +08:00 committed by Petro Karashchenko
parent 7c7ab96b53
commit ac365ab7e9
2 changed files with 14 additions and 5 deletions

View File

@ -51,8 +51,7 @@ config SEGGER_RTT_MAX_NUM_DOWN_BUFFERS
config SEGGER_RTT_BUFFER_SIZE_UP
int "Segger RTT UP Buffer Size"
default 1024 if SYSLOG_RTT
default 1 if !SYSLOG_RTT
default 1024
---help---
Size of the buffer for terminal output of target, up to host
@ -77,11 +76,19 @@ config SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
endchoice # SEGGER_RTT_MODE
endif # SEGGER_RTT
if SEGGER_SYSVIEW
config SEGGER_SYSVIEW_RTT_CHANNEL
int "Segger System View RTT channel"
default 0
---help---
The RTT channel number for SystemView, zero find the unused one.
config SEGGER_SYSVIEW_RTT_BUFFER_SIZE
int "Segger System View buffer size"
default 1024
default SEGGER_RTT_BUFFER_SIZE_UP
---help---
Number of bytes that SystemView uses for the RTT buffer.
@ -92,5 +99,3 @@ config SEGGER_SYSVIEW_RAM_BASE
The lowest RAM address used for IDs
endif
endif

View File

@ -43,6 +43,10 @@
#define SEGGER_SYSVIEW_GET_TIMESTAMP sysview_get_timestamp
/* The RTT channel that SystemView will use. */
#define SEGGER_SYSVIEW_RTT_CHANNEL CONFIG_SEGGER_SYSVIEW_RTT_CHANNEL
/* Number of bytes that SystemView uses for the RTT buffer. */
#define SEGGER_SYSVIEW_RTT_BUFFER_SIZE CONFIG_SEGGER_SYSVIEW_RTT_BUFFER_SIZE