Esp-idf : compile error in lv_draw_sw_blend.c

I am trying to setup a super simple esp-idf project with lvgl, the project was created with idf.py create-project and both lvgl and lvgl_esp32_drivers are added with git add submodules.

However I am getting the following errors:

any idea what went wrong?
here is my project structure (only printed first 3 levels)

├── CMakeLists.txt
├── build
│   ├── CMakeCache.txt
│   ├── CMakeFiles
│   ├── app-flash_args
│   ├── bootloader
│   ├── bootloader-flash_args
│   ├── bootloader-prefix
│   ├── build.ninja
│   ├── cmake_install.cmake
│   ├── compile_commands.json
│   ├── config
│   ├── config.env
│   ├── esp-idf
│   ├── flash_app_args
│   ├── flash_args
│   ├── flash_args.in
│   ├── flash_bootloader_args
│   ├── flash_project_args
│   ├── flasher_args.json
│   ├── kconfigs.in
│   ├── kconfigs_projbuild.in
│   ├── ldgen_libraries
│   ├── ldgen_libraries.in
│   ├── partition-table-flash_args
│   ├── partition_table
│   ├── project_description.json
│   ├── project_elf_src_esp32.c
│   └── x509_crt_bundle.S
├── components
│   ├── lv_conf.h
│   ├── lvgl
│   └── lvgl_esp32_drivers
├── dependencies.lock
├── main
│   ├── CMakeLists.txt
│   └── hi_lvgl.c
├── sdkconfig
└── sdkconfig.old

what version of lvgl and esp-idf?

 ~/p/e/hi_lvgl ❯❯❯ idf.py --version
ESP-IDF v5.1-dev-437-g5c1044d84d

lvgl is added using

git submodule add https://github.com/lvgl/lvgl.git components/lvgl

I found I had to run menuconfig to enable ‘custom lv_conf.h’ obviously before I did this the lv_conf.h I created wasn’t used. after that the above error went away but I am getting new errors:

seems like c modules (disp_spi.c, esp_lcd_backlight.c, etc) in lvgl_esp32_drivers component are not able to find headers in esp-idf’s driver include directory. where should I add the include path ? (I am very new to CMake)

in last version of esp-idf no need to use lvgl_esp32_drivers. It already have esp_lcd module. Try to use it.

without the lvgl_esp32_drivers component, how would you configure SPI pins and other hardware related things? I tried removing the component and run menuconfig, the component config submenu is also gone.

I figured this out, it’s my esp-idf version, I was on 5.1dev. after switch to 4.4 everything compiles.

thanks for the help!

Already have: