hci_ipc sample application is not automatically built for nRF5340 net core with custom board

Hi there,

I am trying to build the samples/bluetooth/broadcast_audio_sink application for my custom board which is based on the nRF5340 and nRF21540.

I am building with west build -b bmd100/nrf5340/cpuapp --sysbuild --pristine.

I notice that when running the sample, I get several BLE errors on starting advertising and starting scanning, etc, which tells me there are issues with the network core. This has led me to the following problem:

- When building the application with the command above, the hci_ipc sample application for the network core is not built alongside it and then flashed. This likely results in the wrong network controller image or the wrong configuration being flashed, if flashed at all.

When I build the application for the nRF5340-DK with west build -b nrf5340dk/nrf5340/cpuapp --sysbuild --pristine, both images are built and flashed, and the sample runs successfully. I can see the additional build output and flash steps for the network core in this case.

The only difference between both of these scenarios is the board definition files between the nrf5340dk and my bmd100. However, when creating the custom board definition files for my own board, I essentially copied and pasted the nrf5340dk files and renamed all instances of nrf5340dk with bmd100 (lowercase and uppercase).

Is there something specific to the nrf5340dk build configuration that triggers the building of the correct network core image, which isn't being triggered with my own board?

Perhaps there is something I am missing in the board definition files? I have attached them for further debug.

You can test this scenario yourself by copying the custom board into the `boards/others/` folder and then building with the command above. I am using commit 831e3627aa67890791794ef82588a2d68ce17c0b of sdk-nrf.

Thanks,

Sean

1057.bmd100.zip

  • Hi there,

    I have solved the issue.

    The behaviour is specific to the samples/bluetooth/broadcast_audio_x samples. The relevant files are sysbuild.cmake and Kconfig.sysbuild.

    sysbuild.cmake expects SB_CONFIG_NET_CORE_IMAGE_HCI_IPC to be defined for it to build the hci_ipc sample. This variable is defined in Kconfig.sysbuild depending on some conditional logic. I needed to add my board to the list of default values:

    source "share/sysbuild/Kconfig"
    
    config NET_CORE_BOARD
    	string
    	default "nrf5340dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340dk"
    	default "nrf5340_audio_dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340_audio_dk"
    	default "nrf5340bsim/nrf5340/cpunet" if $(BOARD_TARGET_STRING) = "NRF5340BSIM_NRF5340_CPUAPP"
    	default "bmd100/nrf5340/cpunet" if "$(BOARD)" = "bmd100"
    
    config NET_CORE_IMAGE_HCI_IPC
    	bool "HCI IPC image on network core"
    	default y
    	depends on NET_CORE_BOARD != ""
    
    Adding my board triggered the hci_ipc build. I haven't tested yet if the sample application works, but I am sure it will.
Related