adding lvgl to thing53 breaks building

im trying to develop a prototype that uses a thingy53 and lvgl to draw a screen on a solomon ssd1306 attached via i2c (kwiic) but am having issues with getting it to build

im using v2.91 SDK and toolchain  installed via nRF Connect Extension


after various failed attempts

i created a blank new application

with a board target thingy53/nrf5340/cpuapp which builds with only warnings


if i add proj.conf with  CONFIG_LVGL=y  the build breaks

[291/367] Building C object modules/lvgl/CMakeFiles/modules__lvgl.dir/lvgl.c.obj
FAILED: modules/lvgl/CMakeFiles/modules__lvgl.dir/lvgl.c.obj 
ccache /home/fireblade/ncs/toolchains/b77d8c1312/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0 -DLV_CONF_INCLUDE_SIMPLE=1 -DLV_CONF_PATH=/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/include/lv_conf.h -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/fireblade/test/simple/build/simple/zephyr/include/generated/zephyr -I/home/fireblade/ncs/v2.9.1/zephyr/include -I/home/fireblade/test/simple/build/simple/zephyr/include/generated -I/home/fireblade/ncs/v2.9.1/zephyr/soc/nordic -I/home/fireblade/ncs/v2.9.1/zephyr/soc/nordic/nrf53/. -I/home/fireblade/ncs/v2.9.1/zephyr/soc/nordic/common/. -I/home/fireblade/ncs/v2.9.1/zephyr/subsys/usb/device -I/home/fireblade/ncs/v2.9.1/zephyr/drivers/usb/common/nrf_usbd_common/. -I/home/fireblade/ncs/v2.9.1/nrf/include -I/home/fireblade/ncs/v2.9.1/nrf/tests/include -I/home/fireblade/ncs/v2.9.1/modules/hal/cmsis/CMSIS/Core/Include -I/home/fireblade/ncs/v2.9.1/zephyr/modules/cmsis/. -I/home/fireblade/ncs/v2.9.1/modules/hal/nordic/nrfx -I/home/fireblade/ncs/v2.9.1/modules/hal/nordic/nrfx/drivers/include -I/home/fireblade/ncs/v2.9.1/modules/hal/nordic/nrfx/mdk -I/home/fireblade/ncs/v2.9.1/zephyr/modules/hal_nordic/nrfx/. -I/home/fireblade/ncs/v2.9.1/modules/lib/gui/lvgl/src -I/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/include -isystem /home/fireblade/ncs/v2.9.1/zephyr/lib/libc/common/include -isystem /home/fireblade/ncs/v2.9.1/nrfxlib/crypto/nrf_cc312_platform/include -Os -DNDEBUG -fno-strict-aliasing -Os -imacros /home/fireblade/test/simple/build/simple/zephyr/include/generated/zephyr/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=/home/fireblade/ncs/toolchains/b77d8c1312/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/fireblade/test/simple=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/fireblade/ncs/v2.9.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/fireblade/ncs/v2.9.1=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=picolibc.specs -std=c99 -MD -MT modules/lvgl/CMakeFiles/modules__lvgl.dir/lvgl.c.obj -MF modules/lvgl/CMakeFiles/modules__lvgl.dir/lvgl.c.obj.d -o modules/lvgl/CMakeFiles/modules__lvgl.dir/lvgl.c.obj -c /home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c
In file included from /home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/arch/arm/arch.h:20,
                 from /home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/arch/cpu.h:19,
                 from /home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/kernel_includes.h:36,
                 from /home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/kernel.h:17,
                 from /home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:8:
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/devicetree.h:2729:32: error: 'DT_CHOSEN_zephyr_display_P_width' undeclared here (not in a function); did you mean 'DT_CHOSEN_zephyr_sram_EXISTS'?
 2729 | #define DT_CHOSEN(prop) DT_CAT(DT_CHOSEN_, prop)
      |                                ^~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/devicetree.h:4879:29: note: in definition of macro 'DT_CAT3'
 4879 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3
      |                             ^~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:34:24: note: in expansion of macro 'DT_PROP'
   34 | #define DISPLAY_WIDTH  DT_PROP(DISPLAY_NODE, width)
      |                        ^~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/devicetree.h:2729:25: note: in expansion of macro 'DT_CAT'
 2729 | #define DT_CHOSEN(prop) DT_CAT(DT_CHOSEN_, prop)
      |                         ^~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:28:22: note: in expansion of macro 'DT_CHOSEN'
   28 | #define DISPLAY_NODE DT_CHOSEN(zephyr_display)
      |                      ^~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:34:32: note: in expansion of macro 'DISPLAY_NODE'
   34 | #define DISPLAY_WIDTH  DT_PROP(DISPLAY_NODE, width)
      |                                ^~~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:39:35: note: in expansion of macro 'DISPLAY_WIDTH'
   39 |          ((CONFIG_LV_Z_VDB_SIZE * DISPLAY_WIDTH * DISPLAY_HEIGHT) / 100) / 8)
      |                                   ^~~~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:47:21: note: in expansion of macro 'BUFFER_SIZE'
   47 | static uint8_t buf0[BUFFER_SIZE]
      |                     ^~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/devicetree.h:2729:32: error: 'DT_CHOSEN_zephyr_display_P_height' undeclared here (not in a function)
 2729 | #define DT_CHOSEN(prop) DT_CAT(DT_CHOSEN_, prop)
      |                                ^~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/devicetree.h:4879:29: note: in definition of macro 'DT_CAT3'
 4879 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3
      |                             ^~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:35:24: note: in expansion of macro 'DT_PROP'
   35 | #define DISPLAY_HEIGHT DT_PROP(DISPLAY_NODE, height)
      |                        ^~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/devicetree.h:2729:25: note: in expansion of macro 'DT_CAT'
 2729 | #define DT_CHOSEN(prop) DT_CAT(DT_CHOSEN_, prop)
      |                         ^~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:28:22: note: in expansion of macro 'DT_CHOSEN'
   28 | #define DISPLAY_NODE DT_CHOSEN(zephyr_display)
      |                      ^~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:35:32: note: in expansion of macro 'DISPLAY_NODE'
   35 | #define DISPLAY_HEIGHT DT_PROP(DISPLAY_NODE, height)
      |                                ^~~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:39:51: note: in expansion of macro 'DISPLAY_HEIGHT'
   39 |          ((CONFIG_LV_Z_VDB_SIZE * DISPLAY_WIDTH * DISPLAY_HEIGHT) / 100) / 8)
      |                                                   ^~~~~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:47:21: note: in expansion of macro 'BUFFER_SIZE'
   47 | static uint8_t buf0[BUFFER_SIZE]
      |                     ^~~~~~~~~~~
In file included from /home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/toolchain/gcc.h:98,
                 from /home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/toolchain.h:50,
                 from /home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/sys/util.h:18,
                 from /home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/init.h:13,
                 from /home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:7:
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c: In function 'lvgl_init':
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/device.h:92:41: error: '__device_dts_ord_DT_CHOSEN_zephyr_display_ORD' undeclared (first use in this function)
   92 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
  137 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/device.h:92:33: note: in expansion of macro '_CONCAT'
   92 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                 ^~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/device.h:229:37: note: in expansion of macro 'DEVICE_NAME_GET'
  229 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/device.h:246:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
  246 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:199:44: note: in expansion of macro 'DEVICE_DT_GET'
  199 |         const struct device *display_dev = DEVICE_DT_GET(DISPLAY_NODE);
      |                                            ^~~~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/device.h:92:41: note: each undeclared identifier is reported only once for each function it appears in
   92 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
  137 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/device.h:92:33: note: in expansion of macro '_CONCAT'
   92 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                 ^~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/device.h:229:37: note: in expansion of macro 'DEVICE_NAME_GET'
  229 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/include/zephyr/device.h:246:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
  246 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:199:44: note: in expansion of macro 'DEVICE_DT_GET'
  199 |         const struct device *display_dev = DEVICE_DT_GET(DISPLAY_NODE);
      |                                            ^~~~~~~~~~~~~
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c: At top level:
/home/fireblade/ncs/v2.9.1/zephyr/modules/lvgl/lvgl.c:47:16: warning: 'buf0' defined but not used [-Wunused-variable]
   47 | static uint8_t buf0[BUFFER_SIZE]
      |                ^~~~
[293/367] Building C object modules/lvgl/CMakeFiles/modules__lvgl.dir/home/fireblade/ncs/v2.9.1/modules/lib/gui/lvgl/src/misc/lv_ll.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/fireblade/ncs/toolchains/b77d8c1312/usr/local/bin/cmake --build /home/fireblade/test/simple/build/simple



Related