nRF5340 BLE: How to create the rpmsg_nrf53_sram in partitions.yml during porting the sample 'peripheral_uart'

Hi Support Team,

I try to use BLE in 'Split Controller and Host' mode on nRF5340 DK. I ported the sample 'peripheral_uart' for appCore and 'hci_rpmsg' for netCore, and the bidirectional communication between the appCore's terminal and 'nRF Connect for Mobile' APP is successful.

But, strangely, the partitions.yml in my project and the one in the sample are different in the SRAM section.
my partitions.yml:

Fullscreen
1
2
3
4
5
sram_primary:
address: 0x20000000
end_address: 0x20080000
region: sram_primary
size: 0x80000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The sample's: 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
rpmsg_nrf53_sram:
address: 0x20070000
end_address: 0x20080000
placement:
before:
- end
region: sram_primary
size: 0x10000
sram_primary:
address: 0x20000000
end_address: 0x20070000
region: sram_primary
size: 0x70000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

My questions:
1. In my understanding, the rpmsg_nrf53_sram is for RPMsg transport and is a must for BLE in 'Split Controller and Host' mode. Why there is no rpmsg_nrf53_sram in my partitions.yml, but the communication is still ok?
2. How can I create the rpmsg_nrf53_sram in my partition and let it be shared by the appCore and the netCore?
Thank you very much.

Best regards,
Yanpeng Wu

Parents
  • Hello Yanpeng,

    Could you provide a bit more information about how your project setup differs from the peripheral_uart sample? Do you still use the same hci_rpmsg child image in your build? The 'rpmsg_nrf53_sram' section should be added automatically by the build script here: https://github.com/nrfconnect/sdk-nrf/blob/d5a11bd8bd803fff7615f9b0c5227a60c761da27/subsys/partition_manager/CMakeLists.txt#L87 

    Best regards,

    Vidar

  • Hello Vidar,

    Thank you for your reply. I'm not using the original hci_rpmsg child image. In my application, I'm using a sysbuild and there is another small task on netCore, so I ported the code of hci_rpmsg to my application code on the netCore.

    In the sample peripheral_uart, I did not find how it define the hci_rpmsg as its default child image. I guessed it should be the configuration 'config NRF_DEFAULT_BLUETOOTH  default y' in the Kconfig.sysbuild, is it correct?

    After I ported the code to my application, the first build had some errors with the flash partition, then I added the cmake argument '-Dhci_rpmsg_OVERLAY_CONFIG="C:/ncs/v2.5.2/nrf/subsys/partition_manager/partition_manager_enabled.conf"', just as the sample did. After this, the BLE communication is ok, but when I compare the partitions.yml files in the sample and my project, I found the difference of rpmsg_nrf53_sram.

    Best regards,
    Yanpeng Wu

Reply
  • Hello Vidar,

    Thank you for your reply. I'm not using the original hci_rpmsg child image. In my application, I'm using a sysbuild and there is another small task on netCore, so I ported the code of hci_rpmsg to my application code on the netCore.

    In the sample peripheral_uart, I did not find how it define the hci_rpmsg as its default child image. I guessed it should be the configuration 'config NRF_DEFAULT_BLUETOOTH  default y' in the Kconfig.sysbuild, is it correct?

    After I ported the code to my application, the first build had some errors with the flash partition, then I added the cmake argument '-Dhci_rpmsg_OVERLAY_CONFIG="C:/ncs/v2.5.2/nrf/subsys/partition_manager/partition_manager_enabled.conf"', just as the sample did. After this, the BLE communication is ok, but when I compare the partitions.yml files in the sample and my project, I found the difference of rpmsg_nrf53_sram.

    Best regards,
    Yanpeng Wu

Children
  • Update: I found there is only one line code 'CONFIG_PARTITION_MANAGER_ENABLED=y' in the cmake argument '-Dhci_rpmsg_OVERLAY_CONFIG="C:/ncs/v2.5.2/nrf/subsys/partition_manager/partition_manager_enabled.conf"'. So I removed the cmake argument and added 'CONFIG_PARTITION_MANAGER_ENABLED=y' in my pj.conf. But the result is the same.

  • Hello Yanpeng,

    Sysbuild is still an experimental feature with several limitations. For now, I would recommend using the nRF Connect SDK's specific Multi-image support. The easiest approach would be to directly modify the hci_rpmsg in the SDK tree.

    Best regards,

    Vidar

  • Hi Vidar,

    Thank you for your suggestion. I will try the way that uses 'hci_rpmsg' as the child image on netCore and add my code to it.

    For the appCore, can I take the 'peripheral_uart' as a reference to try the multi-image build? I searched in this sample and did not find anywhere mentioned 'hci_rpmsg', where did it define the 'hci_rpmsg' as its child image on netCore? Could you help give some hints for this? Thank you very much.

    Best regards,
    Yanpeng Wu

  • Hi Yanpeng,

    'hci_rpmsg' is included as a child image by default when you enable Bluetoot in the parent application running on the application core. This is controlled by the CONFIG_NCS_INCLUDE_RPMSG_CHILD_IMAGE symbol.

    Best regards,

    Vidar

  • Hi Vidar,

    Thanks for the quick reply.
    In my project, I unchecked the 'Use sysbuild' in the Build Configuration, and found the image on netCore became 'hci_rpmsg', but still no 'rpmsg_nrf53_sram' in the partitions.yml.
    In the build log, there is 'Dropping partition 'rpmsg_nrf53_sram' since its size is 0.'

    I compared the CMakelists.txt in my project and the 'peripheral_uart', and did not find any difference for this. Maybe I missed something in my appCore build script...?

    Best regards,
    Yanpeng Wu