Build errors If I am having Scan&Adv and peripheral_UART in my workspace and the errors disapper If I delete one of them form the workspace in nRF connect VS code.

Hi Team,

I am working in the nRF connect Vs code SDK environment. I am using the example programs in it but When I have the Scan&adv and  peripheral_uart example in the VS code contemporarily I am facing the below errors but when I am removing one of the application I am not facing those errors. I need a solution for this so that I can freely work on both the examples wothout deleting them and rebuilding it.

The build configuration errors I got are:

The build project errors I got are:

Thanks,

Pranathi.

  • Note: I am facing with other two projects which work on BLE stack not only scan&adv and peripheral_uart.

  • Hi,

    I am not able to see what is going on here, and generally having parallell projects should be no problem.

    1. Can you explain how and where you build the two projects then it fails, and show the full build logs for both? You can sinser the log via Insert -> Code.
    2. Also, do you see this issue also if you build sample projects from the SDK? If not, are there any overlap between your two project build folders that can explain what you are seeing? Or something else?
    3. What does your project files (particularily CMakeLists.txt) look like?
  • Hi,

    1) I build the projects in VS code using the nRF connect extension. I created a new appliaction--> Create sample--> then I choose the sample projects from the SDK.

    Executing task: nRF Connect: Generate config nrf52840dk_nrf52840 for c:\Users\Pranathi\peripheral_uart 
    
    Building peripheral_uart
    west build --build-dir c:/Users/Pranathi/peripheral_uart/build c:/Users/Pranathi/peripheral_uart --pristine --board nrf52840dk_nrf52840 --sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=c:/Users/Pranathi/peripheral_uart/prj.conf -DBOARD_ROOT=c:/users/pranathi/scan_adv;c:/users/pranathi/peripheral_uart
    
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): extensions sysbuild_extensions python west root zephyr_module boards shields sysbuild_kconfig
    -- Found Python3: C:/ncs/toolchains/c57af46cb7/opt/bin/python.exe (found suitable version "3.8.2", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.5.99-dev1/zephyr/.cache
    -- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
    -- Board: nrf52840dk_nrf52840
    Parsing c:/Users/Pranathi/peripheral_uart/Kconfig.sysbuild
    Loaded configuration 'C:/Users/Pranathi/peripheral_uart/build/empty.conf'
    Merged configuration 'C:/Users/Pranathi/peripheral_uart/build/empty.conf'
    Merged configuration 'C:/Users/Pranathi/peripheral_uart/build/empty.conf'
    Configuration saved to 'C:/Users/Pranathi/peripheral_uart/build/zephyr/.config'
    Kconfig header saved to 'C:/Users/Pranathi/peripheral_uart/build/autoconf.h'
    -- 
       *************************************
       * Running CMake for peripheral_uart *
       *************************************
    
    CMake Error at cmake/modules/sysbuild_extensions.cmake:465 (if):
      if given arguments:
    
        "DEFINED" "CACHE{BOARD_ROOT}" "AND" "NOT" "IS_ABSOLUTE" "c:/users/pranathi/scan_adv" "c:/users/pranathi/peripheral_uart"
    
      Unknown arguments specified
    Call Stack (most recent call first):
      CMakeLists.txt:38 (ExternalZephyrProject_Cmake)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/Users/Pranathi/peripheral_uart/build/CMakeFiles/CMakeOutput.log".
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/c57af46cb7/opt/bin/python.exe '-Bc:\Users\Pranathi\peripheral_uart\build' -GNinja -DBOARD=nrf52840dk_nrf52840 -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=c:/Users/Pranathi/peripheral_uart/prj.conf '-DBOARD_ROOT=c:/users/pranathi/scan_adv;c:/users/pranathi/peripheral_uart' '-SC:\ncs\v2.5.99-dev1\zephyr\share\sysbuild' '-DAPP_DIR:PATH=c:\Users\Pranathi\peripheral_uart'
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 
    
    2) I am seeing this issue only for smaple projects for now. Because I am using only the sample projects.There cannot be any overlap between the two projects because I am building them one after the other....even I can't understand why is this causing an issue. Please see the build configuration log which I have provided above.

    3) The Cmake file looks like:

    #
    # Copyright (c) 2018 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    cmake_minimum_required(VERSION 3.20.0)
    
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(peripheral_uart)
    
    # NORDIC SDK APP START
    target_sources(app PRIVATE
      src/main.c
    )
    
    # Include UART ASYNC API adapter
    target_sources_ifdef(CONFIG_BT_NUS_UART_ASYNC_ADAPTER app PRIVATE
      src/uart_async_adapter.c
    )
    
    # NORDIC SDK APP END
    
    zephyr_library_include_directories(.)

  • I just observed that when I disabled the sysbuild check box in build configurations settings  in peripheral_uart project, resolved the errors.

    Just want to know what is sysbuild is it like mandate for building the projects or optionally ignored?

  • Hi,

    Good to hear it is resolved. Sysbuild is a new build system that we use for more advances devices, like the nRF54H20. It is a new/different way of handle multi image builds. If you build a simple sample on a single core device, it is not relevant.

Related