TFT Lcd Display

rebel88
Posts: 13
Joined: Mon Mar 23, 2020 8:37 am

TFT Lcd Display

Postby rebel88 » Mon May 18, 2020 11:50 am

Hi all,
I'm trying to use a TFT LCD Display with SPI with Visual Studio Code.
I'have downloaded the following lib :
https://github.com/loboris/ESP32_TFT_library

I'm following the Readme file to setup the project.
I'have done following steps :
1)ESP-IDF:Create Project/template [in my folder 19_TFT_LCD]
2)I have cloned the repository
3)Execue GUI Configuration tool [menuconfig]
4)Set SPIFFS Configuration
5)Navigate to TFT Display DEMO Configuration and set SPIFFS options.
6)I don't want to use WIFI

When I try to build the project i have the following error :
"/main/tft_demo.c:22:10: fatal error: tftspi.h: No such file or directory
#include "tftspi.h""
So I have found "components" in espressif environment.
This is because i have modified the file :
19_TFT_LCD/main/CMakeLists.txt
my folder tree is :
  • 19_TFT_LCD
    ----------> .vscode
    ----------> build
    ----------> components
    ---------------->mkfpiffs
    ---------------->spidriver
    ---------------->spiffs
    ---------------->spiffs_image
    ---------------->tft
    ---------->main
this is why i have added into the previous file components folders:

Code: Select all

idf_component_register(
    SRCS "tft_demo.c"
    INCLUDE_DIRS    "../components/mkspiffs"
                    "../components/tft" 
                    "../components/spidriver"
                    "../components/spiffs"
                    "../components/spiffs_image"
)
At this point i have following error :
[1/9] Performing build step for 'bootloader'
ninja: no work to do.
[2/7] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/tft_demo.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/tft_demo.c.obj
C:\Users\Admin\.espressif\tools\xtensa-esp32-elf\esp32-2019r1-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -Iconfig -I../components/mkspiffs -I../components/tft -I../components/spidriver -I../components/spiffs -I../components/spiffs_image -IC:/Users/Admin/esp-idf/components/newlib/platform_include -IC:/Users/Admin/esp-idf/components/freertos/include -IC:/Users/Admin/esp-idf/components/heap/include -IC:/Users/Admin/esp-idf/components/log/include -IC:/Users/Admin/esp-idf/components/soc/esp32/include -IC:/Users/Admin/esp-idf/components/soc/include -IC:/Users/Admin/esp-idf/components/esp_rom/include -IC:/Users/Admin/esp-idf/components/esp_common/include -IC:/Users/Admin/esp-idf/components/xtensa/include -IC:/Users/Admin/esp-idf/components/xtensa/esp32/include -IC:/Users/Admin/esp-idf/components/esp32/include -IC:/Users/Admin/esp-idf/components/driver/include -IC:/Users/Admin/esp-idf/components/esp_ringbuf/include -IC:/Users/Admin/esp-idf/components/esp_event/include -IC:/Users/Admin/esp-idf/components/tcpip_adapter/include -IC:/Users/Admin/esp-idf/components/lwip/include/apps -IC:/Users/Admin/esp-idf/components/lwip/include/apps/sntp -IC:/Users/Admin/esp-idf/components/lwip/lwip/src/include -IC:/Users/Admin/esp-idf/components/lwip/port/esp32/include -IC:/Users/Admin/esp-idf/components/lwip/port/esp32/include/arch -IC:/Users/Admin/esp-idf/components/vfs/include -IC:/Users/Admin/esp-idf/components/esp_wifi/include -IC:/Users/Admin/esp-idf/components/esp_wifi/esp32/include -IC:/Users/Admin/esp-idf/components/esp_eth/include -IC:/Users/Admin/esp-idf/components/efuse/include -IC:/Users/Admin/esp-idf/components/efuse/esp32/include -IC:/Users/Admin/esp-idf/components/app_trace/include -IC:/Users/Admin/esp-idf/components/mbedtls/port/include -IC:/Users/Admin/esp-idf/components/mbedtls/mbedtls/include -IC:/Users/Admin/esp-idf/components/wpa_supplicant/include -IC:/Users/Admin/esp-idf/components/wpa_supplicant/port/include -IC:/Users/Admin/esp-idf/components/wpa_supplicant/include/esp_supplicant -IC:/Users/Admin/esp-idf/components/bootloader_support/include -IC:/Users/Admin/esp-idf/components/app_update/include -IC:/Users/Admin/esp-idf/components/spi_flash/include -IC:/Users/Admin/esp-idf/components/nvs_flash/include -IC:/Users/Admin/esp-idf/components/pthread/include -IC:/Users/Admin/esp-idf/components/espcoredump/include -IC:/Users/Admin/esp-idf/components/asio/asio/asio/include -IC:/Users/Admin/esp-idf/components/asio/port/include -IC:/Users/Admin/esp-idf/components/coap/port/include -IC:/Users/Admin/esp-idf/components/coap/port/include/coap -IC:/Users/Admin/esp-idf/components/coap/libcoap/include -IC:/Users/Admin/esp-idf/components/coap/libcoap/include/coap2 -IC:/Users/Admin/esp-idf/components/console -IC:/Users/Admin/esp-idf/components/nghttp/port/include -IC:/Users/Admin/esp-idf/components/nghttp/nghttp2/lib/includes -IC:/Users/Admin/esp-idf/components/esp-tls -IC:/Users/Admin/esp-idf/components/esp_adc_cal/include -IC:/Users/Admin/esp-idf/components/esp_gdbstub/include -IC:/Users/Admin/esp-idf/components/tcp_transport/include -IC:/Users/Admin/esp-idf/components/esp_http_client/include -IC:/Users/Admin/esp-idf/components/esp_http_server/include -IC:/Users/Admin/esp-idf/components/esp_https_ota/include -IC:/Users/Admin/esp-idf/components/protobuf-c/protobuf-c -IC:/Users/Admin/esp-idf/components/protocomm/include/common -IC:/Users/Admin/esp-idf/components/protocomm/include/security -IC:/Users/Admin/esp-idf/components/protocomm/include/transports -IC:/Users/Admin/esp-idf/components/mdns/include -IC:/Users/Admin/esp-idf/components/esp_local_ctrl/include -IC:/Users/Admin/esp-idf/components/esp_websocket_client/include -IC:/Users/Admin/esp-idf/components/expat/expat/expat/lib -IC:/Users/Admin/esp-idf/components/expat/port/include -IC:/Users/Admin/esp-idf/components/wear_levelling/include -IC:/Users/Admin/esp-idf/components/sdmmc/include -IC:/Users/Admin/esp-idf/components/fatfs/diskio -IC:/Users/Admin/esp-idf/components/fatfs/vfs -IC:/Users/Admin/esp-idf/components/fatfs/src -IC:/Users/Admin/esp-idf/components/freemodbus/common/include -IC:/Users/Admin/esp-idf/components/idf_test/include -IC:/Users/Admin/esp-idf/components/jsmn/include -IC:/Users/Admin/esp-idf/components/json/cJSON -IC:/Users/Admin/esp-idf/components/libsodium/libsodium/src/libsodium/include -IC:/Users/Admin/esp-idf/components/libsodium/port_include -IC:/Users/Admin/esp-idf/components/mqtt/esp-mqtt/include -IC:/Users/Admin/esp-idf/components/openssl/include -IC:/Users/Admin/esp-idf/components/spiffs/include -IC:/Users/Admin/esp-idf/components/ulp/include -IC:/Users/Admin/esp-idf/components/unity/include -IC:/Users/Admin/esp-idf/components/unity/unity/src -IC:/Users/Admin/esp-idf/components/wifi_provisioning/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.0-dirty\" -DGCC_NOT_5_2_0 -DESP_PLATFORM -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/tft_demo.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\tft_demo.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/tft_demo.c.obj -c ../main/tft_demo.c
In file included from ../components/spidriver/spi_master_lobo.h:24,
from ../components/tft/tftspi.h:11,
from ../main/tft_demo.c:22:
C:/Users/Admin/esp-idf/components/esp32/include/esp_intr.h:16:2: warning: #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead [-Wcpp]
#warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead
^~~~~~~
In file included from ../components/spidriver/spi_master_lobo.h:26,
from ../components/tft/tftspi.h:11,
from ../main/tft_demo.c:22:
C:/Users/Admin/esp-idf/components/esp32/include/rom/lldesc.h:1:2: warning: #warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead [-Wcpp]
#warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead
^~~~~~~
../main/tft_demo.c: In function 'poly_demo':
../main/tft_demo.c:925:13: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (r <= 0) break;
^~
../main/tft_demo.c:926:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
n += 2;
^
../main/tft_demo.c:947:13: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (r <= 0) break;
^~
../main/tft_demo.c:948:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
n += 2;
^
cc1.exe: some warnings being treated as errors
ninja: build stopped: subcommand failed.
But from there i can't go on.
Does someone can help me?

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Majestic-12 [Bot] and 129 guests