lv_platformio icon indicating copy to clipboard operation
lv_platformio copied to clipboard

Confusing guidelines / Difficulties to use library with platformIO

Open MainWire opened this issue 2 years ago • 7 comments

Hi,

After spending some time and eventually managing to install the LV_PlatformIO library, I am encountering a few build errors I cannot fix. The main problem seems to be that I cannot get a correct main.cpp file content, and I am having difficulties understanding the platformIO instructions

My installation :

  • lvgl @ 8.2.0
  • lv_conf.h enabled
  • The project folder I am using (lv_platformio master project) Github
Toolchains versions :
    • framework-espidf @ 3.50102.240122 (5.1.2)
    • tool-cmake @ 3.16.4
    • tool-esptoolpy @ 1.40501.0 (4.5.1)
    • tool-idf @ 1.0.1
    • tool-mconf @ 1.4060000.20190628 (406.0.0)
    • tool-ninja @ 1.9.0
    • tool-riscv32-esp-elf-gdb @ 11.2.0+20220823
    • tool-xtensa-esp-elf-gdb @ 11.2.0+20230208
    • toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
    • toolchain-xtensa-esp32 @ 12.2.0+20230208
cmake_minimum_required(VERSION 3.16.0)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(LVGL_C_Main)

Attempt n°1 (demo_create was not declared)

  1. Using the instructions and the main.c available at the following link Platformio support
  2. and after correcting the line #include "demo.h" to #include "demos/lv_demos.h" because of the demo.h not found

I am getting the following build error : src/main.cpp:28:5: error: 'demo_create' was not declared in this scope; did you mean 'lv_obj_create'?

Note : I was not able to Build and run the demo as shown here because I could not find any idf.py file in my downloads.

Attempt n°2 (monitor.h no such file or directory)

  1. Using the following main.cpp main.cpp dpaste link
  2. After Moving the 'hal' folder to lib folder, because vscode wasn't finding the file in main.cpp
  3. And Correcting the path to hal with the following : #include "..\lib\hal\sdl2\app_hal.c" (otherwise app_hal isn't found)
  4. Downloading _SDL2-devel-2.30.1-VC.zip _ at the following link SDL download and putting it in the lib folder (with the hal folder)

I am getting the following error : src/..\lib\hal\sdl2\app_hal.c:4:10: fatal error: display/monitor.h: No such file or directory

I also tried to follow the instructions here PIO issue but I was stuck because I could not find the idf.py

I am unsure of how I should proceed to use this library with platformIO

I would be really grateful to anyone providing some help !

Thanks in advance

MainWire avatar Mar 15 '24 22:03 MainWire

I would be really happy for any help I may have 👍 I still can't figure out how to make the library compile with the examples sketch. Ask anything you need !

MainWire avatar Mar 20 '24 16:03 MainWire