example Matter_light_switch in vs code
version using nrf connect sdk -> v2.8.0
manage tool-chain version v2.8.0
nrf52840dk
getting error while building code
Executing task: nRF Connect: Build: light_switch_5/light_switch_5 (active)
Building light_switch_5
west build --build-dir /home/nistantritech/light_switch_5/build/light_switch_5 /home/nistantritech/light_switch_5
[0/77] Performing build step for 'chip-gn'
Starting Matter library build in /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip
Done. Made 3623 targets from 277 files in 399ms
[47/117] c++ obj/src/platform/nrfconnect/nrfconnect.OTAImageProcessorImpl.cpp.o
FAILED: obj/src/platform/nrfconnect/nrfconnect.OTAImageProcessorImpl.cpp.o
ccache /home/nistantritech/ncs/toolchains/b81a7cd864/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++ -MMD -MF obj/src/platform/nrfconnect/nrfconnect.OTAImageProcessorImpl.cpp.o.d -Wconversion -mthumb -Os -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wall -Werror -Wstack-usage=8192 -Wextra -Wshadow -Wunreachable-code -Wvla -Wformat -Wformat-nonliteral -Wformat-security -Wundef -Wno-deprecated-declarations -Wno-missing-field-initializers -Wno-unknown-warning-option -Wno-unused-parameter -Wno-unused -Wno-cast-function-type -Wno-psabi -Wno-maybe-uninitialized -Wno-builtin-macro-redefined -fdiagnostics-color -fno-strict-aliasing -D_POSIX_C_SOURCE=200809 -DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=\<nrf-psa-crypto-user-config.h\> -DMBEDTLS_CONFIG_FILE=\<nrf-config.h\> -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\<nrf-psa-crypto-config.h\> -fmacro-prefix-map=../../../../../ncs/v2.8.0/modules/lib/matter/= -std=gnu++17 -fno-rtti -Wnon-virtual-dtor -isystem/home/nistantritech/ncs/v2.8.0/nrf/drivers/mpsl/clock_control -isystem/home/nistantritech/light_switch_5/build/light_switch_5/zephyr/include/generated/zephyr -isystem/home/nistantritech/ncs/v2.8.0/zephyr/include -isystem/home/nistantritech/light_switch_5/build/light_switch_5/zephyr/include/generated -isystem/home/nistantritech/ncs/v2.8.0/zephyr/soc/nordic -isystem/home/nistantritech/ncs/v2.8.0/zephyr/lib/libc/newlib/include -isystem/home/nistantritech/ncs/v2.8.0/zephyr/lib/libc/common/include -isystem/home/nistantritech/ncs/v2.8.0/zephyr/soc/nordic/nrf52/. -isystem/home/nistantritech/ncs/v2.8.0/zephyr/soc/nordic/common/. -isystem/home/nistantritech/ncs/v2.8.0/zephyr/subsys/bluetooth -isystem/home/nistantritech/ncs/v2.8.0/zephyr/subsys/settings/include -isystem/home/nistantritech/ncs/v2.8.0/nrf/include -isystem/home/nistantritech/ncs/v2.8.0/nrf/lib/multithreading_lock/. -isystem/home/nistantritech/ncs/v2.8.0/nrf/subsys/bluetooth/controller/. -isystem/home/nistantritech/ncs/v2.8.0/nrf/subsys/trusted_storage/include -isystem/home/nistantritech/ncs/v2.8.0/zephyr/drivers/flash -isystem/home/nistantritech/ncs/v2.8.0/nrf/tests/include -isystem/home/nistantritech/ncs/v2.8.0/zephyr/modules/openthread/platform/. -isystem/home/nistantritech/ncs/v2.8.0/modules/hal/cmsis/CMSIS/Core/Include -isystem/home/nistantritech/ncs/v2.8.0/zephyr/modules/cmsis/. -isystem/home/nistantritech/ncs/v2.8.0/modules/hal/nordic/nrfx -isystem/home/nistantritech/ncs/v2.8.0/modules/hal/nordic/nrfx/drivers/include -isystem/home/nistantritech/ncs/v2.8.0/modules/hal/nordic/nrfx/mdk -isystem/home/nistantritech/ncs/v2.8.0/zephyr/modules/hal_nordic/nrfx/. -isystem/home/nistantritech/ncs/v2.8.0/modules/lib/zcbor/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/nfc/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/fem/common/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/fem/nrf21540_gpio/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/fem/nrf21540_gpio_spi/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/fem/nrf2220/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/fem/nrf2240/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/fem/nrf22xx/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/fem/simple_gpio/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/fem/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/fem/include/protocol -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/mpsl/include/protocol -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/openthread/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/crypto/nrf_cc310_platform/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/crypto/nrf_oberon/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/crypto/nrf_oberon/include/mbedtls -isystem/home/nistantritech/light_switch_5/build/light_switch_5/generated/library_nrf_security_psa -isystem/home/nistantritech/ncs/v2.8.0/nrf/subsys/nrf_security/include -isystem/home/nistantritech/ncs/v2.8.0/nrf/subsys/nrf_security/src/threading/include -isystem/home/nistantritech/ncs/v2.8.0/nrf/subsys/nrf_security/src/utils -isystem/home/nistantritech/ncs/v2.8.0/modules/crypto/oberon-psa-crypto/oberon/drivers -isystem/home/nistantritech/ncs/v2.8.0/modules/crypto/oberon-psa-crypto/include -isystem/home/nistantritech/ncs/v2.8.0/modules/crypto/oberon-psa-crypto/library -isystem/home/nistantritech/ncs/v2.8.0/modules/crypto/mbedtls/library -isystem/home/nistantritech/ncs/v2.8.0/modules/crypto/mbedtls/include -isystem/home/nistantritech/ncs/v2.8.0/modules/crypto/mbedtls/include/library -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/nrf_802154/driver/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/nrf_802154/sl/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/nrf_802154/sl/sl/include -isystem/home/nistantritech/ncs/v2.8.0/nrfxlib/nrf_802154/common/include -isystem/home/nistantritech/ncs/v2.8.0/zephyr/modules/hal_nordic/nrf_802154/include -DKERNEL -D__ZEPHYR__=1 -D_ANSI_SOURCE -D__LINUX_ERRNO_EXTENSIONS__ -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -DNRF52840_XXAA -DZCBOR_CANONICAL -DZCBOR_ASSERTS -D__FILE__=__FILE_NAME__ -fno-strict-aliasing -fcheck-new -std=c++17 -fno-exceptions -fno-rtti -imacros/home/nistantritech/light_switch_5/build/light_switch_5/zephyr/include/generated/zephyr/autoconf.h -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/home/nistantritech/ncs/toolchains/b81a7cd864/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros/home/nistantritech/ncs/v2.8.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -fno-pic -fno-pie --param=min-pagesize=0 -fmacro-prefix-map=/home/nistantritech/light_switch_5=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/nistantritech/ncs/v2.8.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/nistantritech/ncs/v2.8.0=WEST_TOPDIR -specs=nano.specs -D_POSIX_THREADS -std=gnu++17 -DNDEBUG -DCHIP_HAVE_CONFIG_H=1 -I../../../../../ncs/v2.8.0/modules/lib/matter/src/include -I../../../../../ncs/v2.8.0/modules/lib/matter/src -Igen/include -I../../../../../ncs/v2.8.0/modules/lib/matter/third_party/nlassert/repo/include -I../../../../../ncs/v2.8.0/modules/lib/matter/third_party/nlio/repo/include -I../../../../../ncs/v2.8.0/modules/lib/matter/zzz_generated/app-common -c ../../../../../ncs/v2.8.0/modules/lib/matter/src/platform/nrfconnect/OTAImageProcessorImpl.cpp -o obj/src/platform/nrfconnect/nrfconnect.OTAImageProcessorImpl.cpp.o
../../../../../ncs/v2.8.0/modules/lib/matter/src/platform/nrfconnect/OTAImageProcessorImpl.cpp: In member function 'CHIP_ERROR chip::DeviceLayer::OTAImageProcessorImpl::PrepareDownloadImpl()':
../../../../../ncs/v2.8.0/modules/lib/matter/src/platform/nrfconnect/OTAImageProcessorImpl.cpp:106:39: error: 'CONFIG_UPDATEABLE_IMAGE_NUMBER' was not declared in this scope; did you mean 'CONFIG_MCUBOOT_MCUBOOT_IMAGE_NUMBER'?
106 | for (int image_id = 0; image_id < CONFIG_UPDATEABLE_IMAGE_NUMBER; ++image_id)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CONFIG_MCUBOOT_MCUBOOT_IMAGE_NUMBER
../../../../../ncs/v2.8.0/modules/lib/matter/src/platform/nrfconnect/OTAImageProcessorImpl.cpp:106:39: note: maximum limit of 1000 namespaces searched for 'CONFIG_UPDATEABLE_IMAGE_NUMBER'
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
[56/117] c++ obj/src/transport/libTransportLayer.SessionHolder.cpp.o
ninja: build stopped: subcommand failed.
FAILED: modules/connectedhomeip/src/chip-gn-stamp/chip-gn-build modules/connectedhomeip/args.gn modules/connectedhomeip/build.ninja modules/connectedhomeip/.ninja_deps modules/connectedhomeip/build.ninja.stamp modules/connectedhomeip/lib/libCHIP.a modules/connectedhomeip/lib/libMatterDeviceInfoProviderExample.a /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip/src/chip-gn-stamp/chip-gn-build /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip/args.gn /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip/build.ninja /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip/.ninja_deps /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip/build.ninja.stamp /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip/lib/libCHIP.a /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip/lib/libMatterDeviceInfoProviderExample.a
cd /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip && /home/nistantritech/ncs/toolchains/b81a7cd864/usr/local/bin/cmake -E echo "Starting Matter library build in /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip" && /home/nistantritech/ncs/toolchains/b81a7cd864/usr/local/bin/python /home/nistantritech/ncs/v2.8.0/modules/lib/matter/config/common/cmake/make_gn_args.py @args.tmp > args.gn.tmp && /home/nistantritech/ncs/toolchains/b81a7cd864/usr/local/bin/cmake -E compare_files args.gn.tmp args.gn || /home/nistantritech/ncs/toolchains/b81a7cd864/usr/local/bin/cmake -E rename args.gn.tmp args.gn && /home/nistantritech/ncs/toolchains/b81a7cd864/opt/bin/gn --root=/home/nistantritech/ncs/v2.8.0/modules/lib/matter --root-target=/home/nistantritech/ncs/v2.8.0/modules/lib/matter/config/nrfconnect/chip-gn --dotfile=/home/nistantritech/ncs/v2.8.0/modules/lib/matter/config/nrfconnect/chip-gn/.gn --script-executable=/home/nistantritech/ncs/toolchains/b81a7cd864/usr/local/bin/python gen --check --fail-on-unused-args /home/nistantritech/light_switch_5/build/light_switch_5/modules/connectedhomeip && ninja && /home/nistantritech/ncs/toolchains/b81a7cd864/usr/local/bin/cmake -E echo "Matter library build complete"
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/nistantritech/ncs/toolchains/b81a7cd864/usr/local/bin/cmake --build /home/nistantritech/light_switch_5/build/light_switch_5
* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.