Skip to content

Commit 7d4058a

Browse files
Damian-Nordicrlubos
authored andcommitted
samples: nrf_rpc: clean protocols serialization configuration
1. Enable NUS debug logging for all client builds 2. Do not turn off optimizations for debug builds 3. Use ZMS instead of NVS on nRF54L15 client 4. Other minor cleanup. Signed-off-by: Damian Krolik <[email protected]>
1 parent ab80a43 commit 7d4058a

File tree

8 files changed

+37
-36
lines changed

8 files changed

+37
-36
lines changed

samples/nrf_rpc/protocols_serialization/client/Kconfig

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66

77
menu "Protocols serialization client"
88

9-
choice BT_NUS_LOG_LEVEL_CHOICE
10-
default BT_NUS_LOG_LEVEL_DBG if DEBUG
11-
endchoice
12-
139
config RPC_CRASH_LOG_READ_BUFFER_SIZE
1410
int "Crash log read buffer size"
1511
depends on LOG_FORWARDER_RPC
@@ -24,6 +20,16 @@ source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
2420

2521
endmenu # "Protocols serialization client"
2622

23+
if SETTINGS
24+
25+
config ZMS
26+
default y if (SOC_FLASH_NRF_RRAM || SOC_FLASH_NRF_MRAM)
27+
28+
config NVS
29+
default y if !(SOC_FLASH_NRF_RRAM || SOC_FLASH_NRF_MRAM)
30+
31+
endif # SETTINGS
32+
2733
menu "Zephyr Kernel"
2834
source "Kconfig.zephyr"
2935
endmenu

samples/nrf_rpc/protocols_serialization/client/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CONFIG_UART_INTERRUPT_DRIVEN=y
1919
CONFIG_SHELL=y
2020
CONFIG_LOG=y
2121
CONFIG_LOG_MODE_DEFERRED=y
22-
CONFIG_LOG_BUFFER_SIZE=4096
22+
CONFIG_LOG_BUFFER_SIZE=8192
2323
CONFIG_LOG_FUNC_NAME_PREFIX_DBG=n
2424
CONFIG_LOG_BACKEND_RTT=n
2525
CONFIG_SHELL_LOG_BACKEND=y

samples/nrf_rpc/protocols_serialization/client/snippets/ble/ble.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ CONFIG_BT_SHELL=y
2121

2222
# Enable the NUS service
2323
CONFIG_BT_NUS=y
24+
CONFIG_BT_NUS_LOG_LEVEL_DBG=y
2425

2526
# Enable bonding
2627
CONFIG_BT_SETTINGS=y
28+
CONFIG_SETTINGS=y
2729
CONFIG_FLASH=y
2830
CONFIG_FLASH_PAGE_LAYOUT=y
2931
CONFIG_FLASH_MAP=y
30-
CONFIG_NVS=y
31-
CONFIG_SETTINGS=y
3232

3333
# TODO check why this is needed when OT is turned on
3434
CONFIG_ENTROPY_BT_HCI=n

samples/nrf_rpc/protocols_serialization/client/snippets/debug/debug.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7-
# Reduce optimization level for easier debugging.
8-
CONFIG_DEBUG=y
9-
107
# Enable asserts
118
CONFIG_ASSERT=y
129

samples/nrf_rpc/protocols_serialization/client/snippets/openthread/openthread.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CONFIG_OPENTHREAD_RPC=y
88
CONFIG_OPENTHREAD_RPC_CLIENT=y
99

1010
CONFIG_NETWORKING=y
11-
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=5
11+
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=6
1212

1313
# Enable networking shell to test the network interface operation
1414
CONFIG_NET_SHELL=y

samples/nrf_rpc/protocols_serialization/server/Kconfig

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,29 @@
66

77
menu "Protocols serialization server"
88

9+
config NRF_PS_SERVER_FATAL_ERROR_TRIGGER
10+
bool "Fatal error trigger"
11+
select DK_LIBRARY
12+
help
13+
Enables triggering a fatal error by pressing Button 1 on the development
14+
kit. This trigger allows for testing the feature of logging over RPC that
15+
provides an RPC client with access to the crash log stored in the retained
16+
RAM partition.
17+
18+
module = NRF_PS_SERVER
19+
module-str = nrf_ps_server
20+
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
21+
22+
endmenu # "Protocols serialization server"
23+
924
config ZMS
1025
default y if (SOC_FLASH_NRF_RRAM || SOC_FLASH_NRF_MRAM)
1126

1227
config NVS
1328
default y if !(SOC_FLASH_NRF_RRAM || SOC_FLASH_NRF_MRAM)
1429

30+
if LOG
31+
1532
choice LOG_MODE
1633
default LOG_MODE_DEFERRED
1734
endchoice
@@ -28,6 +45,8 @@ config LOG_BACKEND_RTT
2845
config LOG_BACKEND_UART
2946
default n
3047

48+
endif # LOG
49+
3150
if SOC_NRF54L15
3251

3352
config BT_CTLR_ECDH
@@ -36,22 +55,11 @@ config BT_CTLR_ECDH
3655
config BT_LONG_WQ_STACK_SIZE
3756
default 2048
3857

39-
endif
40-
41-
config NRF_PS_SERVER_FATAL_ERROR_TRIGGER
42-
bool "Fatal error trigger"
43-
select DK_LIBRARY
44-
help
45-
Enables triggering a fatal error by pressing Button 1 on the development
46-
kit. This trigger allows for testing the feature of logging over RPC that
47-
provides an RPC client with access to the crash log stored in the retained
48-
RAM partition.
49-
50-
module = NRF_PS_SERVER
51-
module-str = nrf_ps_server
52-
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
58+
choice TRUSTED_STORAGE_BACKEND_AEAD_KEY
59+
default TRUSTED_STORAGE_BACKEND_AEAD_KEY_HASH_UID if TRUSTED_STORAGE_BACKEND_AEAD
60+
endchoice
5361

54-
endmenu # "Protocols serialization server"
62+
endif # SOC_NRF54L15
5563

5664
menu "Zephyr Kernel"
5765
source "Kconfig.zephyr"

samples/nrf_rpc/protocols_serialization/server/boards/nrf54l15dk_nrf54l15_cpuapp.conf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,3 @@
55
#
66
CONFIG_MAIN_STACK_SIZE=4196
77
CONFIG_NRF_RPC_THREAD_STACK_SIZE=6144
8-
9-
# USE HASH UID instead of HUK for this sample, because Partition Manager is not available
10-
CONFIG_TRUSTED_STORAGE_BACKEND_AEAD_KEY_HASH_UID=y
11-
12-
# Workaround required as Zephyr L2 implies usage of NVS backend for settings.
13-
# It should be removed once the proper fix will be applied in Zephyr.
14-
CONFIG_NVS=n

samples/nrf_rpc/protocols_serialization/server/snippets/debug/debug.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7-
# Reduce optimization level for easier debugging
8-
CONFIG_DEBUG=y
9-
107
# Enable asserts
118
CONFIG_ASSERT=y
129

0 commit comments

Comments
 (0)