Hello CircuitDojo Community,
I am starting to work with the WS2812 tri-color LED module with built-in controlling IC. I’m having trouble at build time with a device tree error. I’ve started work with the RPi-Pico board, which has a WS2812 as an off-chip peripheral. The DTS build time error has to do with an ordinal device not being defined anywhere, an error which lies outside of any C code I could debug in the traditional C ways. But I think this error may be due to a Kconfig symbol which I cannot enable.
The overlay file which I created is:
#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/led/led.h>
/* https://developer.toradex.com/linux-bsp/how-to/device-tree/device-tree-customization/ */
/ {
/delete-node/ led_0;
};
/ {
led_strip: ws2812 {
compatible = "worldsemi,ws2812-gpio";
chain-length = <1>; /* arbitrary . . . Ted reducing from 16 to 1 for DEV-18288 board. */
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
/*
* Arduino D11 / P0.25, which was chosen to match the pin
* used in nrf52dk_nrf52832.overlay.
* 2022-08-05 - P0.25 also used for data in line of WS2812 on Sparkfun DEV-18288 board:
*/
in-gpios = <&gpio0 25 0>;
label = "WS2812";
};
aliases {
led-strip = &led_strip;
};
};
The error I receive early in build is: .../workspace-for-rpi/rpi-pico-zephyr-exploration/src/main.c:156: undefined reference to `__device_dts_ord_6'
The Kconfig symbol which I cannot enable is WS2812_STRIP_GPIO
. This symbol represents one of two options, SPI and GPIO, which Zephyr 3.0.0 documentation says are available to drive this peripheral display device.
Does anyone here have experience to configure WS2812 in a Zephyr based app?
What does it mean for a symbol when in the menuconfig utility it is shown in search results as <choice SYMBOL_NAME> as opposed to SYMBOL_NAME=n?
The Kconfig dependency symbols for WS2812_STRIP_GPIO both seem to be met, and still I cannot assign ‘y’ to this symbol.
Appreciate any insight to these questions!