Build in debug mode

An error occurs when building nRF5340 Audio in debug mode using a script.

The version of ncs is 2.5.0.

The error is as follows:

-- Configuring incomplete, errors occurred!
←[91mFATAL 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\TSP_M1\nrf5340_audio\build\dev_headset\build_debug' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp -DCONFIG_AUDIO_DEV=1 '-SC:\Users\TSP_M1\nrf5340_audio'
←[0mTraceback (most recent call last):
File "buildprog.py", line 439, in <module>
__main()
File "buildprog.py", line 421, in __main
__build_module(build_cfg, options)
File "buildprog.py", line 167, in __build_module
raise Exception("cmake error: " + str(ret_val))
Exception: cmake error: 1

Please tell me the cause of the error.

Parents
  • Hi,

    Could you attach the entire build log?

    Kind regards,
    Andreas

  • List all the output from the build.

    C:\Users\TSP_M1\nrf5340_audio\tools\buildprog>python buildprog.py -c both -b debug -d both
    +------------+----------+---------+--------------+---------------------+---------------------+
    | snr | snr conn | device | only reboot | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1050188709 | True | headset | Not selected | Selected TBD | Selected TBD |
    | 1050198852 | True | gateway | Not selected | Selected TBD | Selected TBD |
    | 1000 | False | headset | Not selected | Selected TBD | Selected TBD |
    +------------+----------+---------+--------------+---------------------+---------------------+
    Invoking build step
    Net core uses precompiled hex
    Run: west build C:\Users\TSP_M1\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\Users\TSP_M1\nrf5340_audio\build\dev_headset\build_debug -DCONFIG_AUDIO_DEV=1
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/Users/TSP_M1/nrf5340_audio
    -- CMake version: 3.20.5
    -- Using NCS Toolchain 2.5.20231017.848171396279 for building. (C:/ncs/toolchains/c57af46cb7/cmake)
    CMake Deprecation Warning at C:/ncs/v2.5.0/zephyr/cmake/modules/FindDeprecated.cmake:121 (message):
    'PYTHON_PREFER' variable is deprecated. Please use Python3_EXECUTABLE
    instead.
    Call Stack (most recent call first):
    C:/ncs/v2.5.0/zephyr/cmake/modules/python.cmake:16 (find_package)
    C:/ncs/v2.5.0/zephyr/cmake/modules/zephyr_default.cmake:129 (include)
    C:/ncs/v2.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
    C:/ncs/v2.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    CMakeLists.txt:46 (find_package)


    -- 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.0/zephyr/.cache
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.0/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
    -- Board: nrf5340_audio_dk_nrf5340_cpuapp
    -- Found host-tools: zephyr 0.16.1 (C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.1 (C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/c57af46cb7/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")

    -- Found BOARD.dts: C:/ncs/v2.5.0/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp.dts
    -- Generated zephyr.dts: C:/Users/TSP_M1/nrf5340_audio/build/dev_headset/build_debug/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/Users/TSP_M1/nrf5340_audio/build/dev_headset/build_debug/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/Users/TSP_M1/nrf5340_audio/build/dev_headset/build_debug/zephyr/dts.cmake
    Parsing C:/Users/TSP_M1/nrf5340_audio/Kconfig
    Loaded configuration 'C:/ncs/v2.5.0/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/Users/TSP_M1/nrf5340_audio/prj.conf'
    Merged configuration 'C:/Users/TSP_M1/nrf5340_audio/build/dev_headset/build_debug/zephyr/misc/generated/extra_kconfig_options.conf'

    error: BT_AUDIO_TX (defined at
    C:/Users/TSP_M1/nrf5340_audio\src/bluetooth\bt_stream/broadcast\Kconfig.defaults:86,
    C:/Users/TSP_M1/nrf5340_audio\src/bluetooth\bt_stream/unicast\Kconfig.defaults:113,
    C:/Users/TSP_M1/nrf5340_audio\src/bluetooth\bt_stream/unicast\Kconfig.defaults:183,
    C:/ncs/v2.5.0/zephyr/subsys/bluetooth/host\../audio/Kconfig:28,
    subsys/bluetooth\host\../audio/Kconfig:28) is assigned in a configuration file, but is not directly
    user-configurable (has no prompt). It gets its value indirectly from other symbols. See
    docs.zephyrproject.org/.../kconfig.html and/or look up BT_AUDIO_TX in
    the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
    Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.

    CMake Error at C:/ncs/v2.5.0/zephyr/cmake/modules/kconfig.cmake:348 (message):
    command failed with return code: 1
    Call Stack (most recent call first):
    C:/ncs/v2.5.0/nrf/cmake/modules/kconfig.cmake:29 (include)
    C:/ncs/v2.5.0/zephyr/cmake/modules/zephyr_default.cmake:129 (include)
    C:/ncs/v2.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
    C:/ncs/v2.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    CMakeLists.txt:46 (find_package)


    -- Configuring incomplete, errors occurred!
    ←[91mFATAL 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\TSP_M1\nrf5340_audio\build\dev_headset\build_debug' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp -DCONFIG_AUDIO_DEV=1 '-SC:\Users\TSP_M1\nrf5340_audio'
    ←[0mTraceback (most recent call last):
    File "buildprog.py", line 439, in <module>
    __main()
    File "buildprog.py", line 421, in __main
    __build_module(build_cfg, options)
    File "buildprog.py", line 167, in __build_module
    raise Exception("cmake error: " + str(ret_val))
    Exception: cmake error: 1

  • Junichi said:
    error: BT_AUDIO_TX (defined at
    C:/Users/TSP_M1/nrf5340_audio\src/bluetooth\bt_stream/broadcast\Kconfig.defaults:86,
    C:/Users/TSP_M1/nrf5340_audio\src/bluetooth\bt_stream/unicast\Kconfig.defaults:113,
    C:/Users/TSP_M1/nrf5340_audio\src/bluetooth\bt_stream/unicast\Kconfig.defaults:183,
    C:/ncs/v2.5.0/zephyr/subsys/bluetooth/host\../audio/Kconfig:28,
    subsys/bluetooth\host\../audio/Kconfig:28) is assigned in a configuration file, but is not directly
    user-configurable (has no prompt). It gets its value indirectly from other symbols. See
    docs.zephyrproject.org/.../kconfig.html and/or look up BT_AUDIO_TX in
    the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
    Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.

    Did you make any changes to the base application? I'm referring to this error which suggests that a configuration that is not user-configurable has been set in a configuration file.

    Kind regards,
    Andreas 

Reply
  • Junichi said:
    error: BT_AUDIO_TX (defined at
    C:/Users/TSP_M1/nrf5340_audio\src/bluetooth\bt_stream/broadcast\Kconfig.defaults:86,
    C:/Users/TSP_M1/nrf5340_audio\src/bluetooth\bt_stream/unicast\Kconfig.defaults:113,
    C:/Users/TSP_M1/nrf5340_audio\src/bluetooth\bt_stream/unicast\Kconfig.defaults:183,
    C:/ncs/v2.5.0/zephyr/subsys/bluetooth/host\../audio/Kconfig:28,
    subsys/bluetooth\host\../audio/Kconfig:28) is assigned in a configuration file, but is not directly
    user-configurable (has no prompt). It gets its value indirectly from other symbols. See
    docs.zephyrproject.org/.../kconfig.html and/or look up BT_AUDIO_TX in
    the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
    Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.

    Did you make any changes to the base application? I'm referring to this error which suggests that a configuration that is not user-configurable has been set in a configuration file.

    Kind regards,
    Andreas 

Children
  • Thank you for your reply.

    I have not made any changes to the base source.

    I have added the following to the config file.

    CONFIG_TRANSPORT_BIS=n
    CONFIG_TRANSPORT_CIS=y
    CONFIG_STREAM_BIDIRECTIONAL=y
    CONFIG_AUDIO_SOURCE_USB=n
    CONFIG_AUDIO_SOURCE_I2S=y
    CONFIG_BOARD_ENABLE_DCDC_APP=n
    CONFIG_BOARD_ENABLE_DCDC_NET=n

    No errors occur when running with the Release script.

    An error occurs when using debug.

  • Hi,

    Noted.

    Could you expand on what OS you're using, and how you're building the application (just to exclude any simple mistakes for me when trying to recreate this behavior?

    Do you see the same error in NCS 2.5.3 as you do in NCS 2.5.0?

    What Audio controller are you aiming to use? Packetcraft controller or the Nordic Softdevice Controller? If it is the Softdevice controller (which is what we recommend that you use) you would have to migrate to NCS 2.6.x or newer.

    Kind regards,
    Andreas

Related