-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support to Bluetooth RPC Host for nRF54H20 #15634
Support to Bluetooth RPC Host for nRF54H20 #15634
Conversation
Test specificationCI/Jenkins/NRF
CI/Jenkins/integration
Detailed information of selected test modules Note: This message is automatically posted and updated by the CI |
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
3667023
to
b5d056c
Compare
snippets/nordic-rpc-host/boards/nrf54h20dk_nrf54h20_cpurad.overlay
Outdated
Show resolved
Hide resolved
d05cc93
to
539f5f3
Compare
Fixed licenses and added CODEOWNERS entry for the new snippet. |
539f5f3
to
8295af2
Compare
snippets/nordic-rpc-host/boards/nrf54h20dk_nrf54h20_cpurad.overlay
Outdated
Show resolved
Hide resolved
snippets/nordic-rpc-host/boards/nrf54h20dk_nrf54h20_cpurad.overlay
Outdated
Show resolved
Hide resolved
8295af2
to
ce2e708
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
ce2e708
to
009755a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code itself looks good, but according to NCSDK-27179 the default firmware for network core should be ipc_radio.
The ipc_radio supports the rpc configuration, have you tried to use it instead of rpc_host sample?
#include "nrf54h20dk_nrf54h20-mem-map-move.dtsi" | ||
|
||
&cpurad_rw_partitions { | ||
status = "okay"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many indents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
config NRF_IPC_RADIO_RPC_HOST | ||
bool "Enable building RPC Host for Radio domain" | ||
help | ||
The option enables building sample rpc_host application for Radio | ||
domain. This sysbuild configuration option should be selected only if | ||
an Application core application is build with CONFIG_BT_RPC_STACK | ||
enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need yet another kconfig for the same thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my bad, I should have added description to NRF_DEFAULT_RPC_HOST
.
Anyway the config was removed. Since there is change in approach and ipc_radio
application will be used instead of rpc_host
part of the content in this file was extracted to sysbuild.conf
and sysbuild_bt_rpc.conf
.
009755a
to
3e6c077
Compare
3e6c077
to
b974b4a
Compare
b974b4a
to
d8eff30
Compare
Added nR53 support to new snippet. Fixed build issue caused by wrong snippet name in sample.yaml. |
d8eff30
to
f21cf4e
Compare
changed |
f21cf4e
to
5b28a82
Compare
There is experimental RPC wrapper for Bluetooth API. To make possible use of BLE samples with nRF54h20 and the RPC API there is required a settings partition for Radio core. That means current memory map has to be changed to make room for new settings partition. To make an application to use the Bluetooth rpc subsystem there is added CONFIG_BT_RPC_STACK. It enables BT RPC host client wrapper to be used instead of regular Bluetooth API. With these changes end user needs to add -S nrf-bt-rpc to west call to build a compatible BLE sample for BT RPC host. To make clean complete build for both Radio and App cores addtitional changes are required in sysbuild configuration. These will be added in follow up commits. The snippet can be also used for builds for nRF5340, though there is no need for memory map reorganization. Signed-off-by: Piotr Pryga <[email protected]>
There were no simple way to use sysbuild for building BLE samples with rpc_host running on Radio core. Add required configuration to sysbuild. Now an application can be targeted to be build with rpc_host by adding NRF_DEFAULT_RPC_HOST=y to Kconfig.sysbuild. Signed-off-by: Piotr Pryga <[email protected]>
Add possibility to build the sample application targeted to nrf54h20 with use of Bluetooth API wrapped with RPC Host client. The Radio core application in such case must be ipc_radio with enabled Bluetooth RPC host. That reqires change to sysbuild configuration of the sample application. One note, the Bluetooth RPC subsystem requires to have same Bluetooth device name on obth ends of RPC communication, so there is used FILE_SUFFIX=bt_rpc and provided sysbuild configuration files that are include when the suffix is used in build call. To build the sample with enabled Bluetooth RPC subsys use: 'west build -b nrf54h20dk/nrf54h20/cpuapp --sysbuild -p -S nordic-bt-rpc -- -DFILE_SUFFIX=bt_rpc' Signed-off-by: Piotr Pryga <[email protected]>
The former implementation of settings initialization was based on a command send by client by rpc_settings_set() function. That function was called by stetings subsustem during settings_load() execution. That together created deep execution call stack that required extended main thread stack size. To avoid the change to stack size, the implementation is changed, to send the settings load command to host if CONFIG_SETTINGS is eanbled. The command is send directly from bt_enable() function in bt_rpc_gap_client.c. Signed-off-by: Piotr Pryga <[email protected]>
5b28a82
to
e18afc4
Compare
BLE CI has a setup failure due to commit message check. It should not block the PR as long as the test job has passed |
There is a possibility to use complete Bluetooth stack on e.g. nRF5340 network core, meaning Host and Controller run in same core. An application communicates with the stack over Bluetooth RPC subsystem that wraps Bluetooth API into RPC.
The PR adds possibility to use the same approach for samples running on nRF54H20 SOC.
To make it easy, the nordic-rcp-host snippet was added.
Also a peripheral_uart Kconfig.sysbuild was modified to make possible to select radio domain target sample application.
One additional change was done to Bluetooth RPC subsystem, handling of
settings
initialization on remote. That change was done because former implementation required to increase main thread stack size.