nRF5340 BT controller + host on NET, demo on APP with RPC

Hello!

Our plan is to have the whole Bluetooth stack (softdevice controller, HCI, host) on the NET core and make APP core call the functions by RPC. The board is an nRF5340DK.

This URL describes how to compile the whole stuff to NET core: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/rpc_host/README.html#ble-rpc-host

(overlay-debugging.conf can't be used, as the resulting flash size exceeds NET core's flash size)

I've burnt it to NET core's flash with west, neither a single line is displayed on the console, I don't know if it's normal.

As the second step, I'd like to compile and burn the zephyr/samples/bluetooth/beacon example to the APP core and make it use the NET core by RPC. I've been struggling with this one. Compiled with the following:

west build -b nrf5340dk_nrf5340_cpuapp -- -DCONFIG_BT_RPC_STACK=y

In the burn phase (west flash), an error occurs:

FATAL ERROR: command exited with status 33: nrfjprog --program /home/tselmeci/compile/nRF5340-eval/ncs/zephyr/samples/bluetooth/beacon/build/zephyr/GENERATED_CP_NETWORK_merged_domains.hex --sectorerase --verify -f NRF53 --snr 1050091855 --coprocessor CP_NETWORK

I can't get it why it wants to write to NET core instead of the APP core.

Please share with me all the steps needed to achieve this:

  • full BT stack on NET core;
  • beacon demo on APP core using NRF_RPC to reach BT functions;
  • to have both APP and NET core the same (or similar) config to avoid runtime asserts and complaints;
  • APP and NET are compiled separately, not in a multi-image;

I definitely need to have all the BT stuff separated on the NET core, because want to investigate how BT functions are called via NRF_RPC and whether we can use something different than Zephyr on APP core with NRF_RPC.

Thanks!

Parents
  • Hi,

    I can't get it why it wants to write to NET core instead of the APP core.

    Works fine here when I use nRF Connect for VS Code, using the flash action:https://nrfconnect.github.io/vscode-nrf-connect/connect/ui.html#actions-view

    in the log I have:

    : C:\ncs\v2.1.0\zephyr\samples\bluetooth\beacon\rpc_build\zephyr\GENERATED_CP_NETWORK_merged_domains.hex and C:\ncs\v2.1.0\zephyr\samples\bluetooth\beacon\rpc_build\zephyr\GENERATED_CP_APPLICATION_merged_domains.hex
    [ #################### ]   0.413s | Erase file - Done erasing                                                          
    [ #################### ]   1.179s | Program file - Done programming                                                    
    [ #################### ]   1.210s | Verify file - Done verifying                                                       
    [ #################### ]   0.428s | Erase file - Done erasing                                                          
    [ #################### ]   0.422s | Program file - Done programming                                                    
    [ #################### ]   0.410s | Verify file - Done verifying                                                       
    Applying pin reset.

    If you are using nrfjprog directly, try flashing GENERATED_CP_APPLICATION_merged_domains.hex to the app-core, and the GENERATED_CP_NETWORK_merged_domains.hex to the network-core

  • What you have done is reprogramming both the APP and NET cores with one command. west flash also falls back to nrfjprog.

    Please tell me whether it's possible to:

    • compile full BT stack + host to NET core only (no multi image!) with RPC enabled;
      • burn to NET core only;
    • compile RPC client and beacon example to APP core only (no multi image!);
      • burn to APP core only;

    Later we want to substitute the "beacon example" with out custom RPC solution, therefore we need a "persistent" full BT stack on the NET core accessible by RPC on the APP core.

Reply
  • What you have done is reprogramming both the APP and NET cores with one command. west flash also falls back to nrfjprog.

    Please tell me whether it's possible to:

    • compile full BT stack + host to NET core only (no multi image!) with RPC enabled;
      • burn to NET core only;
    • compile RPC client and beacon example to APP core only (no multi image!);
      • burn to APP core only;

    Later we want to substitute the "beacon example" with out custom RPC solution, therefore we need a "persistent" full BT stack on the NET core accessible by RPC on the APP core.

Children
Related