nrf5340_audio app build fails when selecting external flash

I am using ncs v2.2.0 on Windows.

Using the python buildprog.py script I am able to build and run the nrf5340_audio application with the bootloader enabled and using the internal flash memory.

Here is the build command that builds and runs correctly:

C:\ncs\v2.2.0\nrf\applications\nrf5340_audio>python .\tools\buildprog\buildprog.py -c both --pristine -b release -d gateway -m internal

If I then build using the external flash memory option using the following command, the build fails:

C:\ncs\v2.2.0\nrf\applications\nrf5340_audio>python .\tools\buildprog\buildprog.py -c both --pristine -b release -d gateway -m external

Here is the output from the build process:

----- START OF BUILD OUTPUT -----

Invoking build step
Net core uses precompiled hex
Run: west build C:\ncs\v2.2.0\nrf\applications\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -p -d C:\ncs\v2.2.0\nrf\applications\nrf5340_audio\build\dev_gateway\build_release -DCONFIG_AUDIO_DEV=2 -DCONFIG_AUDIO_DFU=2 -DCONF_FILE=prj_release.conf
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/ncs/v2.2.0/nrf/applications/nrf5340_audio
-- Using NCS Toolchain 2.2.0 for building. (C:/ncs/toolchains/v2.2.0/cmake)
-- Found Python3: C:/ncs/toolchains/v2.2.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Cache files will be written to: C:/ncs/v2.2.0/zephyr/.cache
-- Zephyr version: 3.2.99 (C:/ncs/v2.2.0/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: nrf5340_audio_dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.15.1 (C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.15.1 (C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/v2.2.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: C:/ncs/v2.2.0/nrf/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp.dts
-- Found devicetree overlay: C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/dfu/conf/overlay-dfu_external_flash.overlay
-- Generated zephyr.dts: C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/zephyr/dts.cmake

warning: Experimental symbol NRF5340_AUDIO is enabled.


warning: Experimental symbol AUDIO_DFU_ENABLE is enabled.


warning: Experimental symbol BT_ISO_CENTRAL is enabled.


warning: Experimental symbol BT_AUDIO is enabled.


warning: Experimental symbol BT_AUDIO_UNICAST_CLIENT is enabled.


warning: Experimental symbol BT_VCS_CLIENT is enabled.


warning: Experimental symbol BT_MCS is enabled.


warning: Experimental symbol BT_MPL is enabled.


warning: Experimental symbol MCTL is enabled.

Parsing C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/Kconfig
Loaded configuration 'C:/ncs/v2.2.0/nrf/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp_defconfig'
Merged configuration 'C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/prj_release.conf'
Merged configuration 'C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/zephyr/misc/generated/extra_kconfig_options.conf'
Configuration saved to 'C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/zephyr/.config'
Kconfig header saved to 'C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
-- Found Python3: C:/ncs/toolchains/v2.2.0/opt/bin/python.exe (found version "3.8.2") found components: Interpreter

=== child image mcuboot - begin ===
loading initial cache file C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/mcuboot/child_image_preload.cmake
CMake Warning (dev) at C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/mcuboot/child_image_preload.cmake:9 (set):
Syntax error in cmake code at

C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/mcuboot/child_image_preload.cmake:9

when parsing string

C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/dfu/conf/overlay-dfu_external_flash.overlay;c:\ncs\v2.2.0\zephyr\/../nrf/modules/mcuboot/flash_sim.overlay

Invalid escape sequence \v

Policy CMP0010 is not set: Bad variable reference syntax is an error. Run
"cmake --help-policy CMP0010" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/mcuboot/child_image_preload.cmake:10 (set):
Syntax error in cmake code at

C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/mcuboot/child_image_preload.cmake:10

when parsing string

C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/dfu/conf/overlay-mcuboot_external_flash.conf;c:\ncs\v2.2.0\zephyr\/../nrf/subsys/partition_manager/partition_manager_enabled.conf

Invalid escape sequence \v

Policy CMP0010 is not set: Bad variable reference syntax is an error. Run
"cmake --help-policy CMP0010" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

Loading Zephyr default modules (Zephyr base).
-- Application: C:/ncs/v2.2.0/bootloader/mcuboot/boot/zephyr
-- Using NCS Toolchain 2.2.0 for building. (C:/ncs/toolchains/v2.2.0/cmake)
-- Found Python3: C:/ncs/toolchains/v2.2.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Cache files will be written to: C:/ncs/v2.2.0/zephyr/.cache
-- Zephyr version: 3.2.99 (C:/ncs/v2.2.0/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: nrf5340_audio_dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.15.1 (C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.15.1 (C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/v2.2.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
CMake Error at C:/ncs/v2.2.0/zephyr/cmake/modules/dts.cmake:2147483647 (zephyr_variable_set_too_late):
Syntax error in cmake code at

C:/ncs/v2.2.0/zephyr/cmake/modules/dts.cmake:2147483647

when parsing string

C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/dfu/conf/overlay-dfu_external_flash.overlay;c:\ncs\v2.2.0\zephyr\/../nrf/modules/mcuboot/flash_sim.overlay C:/ncs/v2.2.0/bootloader/mcuboot/boot/zephyr/dts.overlay

Invalid character escape '\v'.
Call Stack (most recent call first):
C:/ncs/v2.2.0/zephyr/cmake/modules/dts.cmake:93 (if)
C:/ncs/v2.2.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
C:/ncs/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/ncs/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:44 (find_package)


CMake Error: Error in cmake code at
Unknown:0:
A command failed during the invocation of callback "zephyr_variable_set_too_late".-- Configuring incomplete, errors occurred!

CMake Error at C:/ncs/v2.2.0/nrf/cmake/multi_image.cmake:429 (message):
CMake generation for mcuboot failed, aborting. Command: 1
Call Stack (most recent call first):
C:/ncs/v2.2.0/nrf/cmake/multi_image.cmake:163 (add_child_image_from_source)
C:/ncs/v2.2.0/nrf/modules/mcuboot/CMakeLists.txt:234 (add_child_image)


-- Configuring incomplete, errors occurred!
See also "C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/CMakeFiles/CMakeOutput.log".
See also "C:/ncs/v2.2.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/CMakeFiles/CMakeError.log".
←[91mFATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' '-DWEST_PYTHON=D:\Python\python.exe' '-BC:\ncs\v2.2.0\nrf\applications\nrf5340_audio\build\dev_gateway\build_release' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp -DCONFIG_AUDIO_DEV=2 -DCONFIG_AUDIO_DFU=2 -DCONF_FILE=prj_release.conf '-SC:\ncs\v2.2.0\nrf\applications\nrf5340_audio'
←[0mTraceback (most recent call last):
File "C:\ncs\v2.2.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py", line 394, in <module>
__main()
File "C:\ncs\v2.2.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py", line 377, in __main
__build_module(build_cfg, options)
File "C:\ncs\v2.2.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py", line 146, in __build_module
raise Exception("cmake error: " + str(ret_val))
Exception: cmake error: 1

----- END OF BUILD OUTPUT -----

Is the use of external flash a supported option when using ncs v2.2.0? 

If so, can give me some guidance on how to resolve this build issue?

Thanks,
-- Kristopher

Parents
  • Hi Elfving,

    I have attached an external SPI flash memory to the nrf5340 audio dev kit and now I am trying to get the application compiled so it will interact with the external memory.  The issue here is that audio app does not build if I compile with the switch that selects the external memory.

    I have been doing some more debugging and I discovered that the script "\ncs\v2.2.0\zephyr\zephyr-env.cmd" sets the variable ZEPHYR_BASE to "c:\ncs\v2.2.0\zephyr\.  I noticed in the build output that some of the paths looked suspicious so I changed the value of ZEPHYR_BASE to be "c:/ncs/v2.2.0/zephyr/" and now I can build the audio application with the external memory option.

    Is there another env var configuration script that should be used to set the env vars when using ncs on a Window machine?

    Thanks,
    -- Kristopher

  • Hello again Kristopher, and sorry about the wait.

    Great that you have in a way found the problem. You could set the enviroment variables ZEPHYR_BASE and toolchain using the script that you can find within the {NCS version}/zephyr/ folder. You could also alternatively run the cmd from the toolchain manager using the drop down menu next to the NCS version you're using.

    I believe this issue stems from where your application is placed in relation to the SDK. Do you have a freestanding application?

    Regards,

    Elfving

  • Hi Elfving,

    This build issue happens when I try to build the nrf5340_audio application in the ncs directory.  On my system ncs is installed on the C: drive and the app I am trying to build is in the following directory:

    C:\ncs\v2.2.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py

    I am trying make sure that I have the ncs SDK and build systems installed and configured correctly on my PC.

    Can you verify that you are able to build the nrf5340_audio application with the external DFU memory option builds on one of your windows PC systems?

    Thanks,
    -- Kristopher

  • Hi Elfving,

    I also encountered the same problem in NCS2.2.0.

    lenovo@□□□˼□ MINGW64 /d/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/tools/buildprog
    $ python buildprog.py -c both -b debug -d both -m external -M -p
    No programmer/debugger connected to PC
    No snrs connected
    +------+----------+---------+--------------+---------------------+---------------------+
    | snr  | snr conn |  device | only reboot  | core app programmed | core net programmed |
    +------+----------+---------+--------------+---------------------+---------------------+
    | 1000 |  False   | headset | Not selected |     Selected TBD    |     Selected TBD    |
    | 1000 |  False   | 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 D:\NCS_2.x\v2.2.0\nrf\applications\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -d D:\NCS_2.x\v2.2.0\nrf\applications\nrf5340_audio\build\dev_headset\build_debug -DCONFIG_AUDIO_DEV=1 -DCONFIG_AUDIO_DFU=2 -DCONFIG_B0N_MINIMAL=y
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio
    -- Using NCS Toolchain 2.2.0 for building. (D:/NCS_2.x/toolchains/v2.2.0/cmake)
    -- Found Python3: D:/NCS_2.x/toolchains/v2.2.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: D:/NCS_2.x/v2.2.0/zephyr/.cache
    -- Zephyr version: 3.2.99 (D:/NCS_2.x/v2.2.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf5340_audio_dk_nrf5340_cpuapp
    -- Found host-tools: zephyr 0.15.1 (D:/NCS_2.x/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.15.1 (D:/NCS_2.x/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found Dtc: D:/NCS_2.x/toolchains/v2.2.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: D:/NCS_2.x/v2.2.0/nrf/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp.dts
    -- Found devicetree overlay: D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/dfu/conf/overlay-dfu_external_flash.overlay
    -- Generated zephyr.dts: D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/zephyr/dts.cmake
    
    warning: Experimental symbol NRF5340_AUDIO is enabled.
    
    
    warning: Experimental symbol AUDIO_DFU_ENABLE is enabled.
    
    
    warning: Experimental symbol BT_ISO_PERIPHERAL is enabled.
    
    
    warning: Experimental symbol BT_AUDIO is enabled.
    
    
    warning: Experimental symbol BT_AUDIO_UNICAST_SERVER is enabled.
    
    
    warning: Experimental symbol BT_VCS is enabled.
    
    
    warning: Experimental symbol BT_CSIS is enabled.
    
    
    warning: Experimental symbol BT_MCC is enabled.
    
    
    warning: Experimental symbol BT_CAP_ACCEPTOR is enabled.
    
    Parsing D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/Kconfig
    Loaded configuration 'D:/NCS_2.x/v2.2.0/nrf/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/prj.conf'
    Merged configuration 'D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/zephyr/.config'
    Kconfig header saved to 'D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 12.1.0
    -- The CXX compiler identification is GNU 12.1.0
    -- The ASM compiler identification is GNU
    -- Found assembler: D:/NCS_2.x/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: D:/NCS_2.x/toolchains/v2.2.0/opt/bin/python.exe (found version "3.8.2") found components: Interpreter
    
    === child image mcuboot -  begin ===
    loading initial cache file D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/mcuboot/child_image_preload.cmake
    CMake Warning (dev) at D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/mcuboot/child_image_preload.cmake:9 (set):
      Syntax error in cmake code at
    
        D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/mcuboot/child_image_preload.cmake:9
    
      when parsing string
    
        D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/dfu/conf/overlay-dfu_external_flash.overlay;D:\NCS_2.x\v2.2.0\zephyr/../nrf/modules/mcuboot/flash_sim.overlay
    
      Invalid escape sequence \N
    
      Policy CMP0010 is not set: Bad variable reference syntax is an error.  Run
      "cmake --help-policy CMP0010" for policy details.  Use the cmake_policy
      command to set the policy and suppress this warning.
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/mcuboot/child_image_preload.cmake:10 (set):
      Syntax error in cmake code at
    
        D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/mcuboot/child_image_preload.cmake:10
    
      when parsing string
    
        D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/dfu/conf/overlay-mcuboot_external_flash.conf;D:\NCS_2.x\v2.2.0\zephyr/../nrf/subsys/partition_manager/partition_manager_enabled.conf
    
      Invalid escape sequence \N
    
      Policy CMP0010 is not set: Bad variable reference syntax is an error.  Run
      "cmake --help-policy CMP0010" for policy details.  Use the cmake_policy
      command to set the policy and suppress this warning.
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: D:/NCS_2.x/v2.2.0/bootloader/mcuboot/boot/zephyr
    -- Using NCS Toolchain 2.2.0 for building. (D:/NCS_2.x/toolchains/v2.2.0/cmake)
    -- Found Python3: D:/NCS_2.x/toolchains/v2.2.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: D:/NCS_2.x/v2.2.0/zephyr/.cache
    -- Zephyr version: 3.2.99 (D:/NCS_2.x/v2.2.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf5340_audio_dk_nrf5340_cpuapp
    -- Found host-tools: zephyr 0.15.1 (D:/NCS_2.x/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.15.1 (D:/NCS_2.x/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found Dtc: D:/NCS_2.x/toolchains/v2.2.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    CMake Error at D:/NCS_2.x/v2.2.0/zephyr/cmake/modules/dts.cmake:2147483647 (zephyr_variable_set_too_late):
      Syntax error in cmake code at
    
        D:/NCS_2.x/v2.2.0/zephyr/cmake/modules/dts.cmake:2147483647
    
      when parsing string
    
        D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/dfu/conf/overlay-dfu_external_flash.overlay;D:\NCS_2.x\v2.2.0\zephyr/../nrf/modules/mcuboot/flash_sim.overlay D:/NCS_2.x/v2.2.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    
      Invalid character escape '\N'.
    Call Stack (most recent call first):
      D:/NCS_2.x/v2.2.0/zephyr/cmake/modules/dts.cmake:93 (if)
      D:/NCS_2.x/v2.2.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
      D:/NCS_2.x/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      D:/NCS_2.x/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:44 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    CMake Error: Error in cmake code at
    Unknown:0:
    A command failed during the invocation of callback "zephyr_variable_set_too_late".
    CMake Error at D:/NCS_2.x/v2.2.0/nrf/cmake/multi_image.cmake:429 (message):
      CMake generation for mcuboot failed, aborting.  Command: 1
    Call Stack (most recent call first):
      D:/NCS_2.x/v2.2.0/nrf/cmake/multi_image.cmake:163 (add_child_image_from_source)
      D:/NCS_2.x/v2.2.0/nrf/modules/mcuboot/CMakeLists.txt:234 (add_child_image)
    
    
    -- Configuring incomplete, errors occurred!
    See also "D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/CMakeFiles/CMakeOutput.log".
    See also "D:/NCS_2.x/v2.2.0/nrf/applications/nrf5340_audio/build/dev_headset/build_debug/CMakeFiles/CMakeError.log".
    FATAL ERROR: command exited with status 1: 'D:\NCS_2.x\toolchains\v2.2.0\opt\bin\cmake.EXE' '-DWEST_PYTHON=D:\NCS_2.x\toolchains\v2.2.0\opt\bin\python.exe' '-BD:\NCS_2.x\v2.2.0\nrf\applications\nrf5340_audio\build\dev_headset\build_debug' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp -DCONFIG_AUDIO_DEV=1 -DCONFIG_AUDIO_DFU=2 -DCONFIG_B0N_MINIMAL=y '-SD:\NCS_2.x\v2.2.0\nrf\applications\nrf5340_audio'
    Traceback (most recent call last):
      File "buildprog.py", line 394, in <module>
        __main()
      File "buildprog.py", line 377, in __main
        __build_module(build_cfg, options)
      File "buildprog.py", line 146, in __build_module
        raise Exception("cmake error: " + str(ret_val))
    Exception: cmake error: 1

    Regards,

    Zero

  • Hello again,

    Just to expand a bit on this first: the easiest and go-to way of getting the right path variables is to either run the terminal from the NCS version drop down menus in Toolchain Manager, or by opening an nRF Connect Terminal from VSC.

    I thought you could also run the \ncs\v2.2.0\zephyr\zephyr-env.cmd script, but that apparently won't set the tool versions. And I agree that it looks like it has set the slashes to the wrong direction, which seems to be the main reason for your "Invalid character escape" errors. Though I haven't seen this error before.

    khett-ptd said:

    C:\ncs\v2.2.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py

    I see, so you haven't moved the app anywhere.

    khett-ptd said:

    Can you verify that you are able to build the nrf5340_audio application with the external DFU memory option builds on one of your windows PC systems?

    Yes, I just did this and it works on my side. Though I'll have to run it with the right path variables set, otherwise it doesn't work. To me it doesn't seem to make a difference if I'm using the external or internal DFU memory option.

    Regards,

    Elfving

  • Hello Zero,

    Yes it seems you have. Did you set the ZEPHYR_BASE manually? Does it help running a terminal with everything set for you, like the two options I gave to Kristopher?

    Regards,

    Elfving

  • Hi Elfving,

    I checked the pc environment variable, ZEPHYR_BASE is not set, and I opened the bash cmd according to your first method, still the same compilation error.

    Can you give it a try?

    Regards,

    Zero

Reply Children
Related