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:

sram_primary:
  address: 0x20000000
  end_address: 0x20080000
  region: sram_primary
  size: 0x80000

The sample's: 

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

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 Reply Children
  • 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

  • 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

Related