Error building with Custom board

Hello 

I get the following error code, when I try to build the button sample with my custom board. I try to build and flash via RTT Hello World with my  custom board and it works. However the button sample doesnt work. I think there is something wrong with my devicetree of the customboard. But Hello World works with it.

You have an idea?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FAILED: CMakeFiles/app.dir/src/main.c.obj
C:\Users\dkahya\nordic\ncs\toolchains\31f4403e35\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF52832_XXAA -DUSE_PARTITION_MANAGER=0 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Users/dkahya/nordic/ncs/v2.4.0/zephyr/include -Izephyr/include/generated -IC:/Users/dkahya/nordic/ncs/v2.4.0/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/Users/dkahya/nordic/ncs/v2.4.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/Users/dkahya/nordic/ncs/v2.4.0/nrf/include -IC:/Users/dkahya/nordic/ncs/v2.4.0/nrf/tests/include -IC:/Users/dkahya/nordic/ncs/v2.4.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/dkahya/nordic/ncs/v2.4.0/modules/hal/nordic/nrfx -IC:/Users/dkahya/nordic/ncs/v2.4.0/modules/hal/nordic/nrfx/drivers/include -IC:/Users/dkahya/nordic/ncs/v2.4.0/modules/hal/nordic/nrfx/mdk -IC:/Users/dkahya/nordic/ncs/v2.4.0/zephyr/modules/hal_nordic/nrfx/. -IC:/Users/dkahya/nordic/ncs/v2.4.0/modules/debug/segger/SEGGER -IC:/Users/dkahya/nordic/ncs/v2.4.0/modules/debug/segger/Config -IC:/Users/dkahya/nordic/ncs/v2.4.0/zephyr/modules/segger/. -isystem C:/Users/dkahya/nordic/ncs/v2.4.0/zephyr/lib/libc/minimal/include -isystem c:/users/dkahya/nordic/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/users/dkahya/nordic/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -fno-strict-aliasing -Os -imacros C:/Users/dkahya/nordic/myapps/I_Ansteuern_Leds/build_1/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs --sysroot=C:/Users/dkahya/nordic/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/Users/dkahya/nordic/ncs/v2.4.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/Users/dkahya/nordic/myapps/I_Ansteuern_Leds=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/dkahya/nordic/ncs/v2.4.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/dkahya/nordic/ncs/v2.4.0=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 C:\Users\dkahya\nordic\ncs\v2.4.0\zephyr\include\zephyr\toolchain\gcc.h:92,
from C:\Users\dkahya\nordic\ncs\v2.4.0\zephyr\include\zephyr\toolchain.h:50,
from C:\Users\dkahya\nordic\ncs\v2.4.0\zephyr\include\zephyr\kernel_includes.h:19,
from C:\Users\dkahya\nordic\ncs\v2.4.0\zephyr\include\zephyr\kernel.h:17,
from c:\Users\dkahya\nordic\myapps\I_Ansteuern_Leds\src\main.c:7:
C:\Users\dkahya\nordic\ncs\v2.4.0\zephyr\include\zephyr\device.h:84:41: error: '__device_dts_ord_DT_N_S_leds_S_led_1_P_gpios_IDX_0_PH_ORD' undeclared here (not in a function)
84 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
C:\Users\dkahya\nordic\ncs\v2.4.0\zephyr\include\zephyr\toolchain\common.h:132:26: note: in definition of macro '_DO_CONCAT'
132 | #define _DO_CONCAT(x, y) x ## y
| ^
C:\Users\dkahya\nordic\ncs\v2.4.0\zephyr\include\zephyr\device.h:84:33: note: in expansion of macro '_CONCAT'
84 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~
C:\Users\dkahya\nordic\ncs\v2.4.0\zephyr\include\zephyr\device.h:210:37: note: in expansion of macro 'DEVICE_NAME_GET'
210 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
C:\Users\dkahya\nordic\ncs\v2.4.0\zephyr\include\zephyr\device.h:227:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
227 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I debug it with RTT.

Best regards