Cannot override some values in overlay-bt_hci_ipc.overlay using sysbuild such as CONFIG_HEAP_MEM_POOL_SIZE when building ipc_radio binary

When building ipc_radio under sysbuild, the order of the processing of the config files do not seem to allow me to override these values:

CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
According to the build log this is the order of the config files:
Parsing C:/Users/david/ncs/v2.7.0/nrf/applications/ipc_radio/Kconfig
Loaded configuration 'C:/Clients/Client/Gen2/fw/boards/client/client_g2/client_g2_nrf5340_cpunet_defconfig'
Merged configuration 'C:/Clients/Client/Gen2/fw/gc_central/sysbuild/ipc_radio/prj.conf'
Merged configuration 'C:/Clients/Client/Gen2/fw/gc_central/sysbuild/ipc_radio/overlay-client.conf'
Merged configuration 'C:/Users/david/ncs/v2.7.0/nrf/applications/ipc_radio/overlay-bt_hci_ipc.conf'
Merged configuration 'C:/Clients/Client/Gen2/fw/gc_central/build/ipc_radio/zephyr/.config.sysbuild'
Configuration saved to 'C:/Clients/Client/Gen2/fw/gc_central/build/ipc_radio/zephyr/.config'
I also tried to add an extra config above "overlay-client.conf", but it still gets overriden with the above values in "overlay-bt_hci_ipc.conf"
I am trying to reduce the HEAP size to recover memory for other features, but so far this does not work, any suggestions?
Either those values should not be in "overlay-bt_hci_ipc.conf", or the order of the config files is incorrect?
  • Hi, 

    How do you build the project?

    I build with this command:

    (v2.7.0) C:\ncs\v2.7.0\zephyr\samples\bluetooth\hci_ipc> west build -p -b nrf5340dk_nrf5340_cpunet -d build_nrf5340dk_nrf5340_cpunet --sysbuild -- -DOVERLAY_CONFIG=overlay-client.conf

    and see the "overlay-client.conf" is sourced in the build log.

    I can see it take effect in the .config under build\hci_ipc\zephyr

    Regards,
    Amanda H.

  • I'm using system build and building ipc_radio instead of hci_ipc, I think the scripts are quite different than the previous child_images that were used.

    I already posted the order that I get and the fact that the settings that I desire to override are overwritten by the settings in overlay-bt-hci_ipc.conf keep me from changing the settings for these 3 memory related settings.

    For reference here is the redacted build command:

    west build --build-dir c:/Clients/Client/Gen2/fw/build c:/Clients/Client/Gen2/fw/ --pristine --board [email protected]/nrf5340/cpuapp --sysbuild -- -DNCS_TOOLCHAIN_VERSION="NONE" -DPM_STATIC_YML_FILE="pm_static_dfu.yml" -DSB_CONF_FILE="sysbuild.conf" 

    NOTE the --sysbuild

  • Could you try duplicate overlay-bt-hci_ipc.conf and modify the values as you want then source it? Does it work?

  • Yes, modifying overlay-bt-hci_ipc.conf changes the final values, but my goal is to not modify SDK files if at all possible.

  • dstarling said:
    west build --build-dir c:/Clients/Client/Gen2/fw/build c:/Clients/Client/Gen2/fw/ --pristine --board [email protected]/nrf5340/cpuapp --sysbuild -- -DNCS_TOOLCHAIN_VERSION="NONE" -DPM_STATIC_YML_FILE="pm_static_dfu.yml" -DSB_CONF_FILE="sysbuild.conf" 

    Are you building applications/ipc_radio for the cpuapp core? Please be aware that the sample ipc_radio only supports the cpunet core. 

    dstarling said:
    modifying overlay-bt-hci_ipc.conf changes the final values, but my goal is to not modify SDK files if at all possible.

    You can duplicate overlay-bt-hci_ipc.conf, rename it to "overlay-client.conf", modify the values in the "overlay-client.conf" as you want, then build with "overlay-client.conf" instead of overlay-bt-hci_ipc.conf.

Related