Out of Tree Sample Migration Guidance

Hello,

I am hitting wall after wall trying to migrate the ble_coex sample out of tree for a custom board. I am unable to find any documentation guidance as to how to do this. I have the sample building and running just fine in tree on the nRF7002DK.

I've copied over all the 7002DK board config files from C:\ncs\v3.0.2\zephyr\boards\nordic\nrf7002dk to the local boards folder for my out of tree project.

I've also made what I think are the correct adjustments to transform the contents to represent a custom board.

Add build configuration correctly finds my custom board.

I'm getting all kinds of CMake conflicting and/or unsatisfied dependencies, KConfig warnings, etc. 

If there's a documented process as to the specific steps that need to be taken to migrate a sample project out of tree, or if someone can otherwise explain it, please let me know.

I can provide more details on the specific problems I'm having but first just wanted to ask for high level guidance on this.

Thank you,

Chris

  • I've added a somewhat redacted (for NDA purposes) build trace here to show where it is failing now. I am not specifically intentionally trying to enable or disable

       ***************************
       * Running CMake for XXXXX *
       ***************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/XXXXX/XXXXX/XXXXXX
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v3.0.2/zephyr/.cache
    -- Zephyr version: 4.0.99 (C:/ncs/v3.0.2/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: BBBBB, qualifiers: nrf5340/cpuapp/ns
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/0b393f9e1b/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/XXXXX/XXXXX/XXXXX/boards/custom/BBBBB/BBBBB_nrf5340_cpuapp_ns.dts
    -- Generated zephyr.dts: C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/zephyr.dts
    -- Generated pickled edt: C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/edt.pickle
    -- Generated zephyr.dts: C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/dts.cmake
    
    warning: Deprecated symbol POSIX_CLOCK is enabled.
    
    
    warning: Experimental symbol WIFI_NM_WPA_SUPPLICANT is enabled.
    
    
    warning: Experimental symbol WIFI_NM_WPA_SUPPLICANT is enabled.
    
    
    warning: Experimental symbol WIFI_NRF70 is enabled.
    
    
    warning: Experimental symbol NRF_WIFI_RPU_RECOVERY is enabled.
    
    
    warning: Experimental symbol NET_BUF_VARIABLE_DATA_SIZE is enabled.
    
    
    warning: Experimental symbol WIFI_CREDENTIALS is enabled.
    
    
    warning: NRFX_IPC (defined at C:/ncs/v3.0.2/zephyr/modules/hal_nordic\nrfx/Kconfig:232, modules\hal_nordic\nrfx/Kconfig:232) has
     direct dependencies HAS_NRFX || (HAS_NRFX && 0) with value n, but is currently being y-selected by the following symbols:
     - MBOX_NRFX_IPC (defined at C:/XXXXX/XXXXX/XXXXX/boards/custom/BBBBB/Kconfig:9, drivers/mbox/Kconfig.nrfx:4), with value y, 
     direct dependencies y (value: y), and select condition DT_HAS_NORDIC_MBOX_NRF_IPC_ENABLED && MBOX (value: y)
    Parsing C:/XXXXX/XXXXX/XXXXX/Kconfig
    Loaded configuration 'C:/XXXXX/XXXXX/XXXXX/boards/custom/BBBBB/BBBBB_nrf5340_cpuapp_ns_defconfig'
    Merged configuration 'C:/XXXXX/XXXXX/XXXXX/prj.conf'
    Merged configuration 'C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/.config.sysbuild'
    
    warning: NRFX_QSPI (defined at C:/ncs/v3.0.2/zephyr/modules/hal_nordic\nrfx/Kconfig:427, modules\hal_nordic\nrfx/Kconfig:427) 
    has direct dependencies HAS_NRFX || (HAS_NRFX && 0) with value n, but is currently being y-selected by the following symbols:
     - NRF70_ON_QSPI (defined at modules/nrf_wifi/bus/Kconfig:21, modules/nrf_wifi/bus/Kconfig:21), with value y, direct dependencies
     NRF70_BUSLIB || (NRF70_BUSLIB && 0) (value: y), and select condition NRF70_BUSLIB (value: y)
    
    error: Aborting due to Kconfig warnings
    
    CMake Error at C:/ncs/v3.0.2/zephyr/cmake/modules/kconfig.cmake:396 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v3.0.2/nrf/cmake/modules/kconfig.cmake:36 (include)
      C:/ncs/v3.0.2/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:13 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: XXXXX
    
      Location: C:/XXXXX/XXXXX/XXXXX
    Call Stack (most recent call first):
      cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
      cmake/modules/sysbuild_default.cmake:21 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/ncs/v3.0.2/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/XXXXX/XXXXX/XXXXX/build/CMakeFiles/CMakeOutput.log".
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.EXE' 
    -DWEST_PYTHON=C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe '-Bc:\XXXXX\XXXXX\XXXXX\build' 
    -GNinja -DBOARD=BBBBB/nrf5340/cpuapp/ns -DBOARD_ROOT=c:/XXXXX/XXXXX/XXXXX '-SC:\ncs\v3.0.2\zephyr\share\sysbuild' 
    '-DAPP_DIR:PATH=c:\XXXXX\XXXXX\XXXXX'
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 
    
    anything different in the out of tree build (vs. the in tree build). If anyone has any ideas please let me know.

       ***************************
       * Running CMake for XXXXX *
       ***************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/XXXXX/XXXXX/XXXXXX
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v3.0.2/zephyr/.cache
    -- Zephyr version: 4.0.99 (C:/ncs/v3.0.2/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: BBBBB, qualifiers: nrf5340/cpuapp/ns
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/0b393f9e1b/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/XXXXX/XXXXX/XXXXX/boards/custom/BBBBB/BBBBB_nrf5340_cpuapp_ns.dts
    -- Generated zephyr.dts: C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/zephyr.dts
    -- Generated pickled edt: C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/edt.pickle
    -- Generated zephyr.dts: C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/dts.cmake
    
    warning: Deprecated symbol POSIX_CLOCK is enabled.
    
    
    warning: Experimental symbol WIFI_NM_WPA_SUPPLICANT is enabled.
    
    
    warning: Experimental symbol WIFI_NM_WPA_SUPPLICANT is enabled.
    
    
    warning: Experimental symbol WIFI_NRF70 is enabled.
    
    
    warning: Experimental symbol NRF_WIFI_RPU_RECOVERY is enabled.
    
    
    warning: Experimental symbol NET_BUF_VARIABLE_DATA_SIZE is enabled.
    
    
    warning: Experimental symbol WIFI_CREDENTIALS is enabled.
    
    
    warning: NRFX_IPC (defined at C:/ncs/v3.0.2/zephyr/modules/hal_nordic\nrfx/Kconfig:232, modules\hal_nordic\nrfx/Kconfig:232) has
     direct dependencies HAS_NRFX || (HAS_NRFX && 0) with value n, but is currently being y-selected by the following symbols:
     - MBOX_NRFX_IPC (defined at C:/XXXXX/XXXXX/XXXXX/boards/custom/BBBBB/Kconfig:9, drivers/mbox/Kconfig.nrfx:4), with value y, 
     direct dependencies y (value: y), and select condition DT_HAS_NORDIC_MBOX_NRF_IPC_ENABLED && MBOX (value: y)
    Parsing C:/XXXXX/XXXXX/XXXXX/Kconfig
    Loaded configuration 'C:/XXXXX/XXXXX/XXXXX/boards/custom/BBBBB/BBBBB_nrf5340_cpuapp_ns_defconfig'
    Merged configuration 'C:/XXXXX/XXXXX/XXXXX/prj.conf'
    Merged configuration 'C:/XXXXX/XXXXX/XXXXX/build/XXXXX/zephyr/.config.sysbuild'
    
    warning: NRFX_QSPI (defined at C:/ncs/v3.0.2/zephyr/modules/hal_nordic\nrfx/Kconfig:427, modules\hal_nordic\nrfx/Kconfig:427) 
    has direct dependencies HAS_NRFX || (HAS_NRFX && 0) with value n, but is currently being y-selected by the following symbols:
     - NRF70_ON_QSPI (defined at modules/nrf_wifi/bus/Kconfig:21, modules/nrf_wifi/bus/Kconfig:21), with value y, direct dependencies
     NRF70_BUSLIB || (NRF70_BUSLIB && 0) (value: y), and select condition NRF70_BUSLIB (value: y)
    
    error: Aborting due to Kconfig warnings
    
    CMake Error at C:/ncs/v3.0.2/zephyr/cmake/modules/kconfig.cmake:396 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v3.0.2/nrf/cmake/modules/kconfig.cmake:36 (include)
      C:/ncs/v3.0.2/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:13 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: XXXXX
    
      Location: C:/XXXXX/XXXXX/XXXXX
    Call Stack (most recent call first):
      cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
      cmake/modules/sysbuild_default.cmake:21 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/ncs/v3.0.2/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/XXXXX/XXXXX/XXXXX/build/CMakeFiles/CMakeOutput.log".
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.EXE' 
    -DWEST_PYTHON=C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe '-Bc:\XXXXX\XXXXX\XXXXX\build' 
    -GNinja -DBOARD=BBBBB/nrf5340/cpuapp/ns -DBOARD_ROOT=c:/XXXXX/XXXXX/XXXXX '-SC:\ncs\v3.0.2\zephyr\share\sysbuild' 
    '-DAPP_DIR:PATH=c:\XXXXX\XXXXX\XXXXX'
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 
    

Related