From a20b9502bc069cac94a55243cf091e3174a9992b Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Fri, 24 Feb 2023 18:14:23 -0500 Subject: [PATCH] feat(core): Add RTT logging Kconfig option --- app/Kconfig | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 794b6762..75a37f63 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -400,7 +400,7 @@ config ZMK_KSCAN_EVENT_QUEUE_SIZE #KSCAN Settings endmenu -menu "USB Logging" +menu "Logging" config ZMK_LOGGING_MINIMAL bool "Suppress all ZMK debug log messages" @@ -441,16 +441,38 @@ endchoice config USB_CDC_ACM_RINGBUF_SIZE default 1024 -config LOG_BUFFER_SIZE - default 8192 - config LOG_PROCESS_THREAD_STARTUP_DELAY_MS default 1000 #ZMK_USB_LOGGING endif -#USB Logging +config ZMK_RTT_LOGGING + bool "Enable RTT logging to help debug" + select LOG + select DEBUG + select ASSERT + select USE_SEGGER_RTT + select CONSOLE + select RTT_CONSOLE + +if ZMK_RTT_LOGGING + +config SEGGER_RTT_BUFFER_SIZE_UP + default 8192 + +#ZMK_RTT_LOGGING +endif + +if ZMK_USB_LOGGING || ZMK_RTT_LOGGING + +config LOG_BUFFER_SIZE + default 8192 + +#ZMK_USB_LOGGING || ZMK_RTT_LOGGING +endif + +#Logging endmenu if SETTINGS