Folder Structure for Includes

I'm trying to run some code (giobauermeister/waveshare-round-esp32-lvgl) but am having a lot of issues with include statements. For example,
#include “TCA9554PWR.h”
#include “PCF85063.h”

Is the folder structure not suitable for arduino IDE to process the includes?

Original Forum post: Waveshare Display LVGL Setup - Get started - LVGL Forum

What kind of issues? Could you show a error message?

they are all file/directory could not be found errors.

Welcome to the forum

#include “TCA9554PWR.h”
#include “PCF85063.h”

Where are those files located on your PC ?

the full github repo is linked above.

But the files are in subfolders in the same directory. The include doesn't seem to be finding them in subfolders?

C:\Users\....\waveshare-round-esp32-lvgl-main\main\EXIO\TCA9554PWR.h
C:\Users\....\waveshare-round-esp32-lvgl-main\main\PCF85063\PCF85063.h

In general an Arduino sketch expects to find the files #included by it either in the same folder as the .ino file being compiled or in a folder in the libraries folder of your sketchbook folder

In either case you can use the #include "libraryFile.h" format of #include

There are other possible locations for library files but I suggest that you try one of those first

It seems the project is not for Arduino.
You can't get any random github repo and expect that it will builds in the Arduino IDE without rewriting the code.

it appears to be for the ESP-IDF

1. About Demo files

I think you had downloaded ESP32-S3-Touch-LCD-2.8C Demo from ESP32-S3-Touch-LCD-2.8C wiki page.

Extract the zip file and you will find TCA9554PWR.h and RTC_PCF85063.h in Arduino/examples/LVGL_Arduino.

ESP32-S3-Touch-LCD-2.8C-Demo
├── Arduino
│   ├── examples
│   │   └── LVGL_Arduino
│   │       ├── BAT_Driver.cpp
│   │       ├── BAT_Driver.h
│   │       ├── Display_ST7701.cpp
│   │       ├── Display_ST7701.h
│   │       ├── Gyro_QMI8658.cpp
│   │       ├── Gyro_QMI8658.h
│   │       ├── I2C_Driver.cpp
│   │       ├── I2C_Driver.h
│   │       ├── LVGL_Arduino.ino    <== sketch
│   │       ├── LVGL_Driver.cpp
│   │       ├── LVGL_Driver.h
│   │       ├── LVGL_Example.cpp
│   │       ├── LVGL_Example.h
│   │       ├── RTC_PCF85063.cpp
│   │       ├── RTC_PCF85063.h      <== Here!
│   │       ├── SD_Card.cpp
│   │       ├── SD_Card.h
│   │       ├── TCA9554PWR.cpp
│   │       ├── TCA9554PWR.h        <== Here!
│   │       ├── Touch_GT911.cpp
│   │       ├── Touch_GT911.h
│   │       ├── Wireless.cpp
│   │       └── Wireless.h

So, if you load LVGL_Arduino.ino into the IDE, you should be able to compile.

2. LVGL version

Which LVGL version did you install?

The wiki page does not specify a version, which is obviously incorrect; it requires LVGL 8.3.9. The demo code contains functions that do not exist in LVGL9.x.

ESP32-S3-Touch-LCD-2.8C-Demo
├── Arduino
│   └── libraries
│       └── lvgl
│           ├── CMakeLists.txt
│           ├── Kconfig
│           ├── LICENCE.txt
│           ├── README.md
│           ├── README_pt_BR.md
│           ├── README_zh.md
│           ├── SConscript
│           ├── component.mk
│           ├── demos
│           ├── idf_component.yml
│           ├── library.json
│           ├── library.properties
│           ├── lv_conf_template.h    <== 8.3.9
│           ├── lvgl.h
│           ├── lvgl.mk
│           ├── scripts
│           ├── src
│           └── tests

Furthermore, some files are slightly different from the 8.3.9 downloaded from the official LVGL GitHub, so you will need to copy the lvgl attached to the libraries in Demo to the libraries in your sketchbook folder. At the same time, you will need to create lv_conf.h based on the attached lv_conf_template.h.

If this doesn't solve the issue, I would suggest contacting Waveshare support and requesting the appropriate lvgl library.

Ah this seems to have worked, thank you! I also had to update the sketchbook location in Preferences.

Thanks for your comment! Unfortunately the demo files don't work for my particular hardware, hence why I'm trying the crowdsourced files (but which apparently aren't built for Arduino). Waveshare support is pretty useless and points me to the demo you mentioned, but which throws even more errors than this crowdsourced one.

Well, let us clarify your situation.

You posted on the LVGL forum that your MCU board is the "Waveshare ESP32-S3-Touch-LCD-2.8C".

On the Arduino IDE, you then configured and compiled giobauermeister/waveshare-round-esp32-lvgl that is originally for LVGL v9 + ESP-IDF v5, but some errors occurred.

You also tried Waveshare's demo program for Arduino, but it didn't work and didn't fit your requirements.

You are also trying "crowdsourced files" :

Unfortunately I have no experience developing with ESP-IDF.

But if you could narrow it down to one application and post the file structure you're trying to compile (perhaps originally for ESP-IDE?) and the full verbose output from the compiler in the Arduino IDE, I think the experts here might be able to help you.

Sorry for the confusion!

First, I tried Waveshare's demo program for Arduino but was getting lots of problems. I posted on the LVGL forum, and got a response saying this is a known issue for my particular board, and a suggestion to try the giobauermeister files.

I tried adapting these for Arduino since they are originally for ESP-IDF but not having much luck so reaching out for support on this forum from those more familiar with the Arduino format. The 'crowd sourced' files I was just referring to the same files from giobauermeister.

The output posted in the photo above is all I see. When I fix one error, it then comes up with the next one...

This is completely normal. The error correction process is always iterative. You fix one error, another appears, and so on until you fix everything. Sometimes there can be dozens of them.
Moreover, correcting compilation errors is only the first and simplest stage. Quite often it happens that you have fixed all the errors, the code compiles, you load it into the board - and it does not work. Here the next stage begins - the debugging stage, at which you should find not syntax, but logical errors. This is much more difficult, because here you do not have a compiler that tells you where the error is.