Description
LVGL working perfectly with ILI9488, until I enable LVGL Touch controller and select FT6X06 in KConfig.
It then fails to compile, as the path to the ft6x36.h is not found.
I get the following error message - see below in the what do you experience section.
What MCU/Processor/Board and compiler are you using?
VSCode 1.53.0-insider, ESP32-WROOM-32E Devkit 4.0
Espressif plugin 0.5.1 (0.6.0 too many bugs not working)
ESP-IDF release/4.2
Win 10
KConfig used.
What do you experience?
Error when compiling:
file included from …/components/lvgl_esp32_drivers/lvgl_touch/touch_driver.h:26,
from …/components/lvgl_esp32_drivers/lvgl_helpers.h:19,
from …/main/main.c:40:
…/components/lvgl_esp32_drivers/lvgl_touch/ft6x36.h:24:10: fatal error: lvgl/src/lv_hal/lv_hal.h: No such file or directory
What do you expect?
It should compile without me having to edit the header file as follows:
Before edit line 24 of /components/lvgl_esp32_drivers/lvgl_touch/ft6x36.h:
#define __FT6X06_H
#include <lvgl/src/lv_hal/lv_hal.h>
Will not compile
After Edit (line 24):
#define __FT6X06_H
#include <../lvgl/src/lv_hal/lv_hal.h>
Compiles
Code to reproduce
I have cloned the LVGL and LVGL ESP32 Drivers into my projects components folder:
git submodule add https://github.com/lvgl/lvgl.git components/lvgl
git submodule add https://github.com/lvgl/lvgl_esp32_drivers.git components/lvgl_esp32_drivers
Alter CMakeLists,txt in Main folder:
set(SOURCES "main.c")
idf_component_register(SRCS ${SOURCES}
INCLUDE_DIRS .
REQUIRES lvgl_esp32_drivers lvgl_touch lvgl_tft lvgl)
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_LVGL_H_INCLUDE_SIMPLE")
Alter CMakeLists.txt at project folder:
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
list(APPEND EXTRA_COMPONENT_DIRS components/lvgl_esp32_drivers components/lvgl_esp32_drivers/lvgl_touch components/lvgl_esp32_drivers/lvgl_tft)
project(myproject)