Shared configuration in case of multiimage build

Hello !

I have multi image build and in app_core Kconfig some own definitions like NET_L2_MY_VALUE =1.

Is any way to define if this value can be visible to network core image ? Or how to share own config value between core and network images ?

Regards,

Eugene

  • Hi Charlie !

    You mean if cpunet is included as child image, all new configs what is defined in Kconfig of multiimage build will be visible to both cores.

    And prj.conf configs definitions can be taken from both cores values.

    Is this so ?

    Regards,

    Eugene

  • Hi Eugene,

    Sorry for the late reply, I did some experiments based on the multicore sample and here are my implementation and result.

    1) Add a new common variable to nrf\samples\nrf5340\multicore\Kconfig and nrf\samples\nrf5340\multicore\cpunet\Kconfig(newly generated)

    config TEST_VARIABLE
           int "A test variable"
           default 1

    2) Add overlay-common.conf to nrf\samples\nrf5340\multicore, which set TEST VARIABLE to 2.

    3) Add printk("Test valiable value: %d\n", CONFIG_TEST_VARIABLE); to nrf\samples\nrf5340\multicore\src\main.c.

    3) build the project with commands: 

    west build --pristine --board nrf5340dk_nrf5340_cpuapp -- -DOVERLAY_CONFIG=overlay-common.conf -Dcpunet_OVERLAY_CONFIG=../overlay-common.conf

    or use NCS VS code extension:

    4) You would see both cores can print out Test variable value: 2 set by overlay-common.conf instead of default 1.

    *** Booting Zephyr OS build v3.2.99-ncs1 ***
    Hello world from nrf5340dk_nrf5340_cpunet
    Test valiable value: 2
    
    
    Disconnected
    
    Connected via Serial Port with settings COM57 115200 8n1 rtscts:off
    
    
    
    Disconnected
    
    Connected via Serial Port with settings COM59 115200 8n1 rtscts:off
    
    *** Booting Zephyr OS build v3.2.99-ncs1 ***
    Hello world from nrf5340dk_nrf5340_cpuapp
    Test valiable value: 2

    Here is the modified multicore sample supporting common overlay configuration for both cores.

    ncs220_multicore_commonconfig.zip

    Best regards,

    Charlie

  • Hi Eugene,

    Sorry for the late reply, I did some experiments based on the multicore sample and here are my implementation and result.

    1) Add a new common variable to nrf\samples\nrf5340\multicore\Kconfig and nrf\samples\nrf5340\multicore\cpunet\Kconfig(newly generated)

    config TEST_VARIABLE
           int "A test variable"
           default 1

    2) Add overlay-common.conf to nrf\samples\nrf5340\multicore, which set TEST VARIABLE to 2.

    3) Add printk("Test valiable value: %d\n", CONFIG_TEST_VARIABLE); to nrf\samples\nrf5340\multicore\src\main.c.

    3) build the project with commands: 

    west build --pristine --board nrf5340dk_nrf5340_cpuapp -- -DOVERLAY_CONFIG=overlay-common.conf -Dcpunet_OVERLAY_CONFIG=../overlay-common.conf

    or use NCS VS code extension:

    4) You would see both cores can print out Test variable value: 2 set by overlay-common.conf instead of default 1.

    *** Booting Zephyr OS build v3.2.99-ncs1 ***
    Hello world from nrf5340dk_nrf5340_cpunet
    Test valiable value: 2
    
    
    Disconnected
    
    Connected via Serial Port with settings COM57 115200 8n1 rtscts:off
    
    
    
    Disconnected
    
    Connected via Serial Port with settings COM59 115200 8n1 rtscts:off
    
    *** Booting Zephyr OS build v3.2.99-ncs1 ***
    Hello world from nrf5340dk_nrf5340_cpuapp
    Test valiable value: 2

    Here is the modified multicore sample supporting common overlay configuration for both cores.

    0777.ncs220_multicore_commonconfig.zip

    Best regards,

    Charlie

Related