Skip to content

Commit 5b34d1b

Browse files
anhmolteivindj-nordic
authored andcommitted
logging: backends: improve log backend Kconfig dependencies
Disabling CONFIG_LOG while having CONFIG_LOG_BACKEND_BM_UARTE enabled in the samples caused a build error. Rework the Bare Metal logging backend dependencies to better align with the zephyr logging Kconfigs. Signed-off-by: Andreas Moltumyr <[email protected]>
1 parent ee71dfb commit 5b34d1b

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

subsys/logging/Kconfig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@
55
#
66
menu "Logging"
77

8+
if LOG
9+
810
if !LOG_MODE_MINIMAL
911

12+
if !LOG_FRONTEND_ONLY
13+
1014
rsource "backends/Kconfig"
1115

12-
endif
16+
endif # !LOG_FRONTEND_ONLY
17+
18+
endif # !LOG_MODE_MINIMAL
19+
20+
endif # LOG
1321

1422
endmenu

subsys/logging/backends/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ menu "Backends"
88

99
rsource "Kconfig.bm_uarte"
1010

11+
# Disable the zephyr UART backend by default when the Bare Metal UARTE log backend is used.
12+
config LOG_BACKEND_UART
13+
depends on UART_CONSOLE
14+
default n if LOG_BACKEND_BM_UARTE
15+
1116
endmenu

subsys/logging/backends/Kconfig.bm_uarte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66

77
menuconfig LOG_BACKEND_BM_UARTE
8-
bool "UARTE log backend"
8+
bool "Bare Metal UARTE backend"
99
select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP
1010
help
1111
When enabled, the backend uses the nrfx UARTE driver to output logs and printk.

0 commit comments

Comments
 (0)