Hello dear Nordic team,
I'm quite experienced in developing under SDK V15 and V17 but absolutely novice for nRF Connect SDK so my question may seem ridiculos. Hope someone will help me.
Environment
OS: Windows 10
Toolchain: All recommended tools installed through the Toolchain Manager v1.2.1 including VS Code 1.73.1
SDK: nRF Connect SDK V2.1.2
Project
Modified demo project from SDK: ncs\v2.1.2\nrf\samples\bluetooth\peripheral_uart
Hardware
nRF52 DK(PCA10040)
Purpose
Get familiarized with development environment, Zephyr OS and coding concepts. Originally we are planning the new project based on nRF5340, but at meantime I'm using nRF52 DK for test project. Main goal is to have generic BLE connectivity and working UART, GPIOs, ADC and connect WS2812 LEDs via SPIM. Yes I know about demo project for controlling WS2812, but I want to put my hands on all settings I can in order to get understading about how it works.
Also I found 2 similar cases which didn't help me:
Zephyr WS2812 Driver undefined reference to `__device_dts_ord_68'
Implementing WS2812 Driver NCS (undefined reference to `__device_dts_ord_61')
Problem
Attempting to add SPI to overlay file leads to compiler error "undefined reference to `__device_dts_ord_88'". Here is what I have added to main.c file:
//Define SPI node #define SPI_NODE DT_NODELABEL(spi1) //test static const struct device *my_spi = DEVICE_DT_GET(SPI_NODE); //test //Following snippet temporary added to uart_init() function: if (!device_is_ready(my_spi)) return -ENODEV;
/* * Copyright (c) 2022 Nordic Semiconductor ASA * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ / { chosen { nordic,nus-uart = &uart0; }; }; spi_1: &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; miso-pin = <0xFF>; mosi-pin = <25>; sck-pin = <0xFF>; label = "WS_SPI"; };
/* * Copyright (c) 2022 Nordic Semiconductor ASA * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ / { chosen { nordic,nus-uart = &uart0; }; }; / { chosen { nordic,spi = &spi1; }; };