I want to use SPI Master for data transmission.
I found this link:
https://github.com/too1/ncs-spi-master-slave-example
but I use this example for testing with VS Code Zephyr and SDK 2.5.1, and it compiles successfully. However, if I change it to v2.2.0, the following error occurs:
Building ncs-spi-master-slave-example west build --build-dir /Users/oliver/code/nrf/ncs-spi-master-slave-example/build_1 /Users/oliver/code/nrf/ncs-spi-master-slave-example -- west build: generating a build system Loading Zephyr default modules (Zephyr base (cached)). -- Application: /Users/oliver/code/nrf/ncs-spi-master-slave-example -- Cache files will be written to: /Users/oliver/Library/Caches/zephyr -- Zephyr version: 3.2.99 (/opt/nordic/ncs/v2.2.0/zephyr) -- Found west (found suitable version "0.14.0", minimum required is "0.7.1") -- Board: nrf52840dk_nrf52840 -- Found host-tools: zephyr 0.15.1 (/opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk) -- Found toolchain: zephyr 0.15.1 (/opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk) -- Found BOARD.dts: /opt/nordic/ncs/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts -- Found devicetree overlay: /Users/oliver/code/nrf/ncs-spi-master-slave-example/boards/nrf52840dk_nrf52840.overlay devicetree error: /opt/nordic/ncs/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts:100 (column 2): parse error: malformed value -- In: /Users/oliver/code/nrf/ncs-spi-master-slave-example/build_1/zephyr, command: /opt/nordic/ncs/toolchains/v2.2.0/bin/python3.9;/opt/nordic/ncs/v2.2.0/zephyr/scripts/dts/gen_defines.py;--dts;/Users/oliver/code/nrf/ncs-spi-master-slave-example/build_1/zephyr/zephyr.dts.pre;--dtc-flags;'-Wno-unique_unit_address_if_enabled';--bindings-dirs;/opt/nordic/ncs/v2.2.0/nrf/dts/bindings;/opt/nordic/ncs/v2.2.0/zephyr/dts/bindings;--header-out;/Users/oliver/code/nrf/ncs-spi-master-slave-example/build_1/zephyr/include/generated/devicetree_generated.h.new;--dts-out;/Users/oliver/code/nrf/ncs-spi-master-slave-example/build_1/zephyr/zephyr.dts.new;--edt-pickle-out;/Users/oliver/code/nrf/ncs-spi-master-slave-example/build_1/zephyr/edt.pickle;--vendor-prefixes;/opt/nordic/ncs/v2.2.0/nrf/dts/bindings/vendor-prefixes.txt;--vendor-prefixes;/opt/nordic/ncs/v2.2.0/zephyr/dts/bindings/vendor-prefixes.txt CMake Error at /opt/nordic/ncs/v2.2.0/zephyr/cmake/modules/dts.cmake:231 (message): gen_defines.py failed with return code: 1 Call Stack (most recent call first): /opt/nordic/ncs/v2.2.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include) /opt/nordic/ncs/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include) /opt/nordic/ncs/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate) CMakeLists.txt:4 (find_package) -- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/v2.2.0/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/v2.2.0/bin/python3 -B/Users/oliver/code/nrf/ncs-spi-master-slave-example/build_1 -GNinja -S/Users/oliver/code/nrf/ncs-spi-master-slave-example
I haven't made any modifications other than changing the SDK version