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