Build error

I recently updated VS Code and regret doing so.  My SDK 2.3.0 was working fine for over a year.  But VS Code keeps prompting me with an update.  I finally updated it and I can't simply click on Build or Pristine build anymore.  I keep getting "zephyr_variable_set_too_late" error.  I have to keep adding new build in order to build the project.  But the build doesn't work on my custom board anymore.  Below is a capture from the terminal.

* Executing task: nRF Connect: Build [pristine]: aws_iot/build (active)

Building aws_iot
west build --build-dir c:/ncs/v2.3.0/nrf/samples/nrf9160/aws_iot/build c:/ncs/v2.3.0/nrf/samples/nrf9160/aws_iot --pristine --board nrf9160dk_nrf9160_ns --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION="NONE" -Dmcuboot_OVERLAY_CONFIG="C:/ncs/v2.3.0/nrf/modules/mcuboot/tfm.conf;C:/ncs/v2.3.0/nrf/subsys/partition_manager/partition_manager_enabled.conf" -DCACHED_CONF_FILE=c:\ncs\v2.3.0\nrf\samples\nrf9160\aws_iot\prj.conf

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/ncs/v2.3.0/nrf/samples/nrf9160/aws_iot
-- Found Python3: C:/ncs/toolchains/v2.3.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Cache files will be written to: C:/ncs/v2.3.0/zephyr/.cache
-- Zephyr version: 3.2.99 (C:/ncs/v2.3.0/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: nrf9160dk_nrf9160_ns, Revision: 0.7.0
-- Found host-tools: zephyr 0.15.2 (C:/ncs/toolchains/v2.3.0/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.15.2 (C:/ncs/toolchains/v2.3.0/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/v2.3.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: C:/ncs/v2.3.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
-- Generated zephyr.dts: C:/ncs/v2.3.0/nrf/samples/nrf9160/aws_iot/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/ncs/v2.3.0/nrf/samples/nrf9160/aws_iot/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/ncs/v2.3.0/nrf/samples/nrf9160/aws_iot/build/zephyr/dts.cmake
CMake Error at C:/ncs/v2.3.0/zephyr/cmake/modules/kconfig.cmake:2147483647 (zephyr_variable_set_too_late):
Syntax error in cmake code at

C:/ncs/v2.3.0/zephyr/cmake/modules/kconfig.cmake:2147483647

when parsing string

c:\ncs\v2.3.0\nrf\samples\nrf9160\aws_iot\prj.conf

Invalid character escape '\v'.
Call Stack (most recent call first):
C:/ncs/v2.3.0/zephyr/cmake/modules/kconfig.cmake:71 (if)
C:/ncs/v2.3.0/nrf/cmake/modules/kconfig.cmake:29 (include)
C:/ncs/v2.3.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
C:/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:9 (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!
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\v2.3.0\opt\bin\cmake.EXE' '-DWEST_PYTHON=C:\ncs\toolchains\v2.3.0\opt\bin\python.exe' '-Bc:\ncs\v2.3.0\nrf\samples\nrf9160\aws_iot\build'
-GNinja -DBOARD=nrf9160dk_nrf9160_ns -DNCS_TOOLCHAIN_VERSION=NONE '-Dmcuboot_OVERLAY_CONFIG=C:/ncs/v2.3.0/nrf/modules/mcuboot/tfm.conf;C:/ncs/v2.3.0/nrf/subsys/partition_manager/partition_manager_enab
led.conf' '-DCACHED_CONF_FILE=c:\ncs\v2.3.0\nrf\samples\nrf9160\aws_iot\prj.conf' '-Sc:\ncs\v2.3.0\nrf\samples\nrf9160\aws_iot'

The aws_iot is straight from the SDK.  I tried downgrading VS Code to an older version, e.g. 1.90.2, but the SDK keeps changing it back to 1.103.2.  There seems to be something wrong with either the SDK or VS Code.  I need to stick with SDK 2.3.0.  How can I stop VS Code from updating with the SDK?  Or, how can I fix this build error?  Thank you.

Parents Reply Children
Related