lvgl / lv_port_esp32

LVGL ported to ESP32 including various display and touchpad drivers
MIT License
1.06k stars 440 forks source link

fatal error: lvgl/lvgl.h: No such file or directory #260

Closed ForgetCSX closed 3 years ago

ForgetCSX commented 3 years ago

We use GitHub issues for development related discussions. Please use the forum to ask questions.

Describe the issue Using git clone --recursive https://github.com/lvgl/lv_port_esp32.git clone the project without making any changes, directly Compile after the following error, and the location is not only this place, all references to the file location have reported errors, I try to add absolute path, but this is very troublesome, is there an easy way?

Code to reproduce the issue git clone --recursive https://github.com/lvgl/lv_port_esp32.git Expected Results

Actual Results

ESP32 Chip version chip revision: 1 esp32: SPI Speed : 40MHz esp32: SPI Mode : DIO esp32: SPI Flash Size : 4MB ESP-IDF version ESP-IDF v4.2-238-g8cd16b60f Development kit used ESP-IDF Development machine OS Ubunt20.04 Compilation warnings/errors (if available)

If possible, copy the compilation log into a file and attach it here xiang@xiang:~/esp/lv_port_esp32$ make -j32 Toolchain path: /home/xiang/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: esp-2020r3 Compiler version: 8.4.0 Python requirements from /home/xiang/esp/esp-idf/requirements.txt are satisfied.

App "lvgl-demo" version: v2.0-39-gb53d406 CC build/lvgl_esp32_drivers/lvgl_helpers.o CC build/lvgl_tft/disp_spi.o CC build/lvgl_tft/st7796s.o CC build/lvgl_touch/tp_i2c.o CC build/main/main.o CC build/lvgl_touch/touch_driver.o CC build/mdns/mdns_console.o CC build/lvgl_touch/xpt2046.o CC build/lvgl_touch/ft6x36.o CC build/mdns/mdns_networking.o In file included from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_helpers.h:18, from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_helpers.c:10: /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/disp_driver.h:18:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

compilation terminated. CXX build/nvs_flash/src/nvs_cxx_api.o CC build/nghttp/nghttp2/lib/nghttp2_http.o CC build/newlib/heap.o CXX build/nvs_flash/src/nvs_handle_simple.o In file included from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/touch_driver.c:5: /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/touch_driver.h:20:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

compilation terminated. CC build/lvgl_tft/ili9488.o CC build/mdns/mdns.o CC build/lvgl_tft/ili9486.o CC build/lvgl_tft/ili9481.o CC build/lvgl_tft/il3820.o CC build/lvgl_tft/st7735s.o CC build/nghttp/nghttp2/lib/nghttp2_version.o make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:lvgl_helpers.o] 错误 1 make: [/home/xiang/esp/esp-idf/make/project.mk:635:component-lvgl_esp32_drivers-build] 错误 2 make: *** 正在等待未完成的任务.... In file included from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/st7796s.c:9: /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/st7796s.h:22:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

compilation terminated. CC build/newlib/time.o make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:291:touch_driver.o] 错误 1 make[1]: 正在等待未完成的任务.... CC build/lvgl_touch/tp_spi.o CC build/newlib/termios.o In file included from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/ili9488.c:8: /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/ili9488.h:21:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

compilation terminated. CC build/perfmon/xtensa_perfmon_masks.o In file included from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/xpt2046.c:9: /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/xpt2046.h:22:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

compilation terminated. CC build/protobuf-c/protobuf-c/protobuf-c/protobuf-c.o make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:xpt2046.o] 错误 1 CC build/perfmon/xtensa_perfmon_access.o CC build/newlib/syscalls.o CC build/mqtt/esp-mqtt/mqtt_client.o make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:st7796s.o] 错误 1 make[1]: *** 正在等待未完成的任务.... CC build/openssl/library/ssl_cert.o In file included from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/ili9486.c:9: /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/ili9486.h:21:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

CXX build/nvs_flash/src/nvs_types.o compilation terminated. CC build/mqtt/esp-mqtt/lib/mqtt_outbox.o CC build/nghttp/nghttp2/lib/nghttp2_mem.o make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:ili9488.o] 错误 1 make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:ili9486.o] 错误 1 /home/xiang/esp/lv_port_esp32/main/main.c:25:10: fatal error: lvgl.h: No such file or directory

include "lvgl.h"

      ^~~~~~~~

compilation terminated. make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:main.o] 错误 1 make: [/home/xiang/esp/esp-idf/make/project.mk:635:component-main-build] 错误 2 CC build/openssl/library/ssl_methods.o /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/ft6x36.c:26:10: fatal error: lvgl/lvgl.h: No such file or directory

include <lvgl/lvgl.h>

      ^~~~~~~~~~~~~

compilation terminated. CC build/nghttp/nghttp2/lib/nghttp2_hd_huffman.o make[1]: *** [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:ft6x36.o] 错误 1 In file included from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/st7735s.c:9: /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/st7735s.h:20:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

compilation terminated. CC build/perfmon/xtensa_perfmon_apis.o CC build/protocomm/src/common/protocomm.o In file included from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/ili9481.c:8: /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/ili9481.h:21:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

compilation terminated. make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:st7735s.o] 错误 1 make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:ili9481.o] 错误 1 CXX build/nvs_flash/src/nvs_ops.o CC build/mqtt/esp-mqtt/lib/mqtt_msg.o In file included from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/tp_spi.c:10: /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/touch_driver.h:20:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

compilation terminated. CC build/newlib/syscall_table.o make[1]: *** [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:tp_spi.o] 错误 1 CC build/nghttp/nghttp2/lib/nghttp2_session.o CC build/mbedtls/mbedtls/library/ecp.o /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/disp_spi.c:25:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

compilation terminated. make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:disp_spi.o] 错误 1 CXX build/nvs_flash/src/nvs_page.o CC build/newlib/poll.o CC build/openssl/library/ssl_pkey.o CC build/newlib/abort.o CC build/newlib/reent_init.o /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/tp_i2c.c: In function 'i2c_master_init': /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/tp_i2c.c:36:23: error: 'CONFIG_LV_TOUCH_I2C_SDA' undeclared (first use in this function); did you mean CONFIG_LV_DISP_PIN_SDA'? conf.sda_io_num = CONFIG_LV_TOUCH_I2C_SDA; ^~~~~~~ CONFIG_LV_DISP_PIN_SDA /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/tp_i2c.c:36:23: note: each undeclared identifier is reported only once for each function it appears in CC build/nghttp/nghttp2/lib/nghttp2_callbacks.o CC build/newlib/locks.o CC build/nghttp/nghttp2/lib/nghttp2_hd.o CC build/newlib/random.o /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_touch/tp_i2c.c:38:23: error: 'CONFIG_LV_TOUCH_I2C_SCL' undeclared (first use in this function); did you mean CONFIG_LV_DISP_PIN_SCL'? conf.scl_io_num = CONFIG_LV_TOUCH_I2C_SCL; ^~~~~~~ CONFIG_LV_DISP_PIN_SCL CC build/openssl/library/ssl_x509.o make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:tp_i2c.o] 错误 1 In file included from /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/il3820.c:37: /home/xiang/esp/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/il3820.h:17:10: fatal error: lvgl/lvgl.h: No such file or directory

include "lvgl/lvgl.h"

      ^~~~~~~~~~~~~

compilation terminated. make: [/home/xiang/esp/esp-idf/make/project.mk:635:component-lvgl_touch-build] 错误 2 make[1]: [/home/xiang/esp/esp-idf/make/component_wrapper.mk:292:il3820.o] 错误 1 make: *** [/home/xiang/esp/esp-idf/make/project.mk:635:component-lvgl_tft-build] 错误 2 CC build/mqtt/esp-mqtt/lib/platform_esp32_idf.o CXX build/nvs_flash/src/nvs_item_hash_list.o CC build/mbedtls/mbedtls/library/chachapoly.o CC build/nghttp/nghttp2/lib/nghttp2_stream.o CC build/newlib/pthread.o CXX build/nvs_flash/src/nvs_handle_locked.o CXX build/nvs_flash/src/nvs_pagemanager.o AR build/perfmon/libperfmon.a CC build/nghttp/nghttp2/lib/nghttp2_helper.o CC build/protocomm/src/security/security0.o CC build/openssl/library/ssl_lib.o CC build/mbedtls/mbedtls/library/blowfish.o CXX build/nvs_flash/src/nvs_storage.o CC build/mbedtls/mbedtls/library/pkcs12.o CC build/protocomm/src/security/security1.o CC build/openssl/library/ssl_stack.o CC build/mbedtls/mbedtls/library/ssl_ticket.o CC build/mbedtls/mbedtls/library/ecp_curves.o CC build/openssl/platform/ssl_pm.o CC build/mbedtls/mbedtls/library/sha512.o CC build/protocomm/proto-c/sec1.pb-c.o CC build/nghttp/nghttp2/lib/nghttp2_priority_spec.o CC build/mbedtls/mbedtls/library/pem.o CXX build/nvs_flash/src/nvs_api.o CC build/openssl/platform/ssl_port.o AR build/newlib/libnewlib.a CC build/nghttp/nghttp2/lib/nghttp2_buf.o CC build/protocomm/proto-c/session.pb-c.o CXX build/nvs_flash/src/nvs_partition_manager.o CC build/mbedtls/mbedtls/library/entropy_poll.o CC build/mbedtls/mbedtls/library/cipher.o CC build/protocomm/proto-c/constants.pb-c.o CC build/mbedtls/mbedtls/library/md_wrap.o CC build/mbedtls/mbedtls/library/version_features.o CC build/nghttp/nghttp2/lib/nghttp2_option.o CC build/protocomm/proto-c/sec0.pb-c.o CC build/mbedtls/mbedtls/library/hkdf.o CC build/mbedtls/mbedtls/library/nist_kw.o CC build/nghttp/nghttp2/lib/nghttp2_npn.o CC build/nghttp/nghttp2/lib/nghttp2_rcbuf.o CC build/protocomm/src/transports/protocomm_console.o CC build/mbedtls/mbedtls/library/ripemd160.o CC build/protocomm/src/transports/protocomm_httpd.o CC build/mbedtls/mbedtls/library/rsa.o CC build/nghttp/nghttp2/lib/nghttp2_frame.o CC build/nghttp/nghttp2/lib/nghttp2_outbound_item.o CC build/mbedtls/mbedtls/library/md.o CC build/nghttp/nghttp2/lib/nghttp2_hd_huffman_data.o AR build/openssl/libopenssl.a CC build/nghttp/nghttp2/lib/nghttp2_debug.o CC build/mbedtls/mbedtls/library/ssl_cookie.o CC build/nghttp/nghttp2/lib/nghttp2_submit.o CC build/nghttp/nghttp2/lib/nghttp2_pq.o CC build/mbedtls/mbedtls/library/aria.o AR build/protocomm/libprotocomm.a CC build/mbedtls/mbedtls/library/sha256.o CC build/nghttp/nghttp2/lib/nghttp2_queue.o CC build/mbedtls/mbedtls/library/dhm.o CC build/mbedtls/mbedtls/library/pkwrite.o CC build/mbedtls/mbedtls/library/base64.o CC build/mbedtls/mbedtls/library/timing.o CC build/mbedtls/mbedtls/library/asn1parse.o CC build/mbedtls/mbedtls/library/padlock.o CC build/nghttp/nghttp2/lib/nghttp2_map.o CC build/nghttp/port/http_parser.o CC build/mbedtls/mbedtls/library/ssl_ciphersuites.o CC build/mbedtls/mbedtls/library/version.o CC build/mbedtls/mbedtls/library/gcm.o CC build/mbedtls/mbedtls/library/cmac.o CC build/mbedtls/mbedtls/library/cipher_wrap.o CC build/mbedtls/mbedtls/library/md2.o CC build/mbedtls/mbedtls/library/ssl_cache.o CC build/mbedtls/mbedtls/library/ssl_srv.o CC build/mbedtls/mbedtls/library/x509_crt.o AR build/protobuf-c/libprotobuf-c.a CC build/mbedtls/mbedtls/library/ecdh.o CC build/mbedtls/mbedtls/library/asn1write.o CC build/mbedtls/mbedtls/library/md4.o CC build/mbedtls/mbedtls/library/chacha20.o CC build/mbedtls/mbedtls/library/platform_util.o CC build/mbedtls/mbedtls/library/ssl_tls.o CC build/mbedtls/mbedtls/library/ecjpake.o AR build/mqtt/libmqtt.a CC build/mbedtls/mbedtls/library/oid.o CC build/mbedtls/mbedtls/library/ecdsa.o CC build/mbedtls/mbedtls/library/pkcs11.o CC build/mbedtls/mbedtls/library/xtea.o CC build/mbedtls/mbedtls/library/ctr_drbg.o CC build/mbedtls/mbedtls/library/rsa_internal.o CC build/mbedtls/mbedtls/library/x509write_crt.o CC build/mbedtls/mbedtls/library/arc4.o CC build/mbedtls/mbedtls/library/bignum.o CC build/mbedtls/mbedtls/library/pkparse.o CC build/mbedtls/mbedtls/library/debug.o CC build/mbedtls/mbedtls/library/threading.o CC build/mbedtls/mbedtls/library/x509_crl.o CC build/mbedtls/mbedtls/library/camellia.o CC build/mbedtls/mbedtls/library/aesni.o CC build/mbedtls/mbedtls/library/x509.o CC build/mbedtls/mbedtls/library/certs.o CC build/mbedtls/mbedtls/library/pkcs5.o CC build/mbedtls/mbedtls/library/havege.o CC build/mbedtls/mbedtls/library/ccm.o CC build/mbedtls/mbedtls/library/poly1305.o AR build/nvs_flash/libnvs_flash.a CC build/mbedtls/mbedtls/library/memory_buffer_alloc.o CC build/mbedtls/mbedtls/library/hmac_drbg.o CC build/mbedtls/mbedtls/library/des.o CC build/mbedtls/mbedtls/library/x509write_csr.o CC build/mbedtls/mbedtls/library/platform.o AR build/nghttp/libnghttp.a CC build/mbedtls/mbedtls/library/aes.o CC build/mbedtls/mbedtls/library/pk_wrap.o CC build/mbedtls/mbedtls/library/entropy.o CC build/mbedtls/mbedtls/library/x509_create.o CC build/mbedtls/mbedtls/library/error.o CC build/mbedtls/mbedtls/library/md5.o CC build/mbedtls/mbedtls/library/pk.o CC build/mbedtls/mbedtls/library/sha1.o CC build/mbedtls/mbedtls/library/x509_csr.o AR build/mdns/libmdns.a CC build/mbedtls/mbedtls/library/ssl_cli.o CC build/mbedtls/port/mbedtls_debug.o CC build/mbedtls/port/esp_timing.o CC build/mbedtls/port/esp_aes_xts.o CC build/mbedtls/port/esp_sha.o CC build/mbedtls/port/esp_bignum.o CC build/mbedtls/port/net_sockets.o CC build/mbedtls/port/esp_hardware.o CC build/mbedtls/port/esp32/esp_sha1.o CC build/mbedtls/port/esp_mem.o CC build/mbedtls/port/esp32/esp_sha256.o CC build/mbedtls/port/esp32/sha.o CC build/mbedtls/port/esp32/bignum.o CC build/mbedtls/port/esp32/aes.o CC build/mbedtls/port/esp32/esp_sha512.o CC build/mbedtls/esp_crt_bundle/esp_crt_bundle.o EMBED build/mbedtls/x509_crt_bundle.bin.o AR build/mbedtls/libmbedtls.a xiang@xiang:~/esp/lv_port_esp32$

Mair commented 3 years ago

duplicate of 778219950 @C47D also reported by @coztemur as still being an issue

C47D commented 3 years ago

The problem seems to be the symbol LV_LVGL_H_INCLUDE_SIMPLE not being defined, in LVGL CMakeLists.txt file we're defining LV_CONF_INCLUDE_SIMPLE, but in the CMakeLists.txt of main we're defining it.

set(SOURCES main.c)
idf_component_register(SRCS ${SOURCES}
                    INCLUDE_DIRS .)

target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_LVGL_H_INCLUDE_SIMPLE")

@kisvegabor do you remember why did we kept LV_CONF_INCLUDE_SIMPLE instead of defining LV_LVGL_H_INCLUDE_SIMPLE?

C47D commented 3 years ago

@Mair, are you using make instead of idf?

C47D commented 3 years ago

Can you try check if 3154e57 solves the issue?

Mair commented 3 years ago

@C47D no I'm using idf.py build. I was working with @coztemur who found it. then I tried it and replicated it.

I Just did a fresh git clone --recurse-submodules https://github.com/lvgl/lv_port_esp32.git in a clean directory then did an idf.py menuconfig. and changed the display. then idf.py build

 -c ../components/lvgl_esp32_drivers/lvgl_tft/FT81x.c
In file included from ../components/lvgl_esp32_drivers/lvgl_tft/EVE.h:39,
                 from ../components/lvgl_esp32_drivers/lvgl_tft/FT81x.c:8:
../components/lvgl_esp32_drivers/lvgl_tft/EVE_config.h:41:10: fatal error: lvgl/lvgl.h: No such file or directory
 #include "lvgl/lvgl.h"
Mair commented 3 years ago

re #3154e57 I'll try it out later. but you can easily replicate it by trying a fresh pull ☝️

C47D commented 3 years ago

@Mair I was able to reproduce the issue (I wasn't at first because I was using the current master of lvgl_esp32_drivers), just updated the lvgl_esp32_drivers submodule (which contains a fix for your issue https://github.com/lvgl/lvgl_esp32_drivers/commit/9fc469edb304c70ba832fcff712939527ec5d4e0), you should be able to compile the project.

ForgetCSX commented 3 years ago

Sorry, I still can't compile successfully, how to add lvgl alone in the existing project?

C47D commented 3 years ago

@tore-espressif Can you help me out with this one? The lvgl_esp_drivers component.mk looks like this:

COMPONENT_SRCDIRS := .

COMPONENT_ADD_INCLUDEDIRS := .
COMPONENT_ADD_INCLUDEDIRS += lvgl_tft
COMPONENT_ADD_INCLUDEDIRS += lvgl_touch

CFLAGS += -DLV_LVGL_H_INCLUDE_SIMPLE

Please correct me if I'm wrong but LV_LVGL_H_INCLUDE_SIMPLE is being defined for this component, it should look for lvgl.h instead of lvgl/lvgl.h.

tore-espressif commented 3 years ago

Hello,

I'm sorry to hear that you are still struggling with what we considered solved.

Nevertheless, I could not reproduce the problem on any IDF4.x version with CMake (clean clone). I'm on Windows working with Wrover-kit and Kaluga-kit.

Please note, that when you are updating your local project with remote changes with git pull, it won't automatically update your submodules, which can be a issue as the problem was fixed recently in a lvgl_esp32_drivers submodule.

Last but not least, this repository is not set-up for use with plain GNU Make (not maintained anymore), I can see that you are using ESP-IDF version 4.x so I'd encourage you to use idf.py build / reconfigure / fullclean ... commands. If there are more users that must use IDF 3.x we might update the makefiles too.

Just compare the complexity of these two files: https://github.com/lvgl/lvgl_esp32_drivers/blob/462f5eea46de880b65a548f4ec557ed7a69045cd/lvgl_tft/CMakeLists.txt https://github.com/lvgl/lvgl_esp32_drivers/blob/462f5eea46de880b65a548f4ec557ed7a69045cd/lvgl_tft/component.mk and analogically the same in lvgl_touch directory.

@1404360768 Could you confirm that you can build this project successfully? I can help you with adding lvgl to an existing project then.

@C47D We should decide whether to have makefiles in the repo and maintain them properly or just delete them. Currently it is not possible to compile it with Make without touch support as the makefile forces all source files to be compiled even when you select no touch support in menuconfig. Then it fails on undefined configuration as you can see in build log https://github.com/lvgl/lv_port_esp32/issues/260#issue-807042403

ForgetCSX commented 3 years ago

Hello,

I'm sorry to hear that you are still struggling with what we considered solved.

Nevertheless, I could not reproduce the problem on any IDF4.x version with CMake (clean clone). I'm on Windows working with Wrover-kit and Kaluga-kit.

Please note, that when you are updating your local project with remote changes with git pull, it won't automatically update your submodules, which can be a issue as the problem was fixed recently in a lvgl_esp32_drivers submodule.

Last but not least, this repository is not set-up for use with plain GNU Make (not maintained anymore), I can see that you are using ESP-IDF version 4.x so I'd encourage you to use idf.py build / reconfigure / fullclean ... commands. If there are more users that must use IDF 3.x we might update the makefiles too.

Just compare the complexity of these two files: https://github.com/lvgl/lvgl_esp32_drivers/blob/462f5eea46de880b65a548f4ec557ed7a69045cd/lvgl_tft/CMakeLists.txt https://github.com/lvgl/lvgl_esp32_drivers/blob/462f5eea46de880b65a548f4ec557ed7a69045cd/lvgl_tft/component.mk and analogically the same in lvgl_touch directory.

@1404360768 Could you confirm that you can build this project successfully? I can help you with adding lvgl to an existing project then.

@C47D We should decide whether to have makefiles in the repo and maintain them properly or just delete them. Currently it is not possible to compile it with Make without touch support as the makefile forces all source files to be compiled even when you select no touch support in menuconfig. Then it fails on undefined configuration as you can see in build log #260 (comment)

Thank you so much,I'll give it a try idf.py build

C47D commented 3 years ago

@tore-espressif I did took a look into the esp-idf components and saw that we can check for the generated CONFIG_ symbols, so maybe we can check for them and include the appropriate source files.

This week I will try to fix both Kconfig files (tft and touch) and other issues like this one, because we want to improve the displays code base.

ForgetCSX commented 3 years ago

@C47D @tore-espressif At the moment I'm successfully compiled with idf.pyidf.py build, but my original project used idf.pyidf.py build to report errors, couldn't find the relevant SDK files, and didn't make any mistakes with make, which made me wonder, sorry I'm still a novle, so I still hope I can build the project with make.

C47D commented 3 years ago

@tore-espressif I'm working on a new branch to try get make builds done properly, I'm not familiar with this build system when using the ESP-IDF, can you please tell me if this commit goes in the right direction? https://github.com/lvgl/lvgl_esp32_drivers/commit/37715bc2b71e73faa5a07809bc0a5c1052d9c5c1

I wasn't sure if those checks needs to be on the lvgl_tft component.mk file or in the "main" one at the root directory.

Also according to this paths in the main Makefile must be absolute, I've fixed that in this commit b2553d03754ff4d01d58f86d055ef04904c47844

tore-espressif commented 3 years ago

@1404360768 We are currently working on enhancing the first time user's experience, so if you are not confident enough to dig into the build system, you can wait a little and we will try to make it better.

More info: ATM, when you add lvgl_esp32_drivers to your project (project_root/components folder), ESP-IDF won't recognize it as a component automatically; you must add it to its components extra directory, see this line: https://github.com/lvgl/lv_port_esp32/blob/master/CMakeLists.txt#L6

@C47D can you open a draft PR for this? We can discuss it in a separate thread, thanks!

C47D commented 3 years ago

@tore-espressif Done, I've opened PRs on both this and lvgl_esp32_drivers.

tore-espressif commented 3 years ago

Can we close this issue then?

ForgetCSX commented 3 years ago

Yes, thank you very much for your help

Bouvierly commented 11 months ago

In Arduino, there is always an error message that goes like this: "In file included from c: \ Users \ PL \ AppData \ Local \ Temp.arduinoIDE unsaved2023118-20692-17qr84m. 5xjm \ schechec8b \ libraries \ lvgl_esp32_drivers master/lvgl_helpers. h: 18,",

From C: \ Users \ PL \ AppData \ Local \ Temp.arduinoIDE unsaved20231111-10916 brtw2s. xbx16 \ fetch Dec19a \ sketch Dec19a. ino: 17:

c: \ Users \ PL \ AppData \ Local \ Temp.arduinoIDE unsaved2023118-20692-17qr84m. 5xjm \ fetch Dec8b \ libraries \ lvgl Esp32 Drivers master/lvgl Tft/disp_ Driver. h:18:10: fatal error: lvgl/lvgl. h: No such file or directory

Include "lvgl/lvgl. h"

^~~~~

Compilation terminated

Exit status 1

"Compilation error: exit status 1"

But I have this file, can anyone help me in arduino