Need to add a subnode in SPI for new nfc module ?

Hi ,

I'm trying to generate an overlay file with the subnode listed below, but it keeps throwing compilation errors. Can anyone give assistance?

While reading the node with this macro i get the 

#define ST25R95_NODE DT_NODELABEL(&spi0)

i am follow the spi example and customise the overlay file with this .

dozee_spi: &spi0 {
compatible = "nordic,nrf-spi";
status = "okay";
pinctrl-0 = <&spi0_default_alt>;
pinctrl-1 = <&spi0_sleep_alt>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;

st25r95@0 {
label="ST25R95";
compatible = "st,st25r95";
irq-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
reg = <0x0 >;
spi-max-frequency = <4000000>;
};
};

What am I doing wrong?

Thank you.

Kind regards

error:
FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /home/mysticrnd/ncs/toolchains/v2.1.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr -I/home/mysticrnd/ncs/v2.1.2/zephyr/include -Izephyr/include/generated -I/home/mysticrnd/ncs/v2.1.2/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/mysticrnd/ncs/v2.1.2/zephyr/soc/arm/nordic_nrf/common/. -I/home/mysticrnd/ncs/v2.1.2/nrf/include -I/home/mysticrnd/ncs/v2.1.2/modules/hal/cmsis/CMSIS/Core/Include -I/home/mysticrnd/ncs/v2.1.2/modules/hal/nordic/nrfx -I/home/mysticrnd/ncs/v2.1.2/modules/hal/nordic/nrfx/drivers/include -I/home/mysticrnd/ncs/v2.1.2/modules/hal/nordic/nrfx/mdk -I/home/mysticrnd/ncs/v2.1.2/zephyr/modules/hal_nordic/nrfx/. -I/home/mysticrnd/ncs/v2.1.2/modules/debug/segger/SEGGER -I/home/mysticrnd/ncs/v2.1.2/modules/debug/segger/Config -I/home/mysticrnd/ncs/v2.1.2/zephyr/modules/segger/. -isystem /home/mysticrnd/ncs/v2.1.2/zephyr/lib/libc/minimal/include -isystem /home/mysticrnd/ncs/toolchains/v2.1.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem /home/mysticrnd/ncs/toolchains/v2.1.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -isystem /home/mysticrnd/ncs/v2.1.2/nrfxlib/crypto/nrf_cc310_platform/include -Og -imacros /home/mysticrnd/Dozee_V2/spi_bitbanga/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/home/mysticrnd/ncs/toolchains/v2.1.2/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/mysticrnd/Dozee_V2/spi_bitbanga=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/mysticrnd/ncs/v2.1.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/mysticrnd/ncs/v2.1.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c
In file included from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/arch/arm/aarch32/arch.h:20,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/arch/cpu.h:19,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/kernel_includes.h:33,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/kernel.h:17,
from /home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:165:
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:36: error: pasting "DT_N_NODELABEL_" and "&" does not give a valid preprocessing token
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:3068:24: note: in definition of macro 'DT_CAT'
3068 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:182:53: note: in expansion of macro 'ST25R95_NODE'
182 | static const struct device *spi_dev = DEVICE_DT_GET(ST25R95_NODE);
| ^~~~~~~~~~~~
In file included from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/toolchain/gcc.h:88,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/toolchain.h:50,
from /home/mysticrnd/ncs/v2.1.2/zephyr/lib/libc/minimal/include/string.h:13,
from /home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:161:
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:96:39: error: '__device_dts_ord_DT_N_NODELABEL_' undeclared here (not in a function)
96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
| ^~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:276:37: note: in expansion of macro 'DEVICE_NAME_GET'
276 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:296:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
296 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:182:39: note: in expansion of macro 'DEVICE_DT_GET'
182 | static const struct device *spi_dev = DEVICE_DT_GET(ST25R95_NODE);
| ^~~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:36: error: 'spi0_ORD' undeclared here (not in a function)
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:276:37: note: in expansion of macro 'DEVICE_NAME_GET'
276 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree/ordinals.h:25:29: note: in expansion of macro 'DT_CAT'
25 | #define DT_DEP_ORD(node_id) DT_CAT(node_id, _ORD)
| ^~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:106:57: note: in expansion of macro 'DT_DEP_ORD'
106 | #define Z_DEVICE_DT_DEV_NAME(node_id) _CONCAT(dts_ord_, DT_DEP_ORD(node_id))
| ^~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:276:53: note: in expansion of macro 'Z_DEVICE_DT_DEV_NAME'
276 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:296:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
296 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:182:39: note: in expansion of macro 'DEVICE_DT_GET'
182 | static const struct device *spi_dev = DEVICE_DT_GET(ST25R95_NODE);
| ^~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:182:53: note: in expansion of macro 'ST25R95_NODE'
182 | static const struct device *spi_dev = DEVICE_DT_GET(ST25R95_NODE);
| ^~~~~~~~~~~~
In file included from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/arch/arm/aarch32/arch.h:20,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/arch/cpu.h:19,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/kernel_includes.h:33,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/kernel.h:17,
from /home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:165:
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:36: error: pasting "DT_N_NODELABEL_" and "&" does not give a valid preprocessing token
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:3068:24: note: in definition of macro 'DT_CAT'
3068 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:185:19: note: in expansion of macro 'ST25R95_NODE'
185 | GPIO_DT_SPEC_GET(ST25R95_NODE, irq_gpios);
| ^~~~~~~~~~~~
In file included from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/toolchain/gcc.h:88,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/toolchain.h:50,
from /home/mysticrnd/ncs/v2.1.2/zephyr/lib/libc/minimal/include/string.h:13,
from /home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:161:
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:36: error: 'spi0_P_irq_gpios_IDX_0_PH_ORD' undeclared here (not in a function)
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:276:37: note: in expansion of macro 'DEVICE_NAME_GET'
276 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree/ordinals.h:25:29: note: in expansion of macro 'DT_CAT'
25 | #define DT_DEP_ORD(node_id) DT_CAT(node_id, _ORD)
| ^~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:106:57: note: in expansion of macro 'DT_DEP_ORD'
106 | #define Z_DEVICE_DT_DEV_NAME(node_id) _CONCAT(dts_ord_, DT_DEP_ORD(node_id))
| ^~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:276:53: note: in expansion of macro 'Z_DEVICE_DT_DEV_NAME'
276 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:296:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
296 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:338:11: note: in expansion of macro 'DEVICE_DT_GET'
338 | .port = DEVICE_DT_GET(DT_GPIO_CTLR_BY_IDX(node_id, prop, idx)),\
| ^~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:1247:2: note: in expansion of macro 'DT_CAT6'
1247 | DT_CAT6(node_id, _P_, prop, _IDX_, idx, _PH)
| ^~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree/gpio.h:54:2: note: in expansion of macro 'DT_PHANDLE_BY_IDX'
54 | DT_PHANDLE_BY_IDX(node_id, gpio_pha, idx)
| ^~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:338:25: note: in expansion of macro 'DT_GPIO_CTLR_BY_IDX'
338 | .port = DEVICE_DT_GET(DT_GPIO_CTLR_BY_IDX(node_id, prop, idx)),\
| ^~~~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:374:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
374 | GPIO_DT_SPEC_GET_BY_IDX(node_id, prop, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:185:2: note: in expansion of macro 'GPIO_DT_SPEC_GET'
185 | GPIO_DT_SPEC_GET(ST25R95_NODE, irq_gpios);
| ^~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:185:19: note: in expansion of macro 'ST25R95_NODE'
185 | GPIO_DT_SPEC_GET(ST25R95_NODE, irq_gpios);
| ^~~~~~~~~~~~
In file included from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/arch/arm/aarch32/arch.h:20,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/arch/cpu.h:19,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/kernel_includes.h:33,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/kernel.h:17,
from /home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:165:
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:36: error: 'DT_N_NODELABEL_' undeclared here (not in a function); did you mean 'DT_N_NODELABEL_wdt'?
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:3068:24: note: in definition of macro 'DT_CAT'
3068 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:1050:2: note: in expansion of macro 'DT_PROP'
1050 | DT_PROP(node_id, pha##_IDX_##idx##_VAL_##cell)
| ^~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree/gpio.h:164:2: note: in expansion of macro 'DT_PHA_BY_IDX'
164 | DT_PHA_BY_IDX(node_id, gpio_pha, idx, pin)
| ^~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:339:10: note: in expansion of macro 'DT_GPIO_PIN_BY_IDX'
339 | .pin = DT_GPIO_PIN_BY_IDX(node_id, prop, idx), \
| ^~~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:374:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
374 | GPIO_DT_SPEC_GET_BY_IDX(node_id, prop, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:185:2: note: in expansion of macro 'GPIO_DT_SPEC_GET'
185 | GPIO_DT_SPEC_GET(ST25R95_NODE, irq_gpios);
| ^~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:185:19: note: in expansion of macro 'ST25R95_NODE'
185 | GPIO_DT_SPEC_GET(ST25R95_NODE, irq_gpios);
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:36: error: 'spi0_P_irq_gpios_IDX_0_VAL_pin' undeclared here (not in a function)
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:3068:24: note: in definition of macro 'DT_CAT'
3068 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:1050:2: note: in expansion of macro 'DT_PROP'
1050 | DT_PROP(node_id, pha##_IDX_##idx##_VAL_##cell)
| ^~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree/gpio.h:164:2: note: in expansion of macro 'DT_PHA_BY_IDX'
164 | DT_PHA_BY_IDX(node_id, gpio_pha, idx, pin)
| ^~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:339:10: note: in expansion of macro 'DT_GPIO_PIN_BY_IDX'
339 | .pin = DT_GPIO_PIN_BY_IDX(node_id, prop, idx), \
| ^~~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:374:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
374 | GPIO_DT_SPEC_GET_BY_IDX(node_id, prop, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:185:2: note: in expansion of macro 'GPIO_DT_SPEC_GET'
185 | GPIO_DT_SPEC_GET(ST25R95_NODE, irq_gpios);
| ^~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:185:19: note: in expansion of macro 'ST25R95_NODE'
185 | GPIO_DT_SPEC_GET(ST25R95_NODE, irq_gpios);
| ^~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:36: error: pasting "DT_N_NODELABEL_" and "&" does not give a valid preprocessing token
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:3068:24: note: in definition of macro 'DT_CAT'
3068 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:191:27: note: in expansion of macro 'ST25R95_NODE'
191 | .gpio = GPIO_DT_SPEC_GET(ST25R95_NODE, cs_gpios),
| ^~~~~~~~~~~~
In file included from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/toolchain/gcc.h:88,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/toolchain.h:50,
from /home/mysticrnd/ncs/v2.1.2/zephyr/lib/libc/minimal/include/string.h:13,
from /home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:161:
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:36: error: 'spi0_P_cs_gpios_IDX_0_PH_ORD' undeclared here (not in a function)
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:276:37: note: in expansion of macro 'DEVICE_NAME_GET'
276 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree/ordinals.h:25:29: note: in expansion of macro 'DT_CAT'
25 | #define DT_DEP_ORD(node_id) DT_CAT(node_id, _ORD)
| ^~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:106:57: note: in expansion of macro 'DT_DEP_ORD'
106 | #define Z_DEVICE_DT_DEV_NAME(node_id) _CONCAT(dts_ord_, DT_DEP_ORD(node_id))
| ^~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:276:53: note: in expansion of macro 'Z_DEVICE_DT_DEV_NAME'
276 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/device.h:296:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
296 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:338:11: note: in expansion of macro 'DEVICE_DT_GET'
338 | .port = DEVICE_DT_GET(DT_GPIO_CTLR_BY_IDX(node_id, prop, idx)),\
| ^~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:1247:2: note: in expansion of macro 'DT_CAT6'
1247 | DT_CAT6(node_id, _P_, prop, _IDX_, idx, _PH)
| ^~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree/gpio.h:54:2: note: in expansion of macro 'DT_PHANDLE_BY_IDX'
54 | DT_PHANDLE_BY_IDX(node_id, gpio_pha, idx)
| ^~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:338:25: note: in expansion of macro 'DT_GPIO_CTLR_BY_IDX'
338 | .port = DEVICE_DT_GET(DT_GPIO_CTLR_BY_IDX(node_id, prop, idx)),\
| ^~~~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:374:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
374 | GPIO_DT_SPEC_GET_BY_IDX(node_id, prop, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:191:10: note: in expansion of macro 'GPIO_DT_SPEC_GET'
191 | .gpio = GPIO_DT_SPEC_GET(ST25R95_NODE, cs_gpios),
| ^~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:191:27: note: in expansion of macro 'ST25R95_NODE'
191 | .gpio = GPIO_DT_SPEC_GET(ST25R95_NODE, cs_gpios),
| ^~~~~~~~~~~~
In file included from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/arch/arm/aarch32/arch.h:20,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/arch/cpu.h:19,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/kernel_includes.h:33,
from /home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/kernel.h:17,
from /home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:165:
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:36: error: 'spi0_P_cs_gpios_IDX_0_VAL_pin' undeclared here (not in a function)
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:3068:24: note: in definition of macro 'DT_CAT'
3068 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:1050:2: note: in expansion of macro 'DT_PROP'
1050 | DT_PROP(node_id, pha##_IDX_##idx##_VAL_##cell)
| ^~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree/gpio.h:164:2: note: in expansion of macro 'DT_PHA_BY_IDX'
164 | DT_PHA_BY_IDX(node_id, gpio_pha, idx, pin)
| ^~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:339:10: note: in expansion of macro 'DT_GPIO_PIN_BY_IDX'
339 | .pin = DT_GPIO_PIN_BY_IDX(node_id, prop, idx), \
| ^~~~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/drivers/gpio.h:374:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
374 | GPIO_DT_SPEC_GET_BY_IDX(node_id, prop, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:191:10: note: in expansion of macro 'GPIO_DT_SPEC_GET'
191 | .gpio = GPIO_DT_SPEC_GET(ST25R95_NODE, cs_gpios),
| ^~~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:191:27: note: in expansion of macro 'ST25R95_NODE'
191 | .gpio = GPIO_DT_SPEC_GET(ST25R95_NODE, cs_gpios),
| ^~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:36: error: pasting "DT_N_NODELABEL_" and "&" does not give a valid preprocessing token
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:3068:24: note: in definition of macro 'DT_CAT'
3068 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:213:23: note: in expansion of macro 'ST25R95_NODE'
213 | .slave = DT_REG_ADDR(ST25R95_NODE),
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:36: error: 'spi0_REG_IDX_0_VAL_ADDRESS' undeclared here (not in a function)
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:3068:24: note: in definition of macro 'DT_CAT'
3068 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:1684:30: note: in expansion of macro 'DT_REG_ADDR_BY_IDX'
1684 | #define DT_REG_ADDR(node_id) DT_REG_ADDR_BY_IDX(node_id, 0)
| ^~~~~~~~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:213:11: note: in expansion of macro 'DT_REG_ADDR'
213 | .slave = DT_REG_ADDR(ST25R95_NODE),
| ^~~~~~~~~~~
/home/mysticrnd/ncs/v2.1.2/zephyr/include/zephyr/devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:180:22: note: in expansion of macro 'DT_NODELABEL'
180 | #define ST25R95_NODE DT_NODELABEL(&spi0)
| ^~~~~~~~~~~~
/home/mysticrnd/Dozee_V2/spi_bitbanga/src/main.c:213:23: note: in expansion of macro 'ST25R95_NODE'
213 | .slave = DT_REG_ADDR(ST25R95_NODE),
| ^~~~~~~~~~~~
[168/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj
[169/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/condvar.c.obj
[170/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/work.c.obj
[171/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/xip.c.obj
[172/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/system_work_q.c.obj
[173/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
[174/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj
[175/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/poll.c.obj
[176/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mutex.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/mysticrnd/ncs/toolchains/v2.1.2/usr/local/bin/cmake --build /home/mysticrnd/Dozee_V2/spi_bitbanga/build

* The terminal process terminated with exit code: 1.
Parents Reply Children
Related