Configure a nrf5340 ble peripheral with a customized net core based on the ipc_radio sample under sdk v3.0.2.

Hi,

I would like to create a project for a BLE peripheral for nrf5340 based on a standard sample like "peripheral LBS" und nrfConnect SDK v3.0.2 with modifications both in app core as well as in the net core application.

Of course, the original LBS sample itself is building and running as expected on my nrf5340dk. But as soon as I try to copy the ipc_radio code into a child_image sub folder and adjust the CMakeList.txt and sysbuild.cmake in a similar way that I used for earlier projects (in 2.x versions of the nrf connect sdk) the system tries to build not two, but three parts - my app core code, the code of ipc_radio from the sdk sample directories and additionally the code I copied into the child_image sub folder... and fails to build. 

How do I need to setup my build configuration and the config and CMake files to make the system build the lbs app code and the ipc_radio code from my subdirectory only and not use the sdk's version of ipc_radio anymore?

Being new to sdk v3.x I use this lbs sample for getting to know the behavior of the system, before I go into my "real" project in which I want to create a custom BLE peripheral with modifications and extensions to the ipc_radio code on the net core side.

Your advice is greatly appreciated.

Thanks,

Jens

Parents Reply Children
  • Hi Kenneth,

    thanks for the link and advice with the throughput sample. I do not understand, however, the difference of using the throughput example and the peripheral_lbs example. They both seem to use the ipc_radio on the network core in the original sample. Only copying the ipc_radio into the subfolder however, \sysbuild\ipc_radio\ does not make sysbuild use this at all, as it seems. The sample still builds using the directory in the sdk for the net core.

    Would it be possible for you to lead me to a working setup with the necessary changes to the configuration?

    Thanks a lot,

    Jens

  • I still recommend to look at the linked example, in general I can find that some the changes require you to delete the build folder before re-building or add --pristine to the west build command.

    Kenneth

  • Hi Kenneth,

    I have taken a look at both: the link and the throughput example. 

    However, I do not understand how I need to change configuration to really make the build system use the local files. The throughput sample features a sysbuild/ipc_radio directory with a prj.conf file. I do not see any hint in the configuration though in which the target is redirected to the local directory - and there are no local sources for the net core - it looks like the build system here is using the sdk files directly. I do not see any hint of a configuration, that tells the system to use the local files.

    Even after deleting the build directory and starting from scratch in a very similar directory structure I do not get the local files to work. I either have the build use the sdk-files ignoring my local copy completely or I get errors for duplicate definitions of ipc_radio (or worse), in case I add sysbuild.cmake and/or sysbuild.conf files...

    It really would be great to have a complete BLE-peripheral sample building local sources and configs for the net core using sysbuild in sdk v3.0.2.. Would it be possible to describe or provide such a "simple" sample - if it is just a matter of setting up the correct structure and the correct config and cmake files?

    That would be of great help!

    Thanks,

    Jens

  • As far as I remember it's only the nRF5340 that actually have this sysbuild/ipc_radio under the project folder to apply configuration or overlay to the network core firmware of the nRF5340. So any example you can find that have sysbuild/ipc_radio folder should be able to do the job as reference here.

    Kenneth

  • Dear Kenneth, 

    you probably are right, that there is no other sample having a sysbuild/ipc_radio directory under the project folder.

    What I do not understand, however, is the configuration part: Why are the samples, when built for nrf5430 using the SDK provided files for the net core? There seem to be no obvious parameters leading to this usage. So: What I need to know is, how to prevent this default usage and make the system build from the local configs and sources only. This should be some kind of config setting or something in CMakeLists.txt or similar. 

    => How do I deactivate building the net core from the SDK and activate sysbuild for using local files - or better "preferring" local files, if they are present. This behavior might work in the throughput sample for the one config contained, but the default in prj.conf from the SDK is not that terribly different ... so I do not know for sure, if the sample even uses this local prj.conf. For me it definitely does not take any sources form the local directory.

    In my old projects I explicitly configured the use of my local files by sysbuild.cmake files etc... but if I do this in sdk v3.0.2 sysbuild seems to try to build ipc_radio from the sdk and additionally my local copy leading to errors because this does not really make sense.

    I do not see any hint in the documentation how to explicitly deactivate this behavior.

    All advice to overcome this behavior is very welcome.

    Thanks, 

    Jens

Related