Hi,
I am using a Mac (Apple silicon) to develop a Matter device. We are using one of the Matter examples, but when importing the example we get the error that GN Tool cannot be found. We have installed a PATH to the GN tool location and we can run the GN Tool from any library path of the SDK library, so we cannot understand why we get the error.
Here is the error message:
Creating solution lock.emProject
/opt/nordic/ncs/v1.9.1/toolchain/bin/cmake -GNinja -DBOARD=nrf52840dk_nrf52840 -DBOARD_DIR=/opt/nordic/ncs/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840 -B/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840 -S/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock -DNCS_TOOLCHAIN_VERSION=1.9.1 -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/opt/nordic/ncs/v1.9.1/toolchain/segger_embedded_studio/html/configure_nordic_project_menuconfig.py
-- Application: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock
-- Zephyr version: 2.7.99 (/opt/nordic/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: /opt/nordic/ncs/v1.9.1/toolchain/bin/python3 (found suitable exact version "3.9.6") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /Users/jenzo/Library/Caches/zephyr
-- Found dtc: /opt/nordic/ncs/v1.9.1/toolchain/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/opt/nordic/ncs/v1.9.1/toolchain)
-- Found BOARD.dts: /opt/nordic/ncs/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/boards/nrf52840dk_nrf52840.overlay
-- Generated zephyr.dts: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/zephyr/dts.cmake
Parsing /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/Kconfig
Loaded configuration '/opt/nordic/ncs/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
Merged configuration '/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/prj_single_image_matter_dfu.conf'
Configuration saved to '/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/zephyr/.config'
Kconfig header saved to '/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/nordic/ncs/v1.9.1/toolchain/bin/arm-none-eabi-gcc
loading initial cache file /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/mcuboot/child_image_preload.cmake
-- Application: /opt/nordic/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr
-- Zephyr version: 2.7.99 (/opt/nordic/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: /opt/nordic/ncs/v1.9.1/toolchain/bin/python3 (found suitable exact version "3.9.6") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /Users/jenzo/Library/Caches/zephyr
-- Found dtc: /opt/nordic/ncs/v1.9.1/toolchain/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/opt/nordic/ncs/v1.9.1/toolchain)
-- Found BOARD.dts: /opt/nordic/ncs/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: /opt/nordic/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Generated zephyr.dts: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/mcuboot/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/mcuboot/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/mcuboot/zephyr/dts.cmake
Parsing /opt/nordic/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration '/opt/nordic/ncs/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
Merged configuration '/opt/nordic/ncs/v1.9.1/bootloader/mcuboot/boot/zephyr/prj.conf'
Merged configuration '/opt/nordic/ncs/v1.9.1/nrf/subsys/partition_manager/ext_flash_mcuboot_secondary.conf'
Merged configuration '/opt/nordic/ncs/v1.9.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Merged configuration '/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/child_image/mcuboot_single_image_matter_dfu.conf'
Merged configuration '/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
Configuration saved to '/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/mcuboot/zephyr/.config'
Kconfig header saved to '/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/mcuboot/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/nordic/ncs/v1.9.1/toolchain/bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/mcuboot
-- OpenThread Source Directory: /opt/nordic/ncs/v1.9.1/modules/lib/openthread
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Package Name: OPENTHREAD
-- Setting default package version: thread-reference-20200818-ncs1-rc3-560-g02e61a2ed
-- Package Version: thread-reference-20200818-ncs1-rc3-560-g02e61a2ed
-- Found Python3: /opt/nordic/ncs/v1.9.1/toolchain/bin/python3 (found version "3.9.6") found components: Interpreter
-- Configuring incomplete, errors occurred!
See also "/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/CMakeFiles/CMakeOutput.log".
See also "/opt/nordic/ncs/v1.9.1/nrf/samples/matter/lock/build_nrf52840dk_nrf52840/CMakeFiles/CMakeError.log".
Including boilerplate (Zephyr base): /opt/nordic/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Using NCS Toolchain 1.9.1 for building. (/opt/nordic/ncs/v1.9.1/toolchain/cmake)
warning: Experimental symbol CHIP is enabled.
=== child image mcuboot - begin ===
Including boilerplate (Zephyr base): /opt/nordic/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Using NCS Toolchain 1.9.1 for building. (/opt/nordic/ncs/v1.9.1/toolchain/cmake)
CMake Warning at /opt/nordic/ncs/v1.9.1/nrf/lib/flash_patch/CMakeLists.txt:9 (message):
----------------------------------------------------------
--- WARNING: To maintain the integrity of secure boot, ---
--- enable CONFIG_DISABLE_FLASH_PATCH in production. ---
----------------------------------------------------------
MCUBoot bootloader key file: /opt/nordic/ncs/v1.9.1/bootloader/mcuboot/root-ec-p256.pem
=== child image mcuboot - end ===
CMake Warning at /opt/nordic/ncs/v1.9.1/nrf/modules/mcuboot/CMakeLists.txt:262 (message):
---------------------------------------------------------
--- WARNING: Using default MCUBoot key, it should not ---
--- be used for production. ---
---------------------------------------------------------
CMake Error at /opt/nordic/ncs/v1.9.1/modules/lib/matter/config/nrfconnect/chip-module/CMakeLists.txt:157 (message):
The 'gn' command was not found. Make sure you have GN installed.
error: cmake failed
create_nordic_project.py failed (1)