ESP32 TFT display library

kearins
Posts: 21
Joined: Sun Jul 23, 2017 11:48 pm

Re: ESP32 TFT display library

Postby kearins » Fri Aug 11, 2017 1:12 am

Why did you commented out call to gpio_set_level() in spi_master_lobo.c?

Code: Select all

//gpio_set_level(handle->cfg.spics_ext_io_num, 0); 
GPIO.out_w1ts = (1 << handle->cfg.spics_ext_io_num);
In this case we can't use GPIO 32,33 for PIN_NUM_DC. Maybe you have a reason to do so?

I uncommented call to gpio_set_level in 2 places and modified two defines in tftspi.c:

Code: Select all

//#define DC_CMD	GPIO.out_w1tc = (DC_VAL)
//#define DC_DATA	GPIO.out_w1ts = (DC_VAL)
#define DC_CMD	gpio_set_level(PIN_NUM_DC,0)
#define DC_DATA	gpio_set_level(PIN_NUM_DC,1)
and successfully tested demo with definition:

Code: Select all

#define PIN_NUM_DC 33

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: ESP32 TFT display library

Postby loboris » Sun Aug 13, 2017 1:10 pm

kearins wrote:Why did you commented out call to gpio_set_level() in spi_master_lobo.c? ...
If I remember well, it runs slightly faster that way..
I'll check it and try to make pins 32,33 usable. Thanks for reporting.

nickux
Posts: 3
Joined: Wed Aug 09, 2017 6:21 am

Re: ESP32 TFT display library

Postby nickux » Mon Aug 14, 2017 6:09 pm

Hello loboris,

would it be feasible to also display PNG images? They tend to be cleaner than JPG and much smaller than BMP.

AAAwen
Posts: 15
Joined: Fri Sep 08, 2017 6:00 am

Re: ESP32 TFT display library

Postby AAAwen » Wed Sep 13, 2017 8:33 am

Dear all,

I copied component.mk from https://github.com/loboris/ESP32_spiffs_example (components\mkspiffs\component.mk and components\spiffs_image\component.mk). But, I can't execute "make flashfs" and "make makefs" yet.
Who can help me? Thanks. :oops:

[我从 ESP32_spiffs_example 中拷贝了 component.mk 文件,但是在执行"make flashfs"和"make makefs"时仍然报错,请帮忙分析,谢谢!]

Code: Select all

$ make flashfs
Makefile:65: 警告:未定义的变量“TARGET_CXXFLAGS”
Building mkspiffs ...
main.cpp: 在函数‘void processArgs(int, const char**)’中:
main.cpp:591:83: 错误:在 C++98 中‘args’必须由构造函数而不是‘{...}’初始化
     std::vector<TCLAP::Arg*> args = {&packArg, &unpackArg, &listArg, &visualizeArg};
                                                                                   ^
main.cpp:591:83: 错误:could not convert ‘{(& packArg), (& unpackArg), (& listArg), (& visualizeArg)}’ from ‘<花括号内的初始值列表>’ to ‘std::vector<TCLAP::Arg*>’
make[1]: *** [Makefile:65:mkspiffs.exe] 错误 1
make: *** [/d/AWEN/esp/ESP32_TFT_library/components/mkspiffs/Makefile.projbuild:10:mkspiffs] 错误 2

kearins
Posts: 21
Joined: Sun Jul 23, 2017 11:48 pm

Re: ESP32 TFT display library

Postby kearins » Thu Sep 14, 2017 1:43 am

AAAwen wrote:Dear all,

I copied component.mk from https://github.com/loboris/ESP32_spiffs_example (components\mkspiffs\component.mk and components\spiffs_image\component.mk). But, I can't execute "make flashfs" and "make makefs" yet.
Who can help me? Thanks.
Did you try this receipt?
https://esp32.com/posting.php?mode=quot ... 35#pr12567

AAAwen
Posts: 15
Joined: Fri Sep 08, 2017 6:00 am

Re: ESP32 TFT display library

Postby AAAwen » Thu Sep 14, 2017 3:34 am

kearins wrote: Did you try this receipt?
https://esp32.com/posting.php?mode=quot ... 35#pr12567

Yes. I test this library under Win10.
The steps are as follow:
1) Clone the repository

Code: Select all

git clone --recursive https://github.com/espressif/esp-idf.git
git clone https://github.com/loboris/ESP32_TFT_library.git
git clone https://github.com/loboris/ESP32_spiffs_example.git
2) Copy "component.mk" to "ESP32_TFT_library/components/spiffs_image" from "ESP32_spiffs_example/components/spiffs_image"
copy "component.mk" to "ESP32_TFT_library/components/mkspiffs" from "ESP32_spiffs_example/components/mkspiffs"
3) Modify "ESP32_TFT_library/components/spiffs_image/Makefile.projbuild"

Code: Select all

.PHONY: flashfs makefs copyfs
4) Replace the whole directory 'ESP32_TFT_library\components\mkspiffs' with 'ESP32_spiffs_example\components\mkspiffs'
5) Execute 'make menuconfig', select 'Running on ESP-WROVER_KIT' and configure 'Default serial port'
6) Ececuting 'make clean','make flash' and 'make copyfs' are ok.
But, I can't execute "make flashfs" and "make makefs"
Can you help me fix the error? Thank you! :?

Code: Select all

aclas@Lenovo-PC MSYS /d/AWEN/esp/ESP32_TFT_library
$ make makefs
Makefile:65: 警告:未定义的变量“TARGET_CXXFLAGS”
Building mkspiffs ...
main.cpp: 在函数‘void processArgs(int, const char**)’中:
main.cpp:591:83: 错误:在 C++98 中‘args’必须由构造函数而不是‘{...}’初始化
     std::vector<TCLAP::Arg*> args = {&packArg, &unpackArg, &listArg, &visualizeArg};
                                                                                   ^
main.cpp:591:83: 错误:could not convert ‘{(& packArg), (& unpackArg), (& listArg), (& visualizeArg)}’ from ‘<花括号内的初始值列表>’ to ‘std::vector<TCLAP::Arg*>’
make[1]: *** [Makefile:65:mkspiffs.exe] 错误 1
make: *** [/d/AWEN/esp/ESP32_TFT_library/components/mkspiffs/Makefile.projbuild:10:mkspiffs] 错误 2

aclas@Lenovo-PC MSYS /d/AWEN/esp/ESP32_TFT_library
$ make flashfs
Makefile:65: 警告:未定义的变量“TARGET_CXXFLAGS”
Building mkspiffs ...
main.cpp: 在函数‘void processArgs(int, const char**)’中:
main.cpp:591:83: 错误:在 C++98 中‘args’必须由构造函数而不是‘{...}’初始化
     std::vector<TCLAP::Arg*> args = {&packArg, &unpackArg, &listArg, &visualizeArg};
                                                                                   ^
main.cpp:591:83: 错误:could not convert ‘{(& packArg), (& unpackArg), (& listArg), (& visualizeArg)}’ from ‘<花括号内的初始值列表>’ to ‘std::vector<TCLAP::Arg*>’
make[1]: *** [Makefile:65:mkspiffs.exe] 错误 1
make: *** [/d/AWEN/esp/ESP32_TFT_library/components/mkspiffs/Makefile.projbuild:10:mkspiffs] 错误 2
Last edited by AAAwen on Fri Sep 15, 2017 9:04 am, edited 1 time in total.

kearins
Posts: 21
Joined: Sun Jul 23, 2017 11:48 pm

Re: ESP32 TFT display library

Postby kearins » Thu Sep 14, 2017 6:11 pm

AAAwen wrote: But, I can't execute "make flashfs" and "make makefs"
Can you help me fix the error? Thank you! :?
Have you got environment variable OS? Run the command:

Code: Select all

set OS
What value will be shown on the screen?

AAAwen
Posts: 15
Joined: Fri Sep 08, 2017 6:00 am

Re: ESP32 TFT display library

Postby AAAwen » Fri Sep 15, 2017 9:15 am

Hi,kearins:
The issues were solved when I updated the toolchain. Thanks a lot for your due attention to my post.
到官网更新toolchain后这个问题得以解决

kearins
Posts: 21
Joined: Sun Jul 23, 2017 11:48 pm

Re: ESP32 TFT display library

Postby kearins » Wed Sep 27, 2017 7:43 am

loboris,
the library does not print text by TFT_print() in esp-idf commits 845c3fb (22 sep 2017) and 050ae50 (08 sep 2017). Also there are some artefacts on screen. It looks like DMA transfer does not work correctly.

The esp-idf commit with which the library works fine is 5539bfb (07 aug 2017)

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: ESP32 TFT display library

Postby loboris » Wed Sep 27, 2017 8:05 am

kearins wrote:loboris,
the library does not print text by TFT_print() in esp-idf commits 845c3fb (22 sep 2017) and 050ae50 (08 sep 2017). Also there are some artefacts on screen. It looks like DMA transfer does not work correctly.

The esp-idf commit with which the library works fine is 5539bfb (07 aug 2017)
I have the fix for that issue ready, it will be pushed today or tomorrow.

Who is online

Users browsing this forum: No registered users and 96 guests