Troubleshooting SPI Master Data Transmission with Zephyr and SDK Versions

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

Parents
  • Hi,

    Changing the SDK version is quite a big change. If you look at the commit history of the linked sample, you can see that it has previously been updated to support older versions, for instance nRF Connect SDK v2.1.0 and nRF Connect SDK v2.3.0. I can't see any commits for v2.2.0, but the changes needed to go from v2.1.0 to v2.2.0 should be smaller than backporting from v2.5.2. This commit should support nRF Connect SDK v2.1.1.

    On general basis, I would recommend you to use the application with the latest SDK version. If you are planning to integrate the sample with your existing application running on v2.2.0, I would still recommend you to port your full application to the latest SDK version, to get access to fixes and new features.

    Best regards,
    Jørgen

Reply
  • Hi,

    Changing the SDK version is quite a big change. If you look at the commit history of the linked sample, you can see that it has previously been updated to support older versions, for instance nRF Connect SDK v2.1.0 and nRF Connect SDK v2.3.0. I can't see any commits for v2.2.0, but the changes needed to go from v2.1.0 to v2.2.0 should be smaller than backporting from v2.5.2. This commit should support nRF Connect SDK v2.1.1.

    On general basis, I would recommend you to use the application with the latest SDK version. If you are planning to integrate the sample with your existing application running on v2.2.0, I would still recommend you to port your full application to the latest SDK version, to get access to fixes and new features.

    Best regards,
    Jørgen

Children
No Data
Related