I am trying to build basic LVGL code and it is giving me the following error. I did not customize the code.
https://github.com/nrfconnect/sdk-zephyr/tree/v3.4.99-ncs1-rc2/samples/subsys/display/lvgl/
Error:
main.c.obj -c ../src/main.c
In file included from C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\toolchain\gcc.h:92,
from C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\toolchain.h:50,
from C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\sys\time_units.h:10,
from C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\sys\util.h:615,
from C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\devicetree.h:25,
from C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\device.h:12,
from d:\nrf\test_proj\test\lvgl\src\main.c:7:
../src/main.c: In function 'main':
C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\device.h:85:41: error: '__device_dts_ord_DT_CHOSEN_zephyr_display_ORD' undeclared (first use in this function)
85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\toolchain\common.h:132:26: note: in definition of macro '_DO_CONCAT'
132 | #define _DO_CONCAT(x, y) x ## y
| ^
C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\device.h:85:33: note: in expansion of macro '_CONCAT'
85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~
C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\device.h:211:37: note: in expansion of macro 'DEVICE_NAME_GET'
211 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\device.h:228:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
228 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
d:\nrf\test_proj\test\lvgl\src\main.c:46:23: note: in expansion of macro 'DEVICE_DT_GET'
46 | display_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_display));
| ^~~~~~~~~~~~~
C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\device.h:85:41: note: each undeclared identifier is reported only once for each function it appears in
85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\toolchain\common.h:132:26: note: in definition of macro '_DO_CONCAT'
132 | #define _DO_CONCAT(x, y) x ## y
| ^
C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\device.h:85:33: note: in expansion of macro '_CONCAT'
85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~
C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\device.h:211:37: note: in expansion of macro 'DEVICE_NAME_GET'
211 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
C:\ncs\v2.5.0-rc2\zephyr\include\zephyr\device.h:228:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
228 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
d:\nrf\test_proj\test\lvgl\src\main.c:46:23: note: in expansion of macro 'DEVICE_DT_GET'
46 | display_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_display));
| ^~~~~~~~~~~~~
[48/357] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj
[49/357] Building C object zephyr/CMakeFiles/zephyr.dir/lib/posix/getopt/getopt.c.obj
[50/357] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
[51/357] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj
[52/357] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'd:\nrf\test_proj\test\lvgl\build'