PCA10121 installation

Hi

I have two PCA10121 and followed the instructions here to get the demo audio application to work.

The output of:

python3 buildprog.py -c app -b debug -d both

is:

+------------+----------+---------+--------------+---------------------+---------------------+
|    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
+------------+----------+---------+--------------+---------------------+---------------------+
| 1050156534 |   ←[32mTrue←[0m   | headset | Not selected |     Selected TBD    |     Not selected    |
| 1050158213 |   ←[32mTrue←[0m   | gateway | Not selected |     Selected TBD    |     Not selected    |
+------------+----------+---------+--------------+---------------------+---------------------+
Invoking build step
Run: west build ../.. -b nrf5340_audio_dk_nrf5340_cpuapp -d ../../build/dev_headset/build_debug -DOVERLAY_CONFIG="overlay-headset.conf   overlay-debug.conf"
usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
west: error: argument <command>: invalid choice: 'build' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')
Traceback (most recent call last):
  File "C:\Users\se\Desktop\projects\BT_Klaud\LE_Audio\nrf5340_audio\tools\buildprog\buildprog.py", line 319, in <module>
    __main()
  File "C:\Users\se\Desktop\projects\BT_Klaud\LE_Audio\nrf5340_audio\tools\buildprog\buildprog.py", line 302, in __main
    __build_module(build_cfg)
  File "C:\Users\se\Desktop\projects\BT_Klaud\LE_Audio\nrf5340_audio\tools\buildprog\buildprog.py", line 130, in __build_module
    raise Exception("cmake error: " + str(ret_val))
Exception: cmake error: 2

where cmake gives me the correct path to ..toolchains\v2.0.2\opt\bin\cmake.exe

Does someone know what could cause the error cmake error: 2?

Kind regards

Gerry

Parents Reply Children
  • Thanks Vidar, that solved the problem, but now there seems to be Kconfig issue. Any idea?

    python buildprog.py -c both -b release -d both -p
    +------------+----------+---------+--------------+---------------------+---------------------+
    |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1050156534 |   ←[32mTrue←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
    | 1050158213 |  ←[33mFalse←[0m   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
    +------------+----------+---------+--------------+---------------------+---------------------+
    Invoking build step
    Net core uses precompiled hex
    Run: west build ../.. -b nrf5340_audio_dk_nrf5340_cpuapp -d ../../build/dev_headset/build_release -DOVERLAY_CONFIG="overlay-headset.conf   overlay-release.conf"
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/Users/se/Desktop/projects/BT_Klaud/LE_Audio/nrf5340_audio
    -- Using NCS Toolchain 2.0.2 for building. (C:/Users/se/Desktop/projects/BT_Klaud/toolchains/v2.0.2/cmake)
    -- Found Python3: C:/Users/se/Desktop/projects/BT_Klaud/toolchains/v2.0.2/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: C:/Users/se/Desktop/projects/BT_Klaud/v2.0.2/zephyr/.cache
    -- Zephyr version: 3.0.99 (C:/Users/se/Desktop/projects/BT_Klaud/v2.0.2/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf5340_audio_dk_nrf5340_cpuapp
    -- Found host-tools: zephyr 0.14.1 (C:/Users/se/Desktop/projects/BT_Klaud/toolchains/v2.0.2/opt/zephyr-sdk)
    -- Found dtc: C:/Users/se/Desktop/projects/BT_Klaud/toolchains/v2.0.2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (C:/Users/se/Desktop/projects/BT_Klaud/toolchains/v2.0.2/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/Users/se/Desktop/projects/BT_Klaud/v2.0.2/nrf/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp.dts
    -- Found devicetree overlay: C:/Users/se/Desktop/projects/BT_Klaud/LE_Audio/nrf5340_audio/nrf5340_audio_dk_nrf5340_cpuapp.overlay
    -- Generated zephyr.dts: C:/Users/se/Desktop/projects/BT_Klaud/LE_Audio/nrf5340_audio/build/dev_headset/build_release/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Users/se/Desktop/projects/BT_Klaud/LE_Audio/nrf5340_audio/build/dev_headset/build_release/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Users/se/Desktop/projects/BT_Klaud/LE_Audio/nrf5340_audio/build/dev_headset/build_release/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Users/se/Desktop/projects/BT_Klaud/LE_Audio/nrf5340_audio/build/dev_headset/build_release/zephyr/dts.cmake
    
    warning: Experimental symbol NRF5340_AUDIO is enabled.
    
    
    warning: Experimental symbol BT_ISO_UNICAST is enabled.
    
    
    warning: Experimental symbol BT_ISO_SYNC_RECEIVER is enabled.
    
    
    warning: Experimental symbol BT_AUDIO is enabled.
    
    
    warning: Experimental symbol BT_VCS is enabled.
    
    
    C:/Users/se/Desktop/projects/BT_Klaud/v2.0.2/nrf/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp_defconfig:78: warning: attempt to assign the value 'y' to the undefined symbol HW_CODEC_CIRRUS_LOGIC
    Parsing C:/Users/se/Desktop/projects/BT_Klaud/LE_Audio/nrf5340_audio/Kconfig
    Loaded configuration 'C:/Users/se/Desktop/projects/BT_Klaud/v2.0.2/nrf/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/Users/se/Desktop/projects/BT_Klaud/LE_Audio/nrf5340_audio/prj.conf'
    Merged configuration 'C:/Users/se/Desktop/projects/BT_Klaud/LE_Audio/nrf5340_audio/overlay-headset.conf'
    Merged configuration 'C:/Users/se/Desktop/projects/BT_Klaud/LE_Audio/nrf5340_audio/overlay-release.conf'
    
    error: Aborting due to Kconfig warnings
    
    CMake Error at C:/Users/se/Desktop/projects/BT_Klaud/v2.0.2/zephyr/cmake/modules/kconfig.cmake:290 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/Users/se/Desktop/projects/BT_Klaud/v2.0.2/zephyr/cmake/modules/zephyr_default.cmake:121 (include)
      C:/Users/se/Desktop/projects/BT_Klaud/v2.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:51 (include)
      C:/Users/se/Desktop/projects/BT_Klaud/v2.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:76 (include_boilerplate)
      CMakeLists.txt:13 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'C:\Users\se\Desktop\projects\BT_Klaud\toolchains\v2.0.2\opt\bin\cmake.EXE' '-DWEST_PYTHON=C:\Users\se\Desktop\projects\BT_Klaud\toolchains\v2.0.2\opt\bin\python.exe' '-BC:\Users\se\Desktop\projects\BT_Klaud\LE_Audio\nrf5340_audio\build\dev_headset\build_release' '-SC:\Users\se\Desktop\projects\BT_Klaud\LE_Audio\nrf5340_audio' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp '-DOVERLAY_CONFIG=overlay-headset.conf   overlay-release.conf'
    Traceback (most recent call last):
      File "buildprog.py", line 319, in <module>
        __main()
      File "buildprog.py", line 302, in __main
        __build_module(build_cfg)
      File "buildprog.py", line 130, in __build_module
        raise Exception("cmake error: " + str(ret_val))
    Exception: cmake error: 1

    proj.conf

    #
    # Copyright (c) 2022 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # General
    CONFIG_NRF5340_AUDIO=y
    CONFIG_REBOOT=y
    CONFIG_MAIN_THREAD_PRIORITY=10
    CONFIG_MAIN_STACK_SIZE=1940
    
    # Disable Zephyr HCI Vendor-Specific extensions
    CONFIG_BT_HCI_VS_EXT=n
    
    # As long as thread names are used, config must be set to "y"
    CONFIG_THREAD_NAME=y
    
    # Bluetooth
    CONFIG_BT_PRIVACY=n
    CONFIG_BT_GATT_CLIENT=y
    CONFIG_BT_GATT_DYNAMIC_DB=y
    
    # Make sure we have enough space to receive one frame of encoded data
    # The values set below are extended for higher BLE transmission capability
    CONFIG_BT_ISO_RX_MTU=190
    CONFIG_BT_ISO_TX_MTU=190
    CONFIG_BT_L2CAP_TX_BUF_COUNT=6
    CONFIG_BT_RX_STACK_SIZE=2000
    CONFIG_BT_BUF_ACL_RX_SIZE=259
    
    # Not supported on Packetcraft controller
    CONFIG_BT_ATT_ENFORCE_FLOW=n
    
    # Only do pairing without bonding
    CONFIG_BT_BONDABLE=n
    CONFIG_BT_AUDIO=y
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_PER_ADV=y
    CONFIG_BT_ISO_UNICAST=y
    CONFIG_BT_ISO_BROADCASTER=y
    CONFIG_BT_ISO_SYNC_RECEIVER=y
    
    # Temporary, enable the following to meet BT_ISO dependencies
    CONFIG_BT_OBSERVER=y
    CONFIG_BT_PERIPHERAL=y
    
    # Audio sync timer
    CONFIG_NRFX_TIMER1=y
    CONFIG_NRFX_DPPI=y
    
    # Need to turn on SMP when involving services in LE audio profiles
    CONFIG_BT_SMP=y
    
    # Temporarily disabled connetion parameter and PHY update
    CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n
    CONFIG_BT_AUTO_PHY_UPDATE=n
    CONFIG_BT_AUTO_DATA_LEN_UPDATE=n
    
    # Required for calculating test tones
    CONFIG_CMSIS_DSP=y
    CONFIG_CMSIS_DSP_FASTMATH=y
    
    # Channel assignment writes to UICR
    CONFIG_NRFX_NVMC=y
    
    # Avoid multi-build system build network core firmware
    CONFIG_NCS_INCLUDE_RPMSG_CHILD_IMAGE=n
    
    # Workaround to not use fatal_error.c in NCS. Note that the system may still
    # reset on error depending on the build configuraion
    CONFIG_RESET_ON_FATAL_ERROR=n
    
    # use SBC codec GS
    CONFIG_SW_CODEC_SBC=y

    Kind regards Gerry

  • Hi Gerry,

    The build fails because the HW_CODEC_CIRRUS_LOGIC symbol is not defined. This symbol should be defined by the kconfig file in ncs/modules/hal/cirrus-logic/Kconfig.

    Please check if this module is included in your SDK, and if not, repeat the steps outlined here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/nrf5340_audio/README.html#setting-up-the-nrf5340-audio-repositories

    Kind regards,

    Vidar

Related