Platformio/lvgl: fatal error: ../lv_conf_internal.h: No such file or directory

Hi all,

I use 3 ENVs in my platformio.ini (see below) and I get errors like “…/lv_conf_internal.h: No such file or directory” when I try to build [env:esp3] - even though the file is there.

I used vendoring for lvgl v 9.1.0 and have a working lv_conf.h. in folder \include.
My code is structured like this:

root
\include: --> lv_conf.h
\lib
   \lvgl -> library.json
\src
   \esp1
   \esp2
   \esp3

I suspect platformio.ini and/or library.json to be the culprit because uf my 3-[env]-setup.

I tried various library.json and platformio.ini-approaches, but lv_config.h/lv_conf_internal.h are giving errors, so lvgl is not setup correctly.

Any help/hint would be much appreciated!!

my current platformio.ini:

;--------------------------------------------------------------------------
; PlatformIO Project Configuration File
;--------------------------------------------------------------------------
[platformio]
default_envs = esp3
; -----------------------------------------------------------------------------
; ESP3: Handheld Pendant (S3)
; -----------------------------------------------------------------------------
[env:esp3]
platform = espressif32@~6.1.0
framework = arduino
board = esp32-s3-devkitc-1
monitor_speed = 115200
lib_ldf_mode = deep+
board_build.cppstd = gnu++17
board_build.filesystem = littlefs
board_build.data_dir = data_esp3
board_build.arduino.memory_type = qio_opi
build_src_filter = 
    +<esp3/> 
    -<esp1/> 
    -<esp2/>
build_flags =
    -D CORE_ESP3
    -D LV_CONF_INCLUDE_SIMPLE=1
    -I include
    -D ARDUINO_USB_MODE=1
    -D ARDUINO_USB_CDC_ON_BOOT=1
    -D BOARD_HAS_PSRAM
    -mfix-esp32-psram-cache-issue
lib_deps =
    ; Core HMI and UI libs
    lovyan03/LovyanGFX
    ;lvgl/lvgl@9.1.0
    madhephaestus/ESP32Encoder@^0.11.7

    ; Web Interface and Config libs
    me-no-dev/ESPAsyncWebServer
    ottowinter/AsyncTCP-esphome
    https://github.com/ayushsharma82/AsyncElegantOTA.git#v2.2.7
    bblanchon/ArduinoJson@7.0.4

My current library.json:

  "name": "lvgl",
  "version": "9.1.0",
  "keywords": "graphics, gui, embedded, tft, lvgl",
  "description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint.",
  "repository": {
    "type": "git",
    "url": "https://github.com/lvgl/lvgl.git"
  },
  "license": "MIT",
  "homepage": "https://lvgl.io",
  "frameworks": "*",
  "platforms": "*",
  "build": {
    "srcFilter": ["+<src/>", "-<src/drivers/>"]
  }
}

For future reference:
I asked the same question on the PlatformIO forum, since I wasn’t sure whether the problem could be solved by PlatformIO or LVGL.

It turned out that the issue was caused by project paths that were too long. The solution was to move the project folder higher up in the directory structure so the paths became shorter.

Although NTFS long paths were enabled, this did not resolve the issue. It seems that VS Code/PlatformIO may not be designed to work reliably with very long paths.