Skip to content

Commit 4700b09

Browse files
Przemyslaw Bidarlubos
authored andcommitted
nrf_rpc: applications: Add nrf applications for uart testing.
Add nrf_rpc application for testing the transport. The application uses uart0 peripheral for logging, and uart1 peripheral for RPC. Signed-off-by: Przemyslaw Bida <[email protected]>
1 parent 5de9a06 commit 4700b09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1364
-0
lines changed

.github/test-spec.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,3 +552,9 @@
552552
- "tests/subsys/event_manager_proxy/**/*"
553553
- "tests/benchmarks/multicore/**/*"
554554
- "tests/drivers/pwm/**/*"
555+
556+
"CI-ps-test":
557+
- "applications/protocols_serialization/**/*"
558+
- "samples/nrf_rpc/ps_client/**/*"
559+
- "subsys/net/openthread/rpc/**/*"
560+
- "subsys/nrf_rpc/**/*"

CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
/applications/nrf_desktop/ @MarekPieta
3838
/applications/nrf5340_audio/ @nrfconnect/ncs-audio
3939
/applications/audio/ @nrfconnect/ncs-audio
40+
/applications/protocols_serialization/ @nrfconnect/ncs-protocols-serialization
4041
/applications/serial_lte_modem/ @SeppoTakalo @MarkusLassila @rlubos @tomi-font
4142
/applications/zigbee_weather_station/ @milewr
4243
# Boards
@@ -193,6 +194,7 @@ Kconfig* @tejlmand
193194
/samples/cellular/sms/ @trantanen @tokangas
194195
/samples/openthread/ @rlubos @edmont @canisLupus1313 @maciejbaczmanski
195196
/samples/nrf_profiler/ @pdunaj
197+
/samples/nrf_rpc/ps_client/ @nrfconnect/ncs-protocols-serialization
196198
/samples/peripheral/radio_test/ @KAGA164 @maje-emb
197199
/samples/peripheral/lpuart/ @nordic-krch
198200
/samples/peripheral/802154_phy_test/ @ankuns @piotrkoziar
@@ -242,6 +244,8 @@ Kconfig* @tejlmand
242244
/snippets/nrf70-debug/ @krish2718 @sachinthegreen
243245
/snippets/nrf70-fw-patch-ext-flash/ @krish2718 @sachinthegreen
244246
/snippets/nordic-bt-rpc/ @ppryga-nordic
247+
/snippets/ci-shell/ @nrfconnect/ncs-protocols-serialization
248+
/snippets/zperf/ @nrfconnect/ncs-protocols-serialization
245249
/subsys/audio_module/ @nrfconnect/ncs-audio
246250
/subsys/bluetooth/ @alwa-nordic @jori-nordic @carlescufi @KAGA164
247251
/subsys/bluetooth/mesh/ @ludvigsj
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
cmake_minimum_required(VERSION 3.20.0)
7+
8+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
9+
10+
project(protocols_serialization_server)
11+
12+
# NORDIC SDK APP START
13+
target_sources(app PRIVATE src/main.c)
14+
# NORDIC SDK APP END
15+
16+
# Link OpenThread CLI even though OPENTHREAD_SHELL is not selected
17+
if(CONFIG_OPENTHREAD_RPC)
18+
zephyr_link_libraries(openthread-cli-ftd)
19+
endif()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
menu "Zephyr Kernel"
8+
source "Kconfig.zephyr"
9+
endmenu
10+
11+
module = NRF_RPC_REMOTE
12+
module-str = nrf_rpc_remote
13+
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* Copyright (c) 2024 Nordic Semiconductor ASA
2+
*
3+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
*/
5+
6+
/ {
7+
chosen {
8+
nordic,rpc-uart = &uart1;
9+
};
10+
};
11+
12+
&uart1 {
13+
status = "okay";
14+
hw-flow-control;
15+
current-speed = <1000000>;
16+
};
17+
18+
&uart1_default {
19+
group1 {
20+
psels = <NRF_PSEL(UART_RX, 1, 1)>,
21+
<NRF_PSEL(UART_RTS, 1, 3)>;
22+
bias-pull-up;
23+
};
24+
group2 {
25+
psels = <NRF_PSEL(UART_TX, 1, 2)>,
26+
<NRF_PSEL(UART_CTS, 1, 4)>;
27+
};
28+
};
29+
30+
&uart1_sleep {
31+
group1 {
32+
psels = <NRF_PSEL(UART_RX, 1, 1)>,
33+
<NRF_PSEL(UART_TX, 1, 2)>,
34+
<NRF_PSEL(UART_RTS, 1, 3)>,
35+
<NRF_PSEL(UART_CTS, 1, 4)>;
36+
low-power-enable;
37+
};
38+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
CONFIG_MAIN_STACK_SIZE=4196
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* Copyright (c) 2024 Nordic Semiconductor ASA
2+
*
3+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
*/
5+
6+
/ {
7+
chosen {
8+
nordic,rpc-uart = &uart21;
9+
};
10+
};
11+
12+
&pinctrl {
13+
uart21_default: uart21_default {
14+
group1 {
15+
psels = <NRF_PSEL(UART_TX, 1, 11)>,
16+
<NRF_PSEL(UART_RTS, 1, 12)>;
17+
};
18+
group2 {
19+
psels = <NRF_PSEL(UART_RX, 1, 10)>,
20+
<NRF_PSEL(UART_CTS, 1, 13)>;
21+
bias-pull-up;
22+
};
23+
};
24+
25+
uart21_sleep: uart21_sleep {
26+
group1 {
27+
psels = <NRF_PSEL(UART_TX, 1, 11)>,
28+
<NRF_PSEL(UART_RX, 1, 10)>,
29+
<NRF_PSEL(UART_RTS, 1, 12)>,
30+
<NRF_PSEL(UART_CTS, 1, 13)>;
31+
low-power-enable;
32+
};
33+
};
34+
35+
};
36+
37+
&uart21 {
38+
status = "okay";
39+
current-speed = <1000000>;
40+
pinctrl-0 = <&uart21_default>;
41+
pinctrl-1 = <&uart21_sleep>;
42+
pinctrl-names = "default", "sleep";
43+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
CONFIG_HEAP_MEM_POOL_SIZE=4096
7+
8+
CONFIG_THREAD_CUSTOM_DATA=y
9+
10+
CONFIG_NRF_RPC=y
11+
CONFIG_NRF_RPC_CBOR=y
12+
CONFIG_NRF_RPC_ZCBOR_BACKUPS=1
13+
CONFIG_NRF_RPC_THREAD_STACK_SIZE=4096
14+
CONFIG_NRF_RPC_GROUP_INIT_WAIT_TIME=-1
15+
CONFIG_NRF_RPC_UART_TRANSPORT=y
16+
17+
CONFIG_UART_LINE_CTRL=y
18+
CONFIG_UART_INTERRUPT_DRIVEN=y
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
sample:
2+
name: Protocols serialization server application
3+
description: Demonstrates serialization of BLE and OpenThread API using nRF RPC
4+
tests:
5+
applications.protocols_serialization.rpc_ble:
6+
build_only: true
7+
platform_allow: >
8+
nrf52840dk/nrf52840
9+
nrf54l15pdk/nrf54l15/cpuapp
10+
tags: ci_build
11+
extra_args: >
12+
SNIPPET="ble"
13+
integration_platforms:
14+
- nrf52840dk/nrf52840
15+
- nrf54l15pdk/nrf54l15/cpuapp
16+
applications.protocols_serialization.rpc_ot:
17+
build_only: true
18+
platform_allow: >
19+
nrf52840dk/nrf52840
20+
nrf54l15pdk/nrf54l15/cpuapp
21+
tags: ci_build
22+
extra_args: >
23+
SNIPPET="openthread"
24+
integration_platforms:
25+
- nrf52840dk/nrf52840
26+
- nrf54l15pdk/nrf54l15/cpuapp
27+
applications.protocols_serialization.rpc:
28+
build_only: true
29+
platform_allow: >
30+
nrf52840dk/nrf52840
31+
nrf54l15pdk/nrf54l15/cpuapp
32+
tags: ci_build
33+
extra_args: >
34+
SNIPPET="ble;openthread;debug;coex;log_rpc"
35+
integration_platforms:
36+
- nrf52840dk/nrf52840
37+
- nrf54l15pdk/nrf54l15/cpuapp
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2144
8+
9+
# Enable and configure Bluetooth LE
10+
CONFIG_BT=y
11+
CONFIG_BT_RPC=y
12+
CONFIG_BT_RPC_HOST=y
13+
CONFIG_BT_RPC_INITIALIZE_NRF_RPC=n
14+
15+
CONFIG_BT_PERIPHERAL=y
16+
CONFIG_BT_MAX_CONN=1
17+
CONFIG_BT_MAX_PAIRED=1
18+
CONFIG_BT_SMP=n
19+
CONFIG_BT_ECC=n
20+
CONFIG_BT_DEVICE_APPEARANCE=833
21+
22+
# BT Device name must be the same as on the client side
23+
CONFIG_BT_DEVICE_NAME="Nordic_UART_Service"
24+
# Host side registers all GATT services using dynamic database
25+
CONFIG_BT_GATT_DYNAMIC_DB=y
26+
27+
# Enable bonding
28+
CONFIG_BT_SETTINGS=y
29+
CONFIG_FLASH=y
30+
CONFIG_FLASH_PAGE_LAYOUT=y
31+
CONFIG_FLASH_MAP=y
32+
CONFIG_NVS=y
33+
CONFIG_SETTINGS=y
34+
35+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
36+
CONFIG_HEAP_MEM_POOL_SIZE=4096
37+
CONFIG_NRF_RPC_THREAD_STACK_SIZE=4096

0 commit comments

Comments
 (0)