I'm working with an nRF5340 and am trying to set up a multi-image build in VS Code with the "rpc_host" project on the network core using the "CONFIG_BT_RPC_STACK=y" config value. I'm basing this off of the Bluetooth: Peripheral HIDS Mouse sample, which has an overlay to enable a multi-image build on the nRF5340.
In the BLE RPC documentation page, it provides a list of config values that must have the same value in both images. It also states to use an overlay/fragment that is shared between both images in order to keep the values for these config options in sync.
In the Perhipheral HIDS Mouse sample, though, multiple config values are duplicated in the "prj.conf" and the "child_image/rpc_host.conf" files (e.g. "CONFIG_BT_DEVICE_NAME"), which clearly is not adhering to this principle for a shared overlay so that these values are only declared in a single source of truth.
I'm trying to figure out a way to modify this sample to keep it DRY and not duplicate config values for the application and network core images. Since the "rpc_host" image is enabled entirely by the "CONFIG_BT_RPC_STACK" option, and not managed in a build config, CMakeLists, or other file in the application project, the options are limited. I've considered several options:
- Have two separate config files in the "child_images" directory (one for child-image-only values, one for shared values), and have them both applied to the child image and add the shared one as a fragment to the parent image build config. Based on the multi-image build documentation though, it seems that only one fragment can be automatically applied to the child image ("child_image/<ACI_Name>.conf"), and I can't specify additional ones, so this approach would not work.
- Specify a shared fragment for both the child image ("rpc_host") and the parant/application image. Since the child image is enabled by "CONFIG_BT_RPC_STACK", though, and not by any kind of West build configuration, I can't find a way to apply a fragment to it.
- Somehow include a shared fragment within the child image and parent image conf files (something like "#include shared.conf"). I have not been able to find a way to do this through my search of documentation though.
So, the question: how can I have a single conf file that is applied to both the application image and the "rpc_host" child image that is enabled through the "CONFIG_BT_RPC_STACK" config setting, while also supporting additional config values that are specific to one or the other?
As a separate, semi-related question: the CONFIG_BT_RPC_STACK config value (and Bluetooth over RPC in general) is marked in the SDK as "EXPERIMENTAL". The nRF5340, however, has been out for almost 4 years now, so I would expect that there would be production-grade options for utilizing the networking core. If BLE over RPC is experimental, what's the recommended production-grade option for offloading BLE to the network core?