Using LVGL with ESPIDF framework in PlatformIO

Description

I am trying to integrate LVGL with an ESP32 using the PlatformIO environment and the ESP-IDF framework. I have successfully run LVGL on this hardware setup using the Arduino framework but am facing issues transitioning to ESP-IDF.

I used the following link LVGL (Light Versatile Graphics Library) ESP32 Cheap Yellow Display (ESP32-2432S028R) | Random Nerd Tutorials

What ive tried so far

I’ve successfully implemented a user interface using LVGL with the Arduino framework. However, when transitioning to ESP-IDF, I encounter issues with display initialization and touch input handling. Here is what I’ve tried:

  • Configuring TFT_eSPI and XPT2046 drivers as per the instructions tailored for Arduino.
  • Adjusting the initialization code to suit ESP-IDF’s system tasks and interrupt management.
  • Experimenting with different configurations in the platformio.ini file to ensure the libraries are correctly included.
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino, espidf
monitor_speed = 115200
lib_deps =
    bodmer/TFT_eSPI@^2.5.43
    https://github.com/PaulStoffregen/XPT2046_Touchscreen.git
    lvgl/lvgl@^9.2.0