It’s been an adventure…
I finally deleted everything and re-installed everything from scratch. No other projects show up in explorer (I didn’t want anything to cause any issues, and there have been many…).
I’ve got the one main.cpp file. lvgl in installed, and lvgl.h is included in the main.cpp. lv_conf.h has been modified from the template, with very few changes (first is the “enable this code” at the top of the file)
But when I compile, it throws out many errors related to lvgl. One of them says that “lvgl_conf.h” is probably not included. (but it is) Now the main error is ‘lv_display_t’ does not name a type; did you mean ‘lv_area_t’?
Now, in the main code, the only reference to lvgl besides the lvgl include is *lv_display_t disp; and it’s underlined in red, the co-pilot says it’s undefined. It also indicates that lvgl.h is not included, (but it is). I tried to add lv_obj_t as a test, and same thing, underlined in red, indicating lvgl is not being “seen”.
I’ve seen this issue multiple times (and never fixed) while trying to get this working again.
For whatever reason, pioarduino simply will not “see” lvgl.
devin at pioarduino has no answer or suggestions. I search the internet and not a lot comes up, but I think I saw something about a bug that causes this. I can’t find much at the moment, I’ve been working for days on this, deleting, installing, uninstalling, re-installing… now I’ve got a clean install, and it still shows up.
I thought it was related to the board def file but I’ve tried a couple different ones and no change. Moving/copying lv_conf.h and lvgl.h to the includes directory doesn’t help either.
Some time yesterday, I could use platformio co-pilot and add all the headers it suggested, but it’s the same headers that are included in the lvgl.h file.
So, I can include the same headers and the code (might) compile (no red underlines anyway). For some reason, lvgl.h just will not get used. There doesn’t seem to be a problem with any other of the libraries, just lvgl.
Any suggestions?
Here’'s the platformio.ini file: (The “-D RV” flag is used to chose which Shelly energy monitor I talk to, the one at home or the one in the RV. And the lvgl library IS in the paths.
[env:esp32-s3-devkitc-1-myboard]
platform = espressif32 @ 6.12.0
board = esp32-s3-devkitm-1
framework = arduino
monitor_speed = 115200
board_build.partitions = huge_app.csv
board_build.f_cpu = 240000000L
build_flags =
-D LV_CONF_INCLUDE_SIMPLE
-D RV
-I include
-mfix-esp32-psram-cache-issue
lib_deps =
lvgl/lvgl@^9.5.0
lovyan03/LovyanGFX@^1.2.20
tamctec/TAMC_GT911@^1.0.2
adafruit/Adafruit GFX Library@^1.12.6
maxpromer/PCA9557-arduino@^1.0.0
bblanchon/ArduinoJson@^7.2.2