Im trying to use lvgl with ST7789v display and nRF52832, in nRF Connect.
My .overlay:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <zephyr/dt-bindings/display/panel.h>
/ {
chosen {
zephyr,display = &st7789v;
};
};
&pinctrl {
spi0_default: spi0_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
<NRF_PSEL(SPIM_MOSI, 0, 26)>,
<NRF_PSEL(SPIM_MISO, 0, 29)>;
};
};
spi0_sleep: spi0_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
<NRF_PSEL(SPIM_MOSI, 0, 26)>,
My prj.conf:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Enable logging and RTT DEBUG output
CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD=1
CONFIG_LOG_PRINTK=y
CONFIG_LOG_MODE_DEFERRED=n
# LVGL
CONFIG_LV_Z_MEM_POOL_SIZE=16384
CONFIG_LV_Z_SHELL=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_DISPLAY=y
CONFIG_DISPLAY_LOG_LEVEL_ERR=y
CONFIG_SHELL=y
CONFIG_LVGL=y
CONFIG_LV_MEM_CUSTOM=y
When I enable LVGL and build, i got the error:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
In file included from /home/santos/ncs/v2.9.0/zephyr/include/zephyr/arch/arm/arch.h:20,
from /home/santos/ncs/v2.9.0/zephyr/include/zephyr/arch/cpu.h:19,
from /home/santos/ncs/v2.9.0/zephyr/include/zephyr/kernel_includes.h:36,
from /home/santos/ncs/v2.9.0/zephyr/include/zephyr/kernel.h:17,
from /home/santos/ncs/v2.9.0/zephyr/modules/lvgl/lvgl.c:8:
/home/santos/ncs/v2.9.0/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/santos/ncs/v2.9.0/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/santos/ncs/v2.9.0/zephyr/modules/lvgl/lvgl.c:35:24: note: in expansion of macro 'DT_PROP'
35 | #define DISPLAY_WIDTH DT_PROP(DISPLAY_NODE, width)
| ^~~~~~~
/home/santos/ncs/v2.9.0/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/santos/ncs/v2.9.0/zephyr/modules/lvgl/lvgl.c:29:22: note: in expansion of macro 'DT_CHOSEN'
29 | #define DISPLAY_NODE DT_CHOSEN(zephyr_display)
| ^~~~~~~~~
/home/santos/ncs/v2.9.0/zephyr/modules/lvgl/lvgl.c:35:32: note: in expansion of macro 'DISPLAY_NODE'
Could you please help me resolve this issue?