nRF5340_audio buildprog aborts on Kconfig warnings

I am trying to build the nrf5340_audio demo application (\ncs\v2.5.1\nrf\applications\nrf5340_audio) using the suggested build script (buildprog.py).

I have been able to complete all the exercises in the SDK Fundamentals course with the instalation.

I have set the S/N in the nrf5340_audio_dk_devices.json, removed the CONFIG_NFCT_PINS_AS_GPIOS from Kconfig.defaults (as it generated a warning that it is deprecated and the superceeding symbol is already set in soc/arm/nordic_nrf/Kconfig), and added CONFIG_SHELL_VT100_COMMANDS to prj.conf to satisfy the CONFIG_SHELL_VT100_COLORS requirement.

buildprog.py terminates with 18 warnings about configuration options that are "defined without a type". I'm been digging into the Kconfig files, but do not find anything obvious between the symbols that generate warnings and those that do not (e.g. CONFIG_RESET_ON_FATAL_ERROR vs CONFIG_BT).

I'm begining to suspect that there is something odd with the zephyrproject setup, as I have the 3.5.99 version installed, and not the latest official 3.5.0 release (and I have no clue to why I got 3.5.99 over 3.5.0). I see that there's also a recommendation to stay away from python 3.12 due to dependency problems, but as far as I can tell, my v3.12.1 installation works .

Here is the output from a buildprog.py run:

(.venv) C:\ncs\prj\nrf5340_audio>python tools\buildprog\buildprog.py -c app -b debug -d gateway
+------------+----------+---------+--------------+---------------------+---------------------+
|    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
+------------+----------+---------+--------------+---------------------+---------------------+
|    1000    |  False   | headset | Not selected |     Not selected    |     Not selected    |
| 1050170874 |   True   | gateway | Not selected |     Selected TBD    |     Not selected    |
|    1000    |  False   | headset | Not selected |     Not selected    |     Not selected    |
+------------+----------+---------+--------------+---------------------+---------------------+
Invoking build step
Run: west build C:\ncs\prj\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\ncs\prj\nrf5340_audio\build\dev_gateway\build_debug -DCONFIG_AUDIO_DEV=2
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/ncs/prj/nrf5340_audio
-- CMake version: 3.27.9
-- Found Python3: C:/Users/KaiHarrekilde-Peters/Projects/zephyrproject/.venv/Scripts/python.exe (found suitable version "3.12.1", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: C:/Users/KaiHarrekilde-Peters/Projects/zephyrproject/zephyr/.cache
-- Zephyr version: 3.5.99 (C:/Users/KaiHarrekilde-Peters/Projects/zephyrproject/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf5340_audio_dk_nrf5340_cpuapp
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.4 (C:/Users/KaiHarrekilde-Peters/Projects/zephyr-sdk-0.16.4)
-- Found toolchain: zephyr 0.16.4 (C:/Users/KaiHarrekilde-Peters/Projects/zephyr-sdk-0.16.4)
-- Found Dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: C:/Users/KaiHarrekilde-Peters/Projects/zephyrproject/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: C:/ncs/prj/nrf5340_audio/build/dev_gateway/build_debug/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/ncs/prj/nrf5340_audio/build/dev_gateway/build_debug/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/ncs/prj/nrf5340_audio/build/dev_gateway/build_debug/zephyr/dts.cmake

warning: NCS_INCLUDE_RPMSG_CHILD_IMAGE (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:23) defined without a type
Parsing C:/ncs/prj/nrf5340_audio/Kconfig
Loaded configuration 'C:/Users/KaiHarrekilde-Peters/Projects/zephyrproject/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp_defconfig'
Merged configuration 'C:/ncs/prj/nrf5340_audio/prj.conf'
Merged configuration 'C:/ncs/prj/nrf5340_audio/build/dev_gateway/build_debug/zephyr/misc/generated/extra_kconfig_options.conf'


warning: RESET_ON_FATAL_ERROR (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:28) defined without a type

warning: HW_CODEC_CIRRUS_LOGIC (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:32) defined without a type

warning: CONTIN_ARRAY (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:62) defined without a type

warning: PCM_MIX (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:68) defined without a type

warning: TONE (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:71) defined without a type

warning: PSCM (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:74) defined without a type

warning: DATA_FIFO (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:77) defined without a type

warning: BT_LL_ACS_NRF53 (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:145) defined without a type

warning: CONFIG_BT_MAX_PAIRED (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:156) defined without a type

warning: CONFIG_LC3_ENC_CHAN_MAX (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:160) defined without a type

warning: CONFIG_LIBLC3 (defined at C:/ncs/prj/nrf5340_audio\Kconfig.defaults:164) defined without a type

warning: CMSIS_DSP_FASTMATH (defined at C:/ncs/prj/nrf5340_audio\src/audio\Kconfig.defaults:20) defined without a type

warning: LC3_ENC_CHAN_MAX (defined at C:/ncs/prj/nrf5340_audio\src/audio\Kconfig.defaults:33, C:/ncs/prj/nrf5340_audio\src/audio\Kconfig.defaults:68) defined without a type

warning: LC3_DEC_CHAN_MAX (defined at C:/ncs/prj/nrf5340_audio\src/audio\Kconfig.defaults:36, C:/ncs/prj/nrf5340_audio\src/audio\Kconfig.defaults:71) defined without a type

warning: BT_ATT_ENFORCE_FLOW (defined at C:/ncs/prj/nrf5340_audio\src/bluetooth\bt_management\controller_config\Kconfig.defaults:11) defined without a type

warning: BT_PACS_SNK_CONTEXT (defined at C:/ncs/prj/nrf5340_audio\src/bluetooth\bt_stream/unicast\Kconfig.defaults:97) defined without a type

warning: BT_PACS_SRC_CONTEXT (defined at C:/ncs/prj/nrf5340_audio\src/bluetooth\bt_stream/unicast\Kconfig.defaults:101) defined without a type

error: Aborting due to Kconfig warnings

CMake Error at C:/Users/KaiHarrekilde-Peters/Projects/zephyrproject/zephyr/cmake/modules/kconfig.cmake:355 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  C:/Users/KaiHarrekilde-Peters/Projects/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:129 (include)
  C:/Users/KaiHarrekilde-Peters/Projects/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/Users/KaiHarrekilde-Peters/Projects/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:52 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' -DWEST_PYTHON=C:/Users/KaiHarrekilde-Peters/Projects/zephyrproject/.venv/Scripts/python.exe '-BC:\ncs\prj\nrf5340_audio\build\dev_gateway\build_debug' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp -DCONFIG_AUDIO_DEV=2 '-SC:\ncs\prj\nrf5340_audio'
Traceback (most recent call last):
  File "C:\ncs\prj\nrf5340_audio\tools\buildprog\buildprog.py", line 439, in <module>
    __main()
  File "C:\ncs\prj\nrf5340_audio\tools\buildprog\buildprog.py", line 421, in __main
    __build_module(build_cfg, options)
  File "C:\ncs\prj\nrf5340_audio\tools\buildprog\buildprog.py", line 167, in __build_module
    raise Exception("cmake error: " + str(ret_val))
Exception: cmake error: 1

(.venv) C:\ncs\prj\nrf5340_audio>

  • Let me try. That'll probably be tomorrow. Setting it all up takes a while.

  • I am stuck on this.

    [...]

    Edit: OK, the --pristine option was what was needed to get it to pick up the new SDK location. There's just too much caching of information going on IMHO.

    Unfortunately, it did not make a difference - the build process breaks the same way. I will either move or install an extra zephyrproject (v3.5.0) under c:/ncs tomorrow, just to rule out the too-long path theory.

  • I'm confused.

    Kai Harrekilde said:
    I'm using the nRF Connect SDK (and VSCode, but thats not suggested for building this app, according to the docs).

    But you are referring to Zephyrproject 3.5.0

    Kai Harrekilde said:
    will either move or install an extra zephyrproject (v3.5.0) under c:/ncs tomorrow

    There should not be any reason to install zephyrproject. How did you install NCS? Through the nRF Connect for VS Code extension or our toolchain manager? 

    Also, in your build output it states zephyrproject (Zephyr version: 3.5.0 (C:/Users/KaiHarrekilde-Peters/Projects/test/zephyrproject/zephyr)) where if you are using NCS, it states e.g. Zephyr version: 3.4.99 (/opt/nordic/ncs/v2.5.1/zephyr)

Related