From ac365ab7e955d14f4f9dabbea0775988430fa167 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 27 Nov 2022 13:34:25 +0800 Subject: [PATCH] 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 --- drivers/segger/Kconfig | 15 ++++++++++----- drivers/segger/config/SEGGER_SYSVIEW_Conf.h | 4 ++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/segger/Kconfig b/drivers/segger/Kconfig index 88ebbbec89..5b81107519 100644 --- a/drivers/segger/Kconfig +++ b/drivers/segger/Kconfig @@ -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 diff --git a/drivers/segger/config/SEGGER_SYSVIEW_Conf.h b/drivers/segger/config/SEGGER_SYSVIEW_Conf.h index 6dcadb1463..7370d2f8af 100644 --- a/drivers/segger/config/SEGGER_SYSVIEW_Conf.h +++ b/drivers/segger/config/SEGGER_SYSVIEW_Conf.h @@ -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