GithubHelp home page GithubHelp logo

loboris / esp32_tft_library Goto Github PK

View Code? Open in Web Editor NEW
553.0 31.0 219.0 25.22 MB

Full featured TFT library for ESP32 with demo application

Makefile 0.28% C++ 15.05% C 84.66%
esp32 tft display ili9341 ili9488 library demo esp-wrover-kit

esp32_tft_library's Introduction

TFT library for ESP32


This library must be built with the latest esp-idf master branch and xtensa toolchain

If you are using the esp-idf v2.1, checkout the commit 0518df81a6566820352dad7bf6c539995d41ad18


Features

  • Full support for ILI9341, ILI9488, ST7789V and ST7735 based TFT modules in 4-wire SPI mode. Support for other controllers will be added later

  • 18-bit (RGB) color mode used

  • SPI displays oriented SPI driver library based on spi-master driver

  • Combined DMA SPI transfer mode and direct SPI for maximal speed

  • Grayscale mode can be selected during runtime which converts all colors to gray scale

  • SPI speeds up to 40 MHz are tested and works without problems

  • Demo application included which demonstrates most of the library features

  • Graphics drawing functions:

    • TFT_drawPixel Draw pixel at given x,y coordinates
    • TFT_drawLine Draw line between two points
    • TFT_drawFastVLine, TFT_drawFastHLine Draw vertical or horizontal line of given lenght
    • TFT_drawLineByAngle Draw line on screen from (x,y) point at given angle
    • TFT_drawRect, TFT_fillRect Draw rectangle on screen or fill given rectangular screen region with color
    • TFT_drawRoundRect, TFT_fillRoundRect Draw rectangle on screen or fill given rectangular screen region with color with rounded corners
    • TFT_drawCircle, TFT_fillCircle Draw or fill circle on screen
    • TFT_drawEllipse, TFT_fillEllipse Draw or fill ellipse on screen
    • TFT_drawTriangel, TFT_fillTriangle Draw or fill triangle on screen
    • TFT_drawArc Draw circle arc on screen, from ~ to given angles, with given thickness. Can be outlined with different color
    • TFT_drawPolygon Draw poligon on screen with given number of sides (3~60). Can be outlined with different color and rotated by given angle.
  • Fonts:

    • fixed width and proportional fonts are supported; 8 fonts embeded
    • unlimited number of fonts from file
    • 7-segment vector font with variable width/height is included (only numbers and few characters)
    • Proportional fonts can be used in fixed width mode.
    • Related functions:
      • TFT_setFont Set current font from one of embeded fonts or font file
      • TFT_getfontsize Returns current font height & width in pixels.
      • TFT_getfontheight Returns current font height in pixels.
      • set_7seg_font_atrib Set atributes for 7 segment vector font
      • getFontCharacters Get all font's characters to buffer
  • String write function:

    • TFT_print Write text to display.
      • Strings can be printed at any angle. Rotation of the displayed text depends on font_ratate variable (0~360)
      • if font_transparent variable is set to 1, no background pixels will be printed
      • If the text does not fit the screen/window width it will be clipped ( if text_wrap=0 ), or continued on next line ( if text_wrap=1 )
      • Two special characters are allowed in strings: \r CR (0x0D), clears the display to EOL, \n LF (ox0A), continues to the new line, x=0
      • Special values can be entered for X position:
        • CENTER centers the text
        • RIGHT right justifies the text horizontaly
        • LASTX continues from last X position; offset can be used: LASTX+n
      • Special values can be entered for Y:
        • CENTER centers the text verticaly
        • BOTTOM bottom justifies the text
        • LASTY continues from last Y position; offset can be used: LASTY+n
    • TFT_getStringWidth Returns the string width in pixels based on current font characteristics. Useful for positioning strings on the screen.
    • TFT_clearStringRect Fills the rectangle occupied by string with current background color
  • Images:

    • TFT_jpg_image Decodes and displays JPG images
      • Limits:
        • Baseline only. Progressive and Lossless JPEG format are not supported.
        • Image size: Up to 65520 x 65520 pixels
        • Color space: YCbCr three components only. Gray scale image is not supported.
        • Sampling factor: 4:4:4, 4:2:2 or 4:2:0.
      • Can display the image from file or memory buffer
      • Image can be scaled by factor 0 ~ 3 (1/1, 1/2, 1/4 or 1/8)
      • Image is displayed from X,Y position on screen/window:
        • X: image left position; constants CENTER & RIGHT can be used; negative value is accepted
        • Y: image top position; constants CENTER & BOTTOM can be used; negative value is accepted
    • TFT_bmp_image Decodes and displays BMP images
      • Only uncompressed RGB 24-bit with no color space information BMP images can be displayed
      • Can display the image from file or memory buffer
      • Image can be scaled by factor 0 ~ 7; if scale>0, image is scaled by factor 1/(scale+1)
      • Image is displayed from X,Y position on screen/window:
        • X: image left position; constants CENTER & RIGHT can be used; negative value is accepted
        • Y: image top position; constants CENTER & BOTTOM can be used; negative value is accepted
  • Window functions:

    • Drawing on screen can be limited to rectangular window, smaller than the full display dimensions
    • When defined, all graphics, text and image coordinates are translated to window coordinates
    • Related functions
      • TFT_setclipwin Sets the window area coordinates
      • TFT_resetclipwin Reset the window to full screen dimensions
      • TFT_saveClipWin Save current window to temporary variable
      • TFT_restoreClipWin Restore current window from temporary variable
      • TFT_fillWindow Fill window area with color
  • Touch screen supported (for now only XPT2046 controllers)

    • TFT_read_touch Detect if touched and return X,Y coordinates. Raw touch screen or calibrated values can be returned.
      • calibrated coordinates are adjusted for screen orientation.
  • Read from display memory supported

    • TFT_readPixel Read pixel color value from display GRAM at given x,y coordinates.
    • TFT_readData Read color data from rectangular screen area
  • Other display functions:

    • TFT_fillScreen Fill the whole screen with color
    • TFT_setRotation Set screen rotation; PORTRAIT, PORTRAIT_FLIP, LANDSCAPE and LANDSCAPE_FLIP are supported
    • TFT_invertDisplay Set inverted/normal colors
    • TFT_compare_colors Compare two color structures
    • disp_select() Activate display's CS line
    • disp_deselect() Deactivate display's CS line
    • find_rd_speed() Find maximum spi clock for successful read from display RAM
    • TFT_display_init() Perform display initialization sequence. Sets orientation to landscape; clears the screen. SPI interface must already be setup, tft_disp_type, _width, _height variables must be set.
    • HSBtoRGB Converts the components of a color, as specified by the HSB model to an equivalent set of values for the default RGB model.
    • TFT_setGammaCurve() Select one of 4 Gamma curves
  • compile_font_file Function which compiles font c source file to font file which can be used in TFT_setFont() function to select external font. Created file have the same name as source file and extension .fnt

  • Global wariables

    • orientation current screen orientation
    • font_ratate current font rotate angle (0~395)
    • font_transparent if not 0 draw fonts transparent
    • font_forceFixed if not zero force drawing proportional fonts with fixed width
    • text_wrap if not 0 wrap long text to the new line, else clip
    • _fg current foreground color for fonts
    • _bg current background for non transparent fonts
    • dispWin current display clip window
    • _angleOffset angle offset for arc, polygon and line by angle functions
    • image_debug print debug messages during image decode if set to 1
    • cfont Currently used font structure
    • TFT_X X position of the next character after TFT_print() function
    • TFT_Y Y position of the next character after TFT_print() function
    • tp_calx touch screen X calibration constant
    • tp_caly touch screen Y calibration constant
    • gray_scale convert all colors to gray scale if set to 1
    • max_rdclock current spi clock for reading from display RAM
    • _width screen width (smaller dimension) in pixels
    • _height screen height (larger dimension) in pixels
    • tft_disp_type current display type (DISP_TYPE_ILI9488 or DISP_TYPE_ILI9341)

Full functions syntax and descriptions can be found in tft.h and tftspi.h files.

Full demo application, well documented, is included, please analyze it to learn how to use the library functions.


Connecting the display

ESP32 pin Display module Notes
Any output pin MOSI SPI input on Display module
Any pin MISO SPI output from Display module, optional
Any output pin SCK SPI clock input on Display module
Any output pin CS SPI CS input on Display module
Any output pin DC DC (data/command) input on Display module
Any output pin TCS Touch pannel CS input (if touch panel is used
Any output pin RST optional, reset input of the display module, if not used pullup the reset input to Vcc
Any output pin BL optional, backlight input of the display module, if not used connect to +3.3V (or +5V)
GND GND Power supply ground
3.3V or +5V Vcc Power supply positive

Make shure the display module has 3.3V compatible interface, if not you must use level shifter!


To run the demo, attach ILI9341, ILI9488 or ST7735 based display module to ESP32. Default pins used are:

  • mosi: 23
  • miso: 19
  • sck: 18
  • CS: 5 (display CS)
  • DC: 26 (display DC)
  • TCS: 25 (touch screen CS)

To run the demo on ESP-WROWER-KIT v3 select the following pin configuration:

  • mosi: 23
  • miso: 25
  • sck: 19
  • CS: 22 (display CS)
  • DC: 21 (display DC)
  • TCS: 0 (touch screen CS), not used
  • RST: 18 (display RESET)
  • BKLIT: 5 (Display Back light)

Also set TFT_RGB_BGR to 0x00 and TFT_INVERT_ROTATION1 to 1 in tftspi.h

You can also select EXAMPLE_ESP_WROVER_KIT in menuconfig to automaticaly define correct configuration


If you want to use different pins, change them in tftspi.h

if you want to use the touch screen functions, set #define USE_TOUCH 1 in tftspi.h

Using make menuconfig select tick rate 1000 ( → Component config → FreeRTOS → Tick rate (Hz) ) to get more accurate timings


How to build

Configure your esp32 build environment as for esp-idf examples

Clone the repository

git clone https://github.com/loboris/ESP32_TFT_library.git

Execute menuconfig and configure your Serial flash config and other settings. Included sdkconfig.defaults sets some defaults to be used.

Navigate to TFT Display DEMO Configuration and set SPIFFS options.

Select if you want to use wifi (recommended) to get the time from NTP server and set your WiFi SSID and password.

make menuconfig

Make and flash the example.

make all && make flash


Prepare SPIFFS image

The demo uses some image and font files and it is necessary to flash the spiffs image

To flash already prepared image to flash execute:

make copyfs


You can also prepare different SFPIFFS image and flash it to ESP32. This feature is only tested on Linux.

Files to be included on spiffs are already in components/spiffs_image/image/ directory. You can add or remove the files you want to include.

Then execute:

make makefs

to create spiffs image in build directory without flashing to ESP32

Or execute:

make flashfs

to create spiffs image in build directory and flash it to ESP32



Example output:


I (0) cpu_start: App cpu up.
I (312) heap_init: Initializing. RAM available for dynamic allocation:
I (319) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (325) heap_init: At 3FFBB0B8 len 00024F48 (147 KiB): DRAM
I (331) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (338) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (344) heap_init: At 40091F94 len 0000E06C (56 KiB): IRAM
I (350) cpu_start: Pro cpu start user code
I (144) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.

==============================
TFT display DEMO, LoBo 09/2017
==============================

SPI: display device added to spi bus (2)
SPI: attached display device, speed=8000000
SPI: bus uses native pins: false
SPI: display init...
OK
SPI: Changed speed to 26666666

---------------------
Graphics demo started
---------------------
I (2815) [TFT Demo]: Time is not set yet. Connecting to WiFi and getting time over NTP.
I (2845) wifi: wifi firmware version: ee52423
I (2846) wifi: config NVS flash: enabled
I (2846) wifi: config nano formating: disabled
I (2846) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (2856) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (2890) wifi: Init dynamic tx buffer num: 32
I (2890) wifi: Init data frame dynamic rx buffer num: 32
I (2890) wifi: Init management frame dynamic rx buffer num: 32
I (2894) wifi: wifi driver task: 3ffc83d8, prio:23, stack:4096
I (2899) wifi: Init static rx buffer num: 10
I (2903) wifi: Init dynamic rx buffer num: 32
I (2907) wifi: Init rx ampdu len mblock:7
I (2911) wifi: Init lldesc rx ampdu entry mblock:4
I (2916) wifi: wifi power manager task: 0x3ffcd844 prio: 21 stack: 2560
I (2922) [TFT Demo]: Setting WiFi configuration SSID LoBoInternet...
I (2951) phy: phy_version: 359.0, e79c19d, Aug 31 2017, 17:06:07, 0, 0
I (2951) wifi: mode : sta (24:0a:c4:11:a4:0c)
I (3073) wifi: n:11 0, o:1 0, ap:255 255, sta:11 0, prof:1
I (3731) wifi: state: init -> auth (b0)
I (3734) wifi: state: auth -> assoc (0)
I (3738) wifi: state: assoc -> run (10)
I (3776) wifi: connected with LoBoInternet, channel 11
I (5827) event: ip: 192.168.0.21, mask: 255.255.255.0, gw: 192.168.0.1
I (5828) [TFT Demo]: Initializing SNTP
I (6331) [TFT Demo]: System time is set.
I (6331) wifi: state: run -> init (0)
I (6332) wifi: n:11 0, o:11 0, ap:255 255, sta:11 0, prof:1
I (6344) wifi: flush txq
I (6344) wifi: stop sw txq
I (6344) wifi: lmac stop hw txq
E (6344) wifi: esp_wifi_connect 836 wifi not start


I (8441) [SPIFFS]: Registering SPIFFS file system
I (8441) [SPIFFS]: Mounting SPIFFS files system
I (8441) [SPIFFS]: Start address: 0x280000; Size 1024 KB
I (8447) [SPIFFS]:   Work buffer: 2048 B
I (8451) [SPIFFS]:    FDS buffer: 384 B
I (8456) [SPIFFS]:    Cache size: 2048 B
I (8500) [SPIFFS]: Mounted

==========================================
Display: ILI9488: PORTRAIT 240,320 Color

     Clear screen time: 60 ms
Send color buffer time: 228 us (240 pixels)
       JPG Decode time: 287 ms
    BMP time, scale: 5: 422 ms
    BMP time, scale: 4: 431 ms
    BMP time, scale: 3: 430 ms
    BMP time, scale: 2: 434 ms
    BMP time, scale: 1: 442 ms
    BMP time, scale: 0: 335 ms

==========================================
Display: ILI9488: LANDSCAPE 320,240 Color

     Clear screen time: 57 ms
Send color buffer time: 301 us (320 pixels)
I (126333) event: station ip lost
       JPG Decode time: 286 ms
    BMP time, scale: 5: 422 ms
    BMP time, scale: 4: 431 ms
    BMP time, scale: 3: 433 ms
    BMP time, scale: 2: 435 ms
    BMP time, scale: 1: 444 ms
    BMP time, scale: 0: 260 ms

==========================================
Display: ILI9488: PORTRAIT FLIP 240,320 Color

     Clear screen time: 60 ms
Send color buffer time: 228 us (240 pixels)
       JPG Decode time: 287 ms
    BMP time, scale: 5: 420 ms
    BMP time, scale: 4: 430 ms
    BMP time, scale: 3: 429 ms
    BMP time, scale: 2: 436 ms
    BMP time, scale: 1: 446 ms
    BMP time, scale: 0: 338 ms

==========================================
Display: ILI9488: PORTRAIT FLIP 240,320 Color

     Clear screen time: 60 ms
Send color buffer time: 228 us (240 pixels)
       JPG Decode time: 287 ms
    BMP time, scale: 5: 420 ms
    BMP time, scale: 4: 430 ms
    BMP time, scale: 3: 429 ms
    BMP time, scale: 2: 436 ms
    BMP time, scale: 1: 446 ms
    BMP time, scale: 0: 338 ms



Tested on

ESP32-WROVER-KIT v3, ST7789V controller, 240x320 Tested on

2.4" 240x320 ILI9341 conroller with Touch panel from eBay Tested on

3.5" 320x480 ILI9844 controller with Touch panel from BuyDisplay Tested on

1.8" 128x160 ST7735 conroller from eBay Tested on

esp32_tft_library's People

Contributors

0x1abin avatar loboris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp32_tft_library's Issues

How to convert jpg images to correct format?

The test images load fine for me, but when I add my own jpg images they are not displayed.

I'm using photoshop and opened test1.jpg and did a save-as jpg. I set "Baseline (standard)" and quality 100%. I named it test1-1.jpg.

Then I did make makefs and make copyfs. Both ran fine.

I can see test1.jpg, but not my new test1-1.jpg. I think it has to be something in the compression or formatting, but I'm not sure how to convert my existing jpg's to the correct format.

Any help is greatly appreciated!

Request for timezone setting

Hi, this is just what I was looking for to test my new ESP32-WRover but I was puzzled by the time error when using the wifi NTP option. Anyway, I've altered the code to match my timezone and its ok now but wondered if it was worth having an option in the menuconfig?

Running SD and TFT on different SPI bus simultaneously.

I'm trying to use ST7735 TFT and the on board SD card of the ST7735 simultaneously. TFT uses the HSPI and SD uses the VSPI .
My application is such that the Esp32 gets the data through BLE. I'm using freertos such that it stores the data in SD card in one task and displays it on TFT in the other task, both have the same task priority .
But when I execute this I get the following error : https://ibb.co/b1mbMy
It keeps on resseting it self.
When I change the SPI bus , i mean change TFT bus to VSPI and SD card bus to HSPI, then only the SD card works and tft doesn't display anything though it intialises without any error.

My pin cofigurations are :

SD CARD :
#define sdPIN_NUM_MISO 27
#define sdPIN_NUM_MOSI 12
#define sdPIN_NUM_CLK 14
#define sdPIN_NUM_CS 13

TFT ST7735 :
#define PIN_NUM_MISO 19 // SPI MISO
#define PIN_NUM_MOSI 23 // SPI MOSI
#define PIN_NUM_CLK 18 // SPI CLOCK pin
#define PIN_NUM_CS 15 // Display CS pin
#define PIN_NUM_DC 2 // Display command/data pin
#define PIN_NUM_RST 4 // GPIO used for RESET control

opaque mode is not fully opaque

There is a problemed code in the following function:

static int printProportionalChar(int x, int y) {
	...
	if ((font_buffered_char) && (!font_transparent)) {
		<problemed code>
	}
	...
}

By default

font_transparent=0; //means 'no transparency' or simply 'opaque'
font_buffered_char=1;

So we go directly to the problemed code which prints a symbol on screen. The symbol is really opaque. But there is 1 pixel space between symbols. This space is leaved transparent. To temporarily avoid the problem, I set

font_buffered_char=0;

But buffered mode seems to be much faster. Please pay attention on this code to make 1-pixel space opaque too.

Missing component.mk in spiffs_image

make copyfs fails. I copied component.mk from the spidirver directory to the spiffs_image directory, and then make copyfs worked fine.

Great library. Thanks.

Benjy

how to load new jpg images through OTA?

Hello,

first thanks for this great work! I am now looking for updating the design (jpg in SPIFFS partition) via an OTA, but I really don't know how to manage it? I guess I should convert the files directly into an understandable hex package and save it directly in the .bin file I download? But I am afraid the memory will be greatly affected.
Do you know same case or do you have some ideas to make it easier?

Thanks and regards!

JPEG and BMP not shown in demo

JPEG and BMP do not display on ESP-WROVER-KIT. All other functions display correctly.

make clean & make erase_flash -> make all & make flashfs -> make flash monitor

Built with latest esp-idf (as of 12/7/2017) and xtensa (1.22.0-75-gbaf03c2-5.2.0)

////MONITOR OUTPUT
MONITOR
--- idf_monitor on /dev/ttyUSB1 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3e (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5728
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:13816
entry 0x4007903c
I (74) boot: Detected ESP32
I (34) boot: ESP-IDF v3.0-dev-1411-g7e3ac347 2nd stage bootloader
I (34) boot: compile time 22:00:31
I (37) boot: Enabling RNG early entropy source...
I (40) boot: SPI Speed : 40MHz
I (44) boot: SPI Mode : DIO
I (48) boot: SPI Flash Size : 4MB
I (52) boot: Partition Table:
I (56) boot: ## Label Usage Type ST Offset Length
I (63) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (70) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (78) boot: 2 factory factory app 00 00 00010000 00100000
I (85) boot: 3 storage Unknown data 01 82 00180000 00100000
I (93) boot: End of partition table
I (97) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0b510 ( 46352) map
I (122) esp_image: segment 1: paddr=0x0001b538 vaddr=0x3ffb0000 size=0x04ad8 ( 19160) load
I (130) esp_image: segment 2: paddr=0x00020018 vaddr=0x400d0018 size=0x22348 (140104) map
0x400d0018: _stext at ??:?

I (179) esp_image: segment 3: paddr=0x00042368 vaddr=0x3ffb4ad8 size=0x005c4 ( 1476) load
I (180) esp_image: segment 4: paddr=0x00042934 vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _iram_start at /home/metzingerd/esp/esp-idf/components/freertos/./xtensa_vectors.S:1685

I (186) esp_image: segment 5: paddr=0x00042d3c vaddr=0x40080400 size=0x0a51c ( 42268) load
I (212) esp_image: segment 6: paddr=0x0004d260 vaddr=0x400c0000 size=0x00000 ( 0) load
I (219) boot: Loaded app from partition at offset 0x10000
I (219) boot: Disabling RNG early entropy source...
I (221) cpu_start: Pro cpu up.
I (225) cpu_start: Starting app cpu, entry point is 0x40080ea8
0x40080ea8: call_start_cpu1 at /home/metzingerd/esp/esp-idf/components/esp32/./cpu_start.c:222

I (0) cpu_start: App cpu up.
I (236) heap_init: Initializing. RAM available for dynamic allocation:
I (242) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (248) heap_init: At 3FFB5A08 len 0002A5F8 (169 KiB): DRAM
I (255) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (261) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (267) heap_init: At 4008A91C len 000156E4 (85 KiB): IRAM
I (273) cpu_start: Pro cpu start user code
I (68) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.

==============================
TFT display DEMO, LoBo 11/2017

Pins used: miso=25, mosi=23, sck=19, cs=22

SPI: display device added to spi bus (1)
SPI: attached display device, speed=8000000
SPI: bus uses native pins: false
SPI: display init...
OK
SPI: Max rd speed = 8000000
SPI: Changed speed to 26666666


Graphics demo started

I (2748) [SPIFFS]: Registering SPIFFS file system
I (2748) [SPIFFS]: Mounting SPIFFS files system
I (2748) [SPIFFS]: Start address: 0x180000; Size 1024 KB
I (2753) [SPIFFS]: Work buffer: 2048 B
I (2758) [SPIFFS]: FDS buffer: 384 B
I (2763) [SPIFFS]: Cache size: 2048 B
W (2768) [SPIFFS]: No file system detected, formating...
I (10201) [SPIFFS]: Mounted

==========================================
Display: ST7789V: PORTRAIT 240,320 Color

 Clear screen time: 60 ms

Send color buffer time: 230 us (240 pixels)
JPG Decode time: 52 ms
BMP time, scale: 5: 53 ms
BMP time, scale: 4: 51 ms
BMP time, scale: 3: 52 ms
BMP time, scale: 2: 52 ms
BMP time, scale: 1: 52 ms
BMP time, scale: 0: 52 ms
////MONITOR OUTPUT

sdkconfig

#
# Automatically generated file; DO NOT EDIT.
# Espressif IoT Development Framework Configuration
#

#
# SDK tool configuration
#
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_PYTHON="python"
CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y

#
# Bootloader config
#
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=
CONFIG_LOG_BOOTLOADER_LEVEL_ERROR=
CONFIG_LOG_BOOTLOADER_LEVEL_WARN=
CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y
CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG=
CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE=
CONFIG_LOG_BOOTLOADER_LEVEL=3
CONFIG_BOOTLOADER_VDDSDIO_BOOST=y

#
# Security features
#
CONFIG_SECURE_BOOT_ENABLED=
CONFIG_FLASH_ENCRYPTION_ENABLED=

#
# Serial flasher config
#
CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB1"
CONFIG_ESPTOOLPY_BAUD_115200B=y
CONFIG_ESPTOOLPY_BAUD_230400B=
CONFIG_ESPTOOLPY_BAUD_921600B=
CONFIG_ESPTOOLPY_BAUD_2MB=
CONFIG_ESPTOOLPY_BAUD_OTHER=
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_BAUD=115200
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_FLASHMODE_QIO=
CONFIG_FLASHMODE_QOUT=
CONFIG_FLASHMODE_DIO=y
CONFIG_FLASHMODE_DOUT=
CONFIG_ESPTOOLPY_FLASHMODE="dio"
CONFIG_ESPTOOLPY_FLASHFREQ_80M=
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ_26M=
CONFIG_ESPTOOLPY_FLASHFREQ_20M=
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
CONFIG_ESPTOOLPY_BEFORE_RESET=y
CONFIG_ESPTOOLPY_BEFORE_NORESET=
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_RESET=y
CONFIG_ESPTOOLPY_AFTER_NORESET=
CONFIG_ESPTOOLPY_AFTER="hard_reset"
CONFIG_MONITOR_BAUD_9600B=
CONFIG_MONITOR_BAUD_57600B=
CONFIG_MONITOR_BAUD_115200B=y
CONFIG_MONITOR_BAUD_230400B=
CONFIG_MONITOR_BAUD_921600B=
CONFIG_MONITOR_BAUD_2MB=
CONFIG_MONITOR_BAUD_OTHER=
CONFIG_MONITOR_BAUD_OTHER_VAL=115200
CONFIG_MONITOR_BAUD=115200

#
# TFT Display DEMO Configuration
#
CONFIG_SPIFFS_BASE_ADDR=180000
CONFIG_SPIFFS_SIZE=1048576
CONFIG_SPIFFS_LOG_BLOCK_SIZE=8192
CONFIG_SPIFFS_LOG_PAGE_SIZE=256
CONFIG_EXAMPLE_DISPLAY_TYPE=1
CONFIG_EXAMPLE_DISPLAY_TYPE0=
CONFIG_EXAMPLE_DISPLAY_TYPE1=y
CONFIG_EXAMPLE_DISPLAY_TYPE2=
CONFIG_EXAMPLE_USE_WIFI=

#
# Partition Table
#
CONFIG_PARTITION_TABLE_SINGLE_APP=
CONFIG_PARTITION_TABLE_TWO_OTA=
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_example.csv"
CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000
CONFIG_PARTITION_TABLE_FILENAME="partitions_example.csv"
CONFIG_APP_OFFSET=0x10000

#
# Compiler options
#
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
CONFIG_OPTIMIZATION_LEVEL_RELEASE=
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=
CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED=
CONFIG_CXX_EXCEPTIONS=
CONFIG_STACK_CHECK_NONE=y
CONFIG_STACK_CHECK_NORM=
CONFIG_STACK_CHECK_STRONG=
CONFIG_STACK_CHECK_ALL=
CONFIG_STACK_CHECK=

#
# Component config
#

#
# Application Level Tracing
#
CONFIG_ESP32_APPTRACE_DEST_TRAX=
CONFIG_ESP32_APPTRACE_DEST_NONE=y
CONFIG_ESP32_APPTRACE_ENABLE=
CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y

#
# FreeRTOS SystemView Tracing
#
CONFIG_AWS_IOT_SDK=

#
# Bluetooth
#
CONFIG_BT_ENABLED=
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
CONFIG_BT_RESERVE_DRAM=0

#
# ESP32-specific
#
CONFIG_ESP32_DEFAULT_CPU_FREQ_80=
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
CONFIG_MEMMAP_SMP=y
CONFIG_SPIRAM_SUPPORT=
CONFIG_MEMMAP_TRACEMEM=
CONFIG_MEMMAP_TRACEMEM_TWOBANKS=
CONFIG_ESP32_TRAX=
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=
CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
CONFIG_ESP32_ENABLE_COREDUMP=
CONFIG_TWO_UNIVERSAL_MAC_ADDRESS=
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4
CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048
CONFIG_MAIN_TASK_STACK_SIZE=8192
CONFIG_IPC_TASK_STACK_SIZE=1024
CONFIG_TIMER_TASK_STACK_SIZE=3584
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF=
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR=
CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF=
CONFIG_NEWLIB_STDIN_LINE_ENDING_LF=
CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
CONFIG_NEWLIB_NANO_FORMAT=
CONFIG_CONSOLE_UART_DEFAULT=y
CONFIG_CONSOLE_UART_CUSTOM=
CONFIG_CONSOLE_UART_NONE=
CONFIG_CONSOLE_UART_NUM=0
CONFIG_CONSOLE_UART_BAUDRATE=115200
CONFIG_ULP_COPROC_ENABLED=
CONFIG_ULP_COPROC_RESERVE_MEM=0
CONFIG_ESP32_PANIC_PRINT_HALT=y
CONFIG_ESP32_PANIC_PRINT_REBOOT=
CONFIG_ESP32_PANIC_SILENT_REBOOT=
CONFIG_ESP32_PANIC_GDBSTUB=
CONFIG_ESP32_DEBUG_OCDAWARE=y
CONFIG_INT_WDT=y
CONFIG_INT_WDT_TIMEOUT_MS=300
CONFIG_INT_WDT_CHECK_CPU1=y
CONFIG_TASK_WDT=y
CONFIG_TASK_WDT_PANIC=
CONFIG_TASK_WDT_TIMEOUT_S=20
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
CONFIG_BROWNOUT_DET=y
CONFIG_BROWNOUT_DET_LVL_SEL_0=y
CONFIG_BROWNOUT_DET_LVL_SEL_1=
CONFIG_BROWNOUT_DET_LVL_SEL_2=
CONFIG_BROWNOUT_DET_LVL_SEL_3=
CONFIG_BROWNOUT_DET_LVL_SEL_4=
CONFIG_BROWNOUT_DET_LVL_SEL_5=
CONFIG_BROWNOUT_DET_LVL_SEL_6=
CONFIG_BROWNOUT_DET_LVL_SEL_7=
CONFIG_BROWNOUT_DET_LVL=0
CONFIG_ESP32_TIME_SYSCALL_USE_RTC=
CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y
CONFIG_ESP32_TIME_SYSCALL_USE_FRC1=
CONFIG_ESP32_TIME_SYSCALL_USE_NONE=
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL=
CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000
CONFIG_ESP32_XTAL_FREQ_40=y
CONFIG_ESP32_XTAL_FREQ_26=
CONFIG_ESP32_XTAL_FREQ_AUTO=
CONFIG_ESP32_XTAL_FREQ=40
CONFIG_DISABLE_BASIC_ROM_CONSOLE=
CONFIG_NO_BLOBS=
CONFIG_ESP_TIMER_PROFILING=

#
# Wi-Fi
#
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y
CONFIG_ESP32_WIFI_TX_BA_WIN=6
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=6
CONFIG_ESP32_WIFI_NVS_ENABLED=y

#
# PHY
#
CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION=
CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
CONFIG_ESP32_PHY_MAX_TX_POWER=20

#
# Power Management
#
CONFIG_PM_ENABLE=

#
# Ethernet
#
CONFIG_DMA_RX_BUF_NUM=10
CONFIG_DMA_TX_BUF_NUM=10
CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE=
CONFIG_EMAC_TASK_PRIORITY=20

#
# FAT Filesystem support
#
CONFIG_FATFS_CODEPAGE_DYNAMIC=
CONFIG_FATFS_CODEPAGE_437=y
CONFIG_FATFS_CODEPAGE_720=
CONFIG_FATFS_CODEPAGE_737=
CONFIG_FATFS_CODEPAGE_771=
CONFIG_FATFS_CODEPAGE_775=
CONFIG_FATFS_CODEPAGE_850=
CONFIG_FATFS_CODEPAGE_852=
CONFIG_FATFS_CODEPAGE_855=
CONFIG_FATFS_CODEPAGE_857=
CONFIG_FATFS_CODEPAGE_860=
CONFIG_FATFS_CODEPAGE_861=
CONFIG_FATFS_CODEPAGE_862=
CONFIG_FATFS_CODEPAGE_863=
CONFIG_FATFS_CODEPAGE_864=
CONFIG_FATFS_CODEPAGE_865=
CONFIG_FATFS_CODEPAGE_866=
CONFIG_FATFS_CODEPAGE_869=
CONFIG_FATFS_CODEPAGE_932=
CONFIG_FATFS_CODEPAGE_936=
CONFIG_FATFS_CODEPAGE_949=
CONFIG_FATFS_CODEPAGE_950=
CONFIG_FATFS_CODEPAGE=437
CONFIG_FATFS_LFN_NONE=y
CONFIG_FATFS_LFN_HEAP=
CONFIG_FATFS_LFN_STACK=
CONFIG_FATFS_FS_LOCK=0
CONFIG_FATFS_TIMEOUT_MS=10000
CONFIG_FATFS_PER_FILE_CACHE=y

#
# FreeRTOS
#
CONFIG_FREERTOS_UNICORE=
CONFIG_FREERTOS_CORETIMER_0=y
CONFIG_FREERTOS_CORETIMER_1=
CONFIG_FREERTOS_HZ=1000
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE=
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=
CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y
CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1
CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE=
CONFIG_FREERTOS_ASSERT_DISABLE=
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024
CONFIG_FREERTOS_ISR_STACKSIZE=1536
CONFIG_FREERTOS_LEGACY_HOOKS=
CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16
CONFIG_SUPPORT_STATIC_ALLOCATION=
CONFIG_TIMER_TASK_PRIORITY=1
CONFIG_TIMER_TASK_STACK_DEPTH=2048
CONFIG_TIMER_QUEUE_LENGTH=10
CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
CONFIG_FREERTOS_USE_TRACE_FACILITY=
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=
CONFIG_FREERTOS_DEBUG_INTERNALS=

#
# Heap memory debugging
#
CONFIG_HEAP_POISONING_DISABLED=y
CONFIG_HEAP_POISONING_LIGHT=
CONFIG_HEAP_POISONING_COMPREHENSIVE=
CONFIG_HEAP_TRACING=

#
# libsodium
#
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y

#
# Log output
#
CONFIG_LOG_DEFAULT_LEVEL_NONE=
CONFIG_LOG_DEFAULT_LEVEL_ERROR=
CONFIG_LOG_DEFAULT_LEVEL_WARN=
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_COLORS=y

#
# LWIP
#
CONFIG_L2_TO_L3_COPY=
CONFIG_LWIP_MAX_SOCKETS=10
CONFIG_LWIP_SO_REUSE=y
CONFIG_LWIP_SO_REUSE_RXTOALL=y
CONFIG_LWIP_SO_RCVBUF=
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
CONFIG_LWIP_IP_FRAG=
CONFIG_LWIP_IP_REASSEMBLY=
CONFIG_LWIP_STATS=
CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y
CONFIG_TCPIP_RECVMBOX_SIZE=32
CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y

#
# DHCP server
#
CONFIG_LWIP_DHCPS_LEASE_UNIT=60
CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8
CONFIG_LWIP_AUTOIP=
CONFIG_LWIP_NETIF_LOOPBACK=y
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8

#
# TCP
#
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_TCP_MAXRTX=12
CONFIG_TCP_SYNMAXRTX=6
CONFIG_TCP_MSS=1436
CONFIG_TCP_MSL=60000
CONFIG_TCP_SND_BUF_DEFAULT=5744
CONFIG_TCP_WND_DEFAULT=5744
CONFIG_TCP_RECVMBOX_SIZE=6
CONFIG_TCP_QUEUE_OOSEQ=y
CONFIG_TCP_OVERSIZE_MSS=y
CONFIG_TCP_OVERSIZE_QUARTER_MSS=
CONFIG_TCP_OVERSIZE_DISABLE=

#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_UDP_RECVMBOX_SIZE=6
CONFIG_TCPIP_TASK_STACK_SIZE=2048
CONFIG_PPP_SUPPORT=

#
# ICMP
#
CONFIG_LWIP_MULTICAST_PING=
CONFIG_LWIP_BROADCAST_PING=

#
# LWIP RAW API
#
CONFIG_LWIP_MAX_RAW_PCBS=16

#
# mbedTLS
#
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
CONFIG_MBEDTLS_DEBUG=
CONFIG_MBEDTLS_HARDWARE_AES=y
CONFIG_MBEDTLS_HARDWARE_MPI=
CONFIG_MBEDTLS_HARDWARE_SHA=
CONFIG_MBEDTLS_HAVE_TIME=y
CONFIG_MBEDTLS_HAVE_TIME_DATE=
CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y
CONFIG_MBEDTLS_TLS_SERVER_ONLY=
CONFIG_MBEDTLS_TLS_CLIENT_ONLY=
CONFIG_MBEDTLS_TLS_DISABLED=
CONFIG_MBEDTLS_TLS_SERVER=y
CONFIG_MBEDTLS_TLS_CLIENT=y
CONFIG_MBEDTLS_TLS_ENABLED=y

#
# TLS Key Exchange Methods
#
CONFIG_MBEDTLS_PSK_MODES=
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
CONFIG_MBEDTLS_SSL_PROTO_SSL3=
CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
CONFIG_MBEDTLS_SSL_PROTO_DTLS=
CONFIG_MBEDTLS_SSL_ALPN=y
CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y

#
# Symmetric Ciphers
#
CONFIG_MBEDTLS_AES_C=y
CONFIG_MBEDTLS_CAMELLIA_C=
CONFIG_MBEDTLS_DES_C=
CONFIG_MBEDTLS_RC4_DISABLED=y
CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT=
CONFIG_MBEDTLS_RC4_ENABLED=
CONFIG_MBEDTLS_BLOWFISH_C=
CONFIG_MBEDTLS_XTEA_C=
CONFIG_MBEDTLS_CCM_C=y
CONFIG_MBEDTLS_GCM_C=y
CONFIG_MBEDTLS_RIPEMD160_C=

#
# Certificates
#
CONFIG_MBEDTLS_PEM_PARSE_C=y
CONFIG_MBEDTLS_PEM_WRITE_C=y
CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
CONFIG_MBEDTLS_X509_CSR_PARSE_C=y
CONFIG_MBEDTLS_ECP_C=y
CONFIG_MBEDTLS_ECDH_C=y
CONFIG_MBEDTLS_ECDSA_C=y
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
CONFIG_MBEDTLS_ECP_NIST_OPTIM=y

#
# OpenSSL
#
CONFIG_OPENSSL_DEBUG=
CONFIG_OPENSSL_ASSERT_DO_NOTHING=y
CONFIG_OPENSSL_ASSERT_EXIT=

#
# PThreads
#
CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5
CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072

#
# SPI Flash driver
#
CONFIG_SPI_FLASH_VERIFY_WRITE=
CONFIG_SPI_FLASH_ENABLE_COUNTERS=
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS=
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED=

#
# tcpip adapter
#
CONFIG_IP_LOST_TIMER_INTERVAL=120

#
# Wear Levelling
#
CONFIG_WL_SECTOR_SIZE_512=
CONFIG_WL_SECTOR_SIZE_4096=y
CONFIG_WL_SECTOR_SIZE=4096

Please provide some Screenshots

First I would like to thank you for this library.

Currently, I am trying to integrate this library into my project (C++) with some success but the text is not displayed on my display and fillScreen and drawRect does not work properly (i think) or maybe my display is broken which i will try to replace on this weekend.
btw. i dont used the SPIFFS image.

If possible could expand the project with some images that show the expected drawing results of your demo code?

My Hardware: ESP-WROOM32 with ILI9341 Display.

WiFi Initialization Fails. Doesn't connect.

I'm using ESP32_TFT_library on ESP32_Wrover_Kit V3. I was able to Demo TFT Display functionality on the LCD without using WiFi. As a part of next step, I wanted to use WiFi so I followed the steps provided in README and made modifications using make menuconfig. I have provided WiFi SSID and WiFi Password.

I get the following error upon flashing the code.

W (2855) wifi : wifi nvs_open fail ret = 4353
E (2857) wifi : wifi_init 1410 ret = 4353
ESP_ERROR_CHECK failed : esp_err_t 0x1101 at 0x4014bde

CPU halted.

By going through the source code, I wasn't able to figure out what the error code meant. I looked into the following files esp_err.h and esp_wifi.h.

CENTER and RIGHT in clipwin

When I try to use RIGHT inside a clipwin, right align is still done on the full screen, but any character outside the clipwin is not displayed. CENTER also uses the full screen as reference.
Expected behavior would be, that these functions are used relative to the current clipwin.

invalid segment error

Can anybody help me to solve this issue?
If i make copyfs to update images, and after make monitor I get this error message:

zooley@zooley-PC MINGW32 ~/esp32_tft_1
$ make monitor
MONITOR
--- idf_monitor on COM5 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3e (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5800
load:0x40078000,len:0
ho 12 tail 0 room 4
load:0x40078000,len:14000
entry 0x40079008
I (30) boot: ESP-IDF v3.1-dev-661-gf586f5e6 2nd stage bootloader
I (30) boot: compile time 14:50:02
I (32) boot: Enabling RNG early entropy source...
I (36) boot: SPI Speed : 40MHz
I (40) boot: SPI Mode : DIO
I (44) boot: SPI Flash Size : 4MB
I (48) boot: Partition Table:
I (51) boot: ## Label Usage Type ST Offset Length
I (59) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (66) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (74) boot: 2 factory factory app 00 00 00010000 00100000
I (81) boot: 3 storage Unknown data 01 82 00180000 00100000
I (89) boot: End of partition table
I (93) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x163b0 ( 91056) map
I (134) esp_image: segment 1: paddr=0x000263d8 vaddr=0x3ffb0000 size=0x06680 ( 26240) load
E (144) esp_image: invalid segment length 0x92a4e4ca
E (144) boot: Factory app partition is not bootable
E (145) boot: No bootable app partitions in the partition table

user code done

How can I create my own font files?

Hi,

Thanks for this great library! I have donated some beer money for you so you can keep up the good work.

I have seen other comments about being able to use extended ASCII tables to enable åäö and other special symbols.
I guess new font files can be created with the compile_font_file function. Can you provide us with a short description on how to create TFT_Library font files from TTF-files?

load_file_font

First time I've seen a "goto" in code for a long time. Guess what - there a bug!

in component/tft/tft.c

If, for some reason the file size check (or one of the other tests) fails after the file is opened it's essential that the file closed otherwise spiffs quickly runs out of file handles.

adding a close(fhndl) after the exit label helps.

Loading Images from memory

Hi, great library!

I see that's its possible to load a image from memory (not spiffs), do you have an example on how this is done?

How to integrate to a project properly?

Hi,
Can you help me how to integrate it as a component into an ESP-IDF project? I cloned the lib into the components folder but unable to compile the demo app, complaining about missing tft files... If I only merge the components folder into my project I can use it... But that way I need to manually merge the contents of the Kconfig.projbuild too. Not sure which way is the correct one. Thanks

OTA and jpeg image

Hello,

is there a way to save jpeg images into the .bin file? When I do a firmware update through OTA, I am loosing all these images and I don't know how to send them with the new firmware.

Any idea on what could be done?

minor changes to compile in c++ project

tft.h

  1. add extern
// === Color names constants ===
extern const color_t TFT_BLACK;
...
extern const color_t TFT_PINK;

tft.c

  1. esp_heap_alloc_caps.h -> esp_heap_caps.h

tftspi.h

  1. add extern
// ==== Display type, DISP_TYPE_ILI9488 or DISP_TYPE_ILI9341 ====
extern uint8_t tft_disp_type;

spi_master_lobo.h

  1. remove 'struct'
//typedef struct spi_lobo_device_t* spi_lobo_device_handle_t;  ///< Handle for a device on a SPI bus
//typedef struct spi_lobo_host_t* spi_lobo_host_handle_t;
//typedef struct spi_lobo_device_interface_config_t* spi_lobo_device_interface_config_handle_t;
typedef spi_lobo_device_t* spi_lobo_device_handle_t;  ///< Handle for a device on a SPI bus
typedef spi_lobo_host_t* spi_lobo_host_handle_t;
typedef spi_lobo_device_interface_config_t* spi_lobo_device_interface_config_handle_t;

Adafruit HUZZAH32 and TFT FeatherWing with ESP-IDF

Trying to get Adafruit HUZZAH32 and Adafruit TFT FeatherWing work with this library.

Updated tftspi.h with the following
#define PIN_NUM_MISO 19 // SPI MISO
#define PIN_NUM_MOSI 18 // SPI MOSI
#define PIN_NUM_CLK 5 // SPI CLOCK pin

#define PIN_NUM_CS 15 // Display CS pin
#define PIN_NUM_DC 33 // Display command/data pin
#define PIN_NUM_TCS 32 // Touch screen CS pin
#define PIN_NUM_RST 16 // GPIO used for RESET control

But still not working...

I also found this setting... not sure if its correct or needs a change
// Define which spi bus to use VSPI_HOST or HSPI_HOST
#define SPI_BUS VSPI_HOST

Any help to get this library working is highly appreciated.

Feature request

Hello,

Thanks for this perfect library,

I would like to use it as a console logger, with auto-scrolling,

Is it possible ?

Thanks and have a happy new year,
Pascal

TFT_print() problem after TFT_read_touch() call

With TOUCH_TYPE_XPT2046 activated after calling TFT_read_touch() the TFT_print() command shows the first character of the given string crippled, which means the left and right part of that single character are swapped (for example an "O" changes from "()" to ")("), and its foreground color also isn't set correctly.

To get that result insert

  TFT_print("O_Untouched", CENTER, 80);
  vTaskDelay(10000 / portTICK_RATE_MS);

in tft_demo.c after line 996:

  if (TFT_read_touch(&tx, &ty, 0)) {
  ...
  }
  else {
    TFT_print("O_Untouched", CENTER, 80); // added
    vTaskDelay(10000 / portTICK_RATE_MS); // added
    doexit++;

Is there a display reinitialization problem after switching devices (disp_spi -> ts_spi -> disp_spi)?

Nice library, btw!

TIA

Chris

Touch Not Working

Hi;

Device = Lolin 32
Display = ILI9341 + XPT2046/ADS7846 (EastRising ER-TFTM028-4)

I am able to display all of the demos, and have checked the connections several times to be sure they are correct, I am using the default settings, and during the dispFont() demo, touching the screen has no effect.

#Set correct configuration
tft.init(tft.ILI9341, width=240, height=320, miso=19,mosi=23,clk=18,cs=5,dc=26,tcs=27,hastouch=True, bgr=True)

maxx = 240
maxy = 320
miny = 12
touch = False

If I change touch=True the demo won't start with the following error:

>>> import test.tft as tft
>>> tft.dispFont()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "test/tft.py", line 107, in dispFont
  File "test/tft.py", line 43, in touched
OSError: Touch not configured
>>>

The same display and touch works on the raspberry PI - any idea what may be wrong ?

make makefs|flashfs|copyfs cannot be executed

@loboris same as ESP32_spiffs_example make makefs|flashfs|copyfs cannot be executed in ESP32_TFT_library as well. Also i tried to do what you did to ESP32_spiffs_example repo but still getting some error and i'm not sure how to fix it. It seems like now esptool required different argument type when flashing?

This is what i'm getting,

Prasads-MacBook-Pro-2:ESP32_TFT_library Prasad$ make flashfs
Making spiffs image ...
python /Users/Prasad/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect
/.
/fonts/.
/fonts/arial_bold.fon
/fonts/BigFont.fon
/fonts/DejaVuSans12.fon
/fonts/DejaVuSans18.fon
/fonts/DejaVuSans24.fon
/fonts/DotMatrix_M.fon
/fonts/Grotesk24x48.fon
/fonts/ocrfont.c
/fonts/SmallFont.fon
/fonts/swiss721_outline.fon
/fonts/Ubuntu.fon
/images/.
/images/test1.jpg
/images/test2.jpg
/images/test3.jpg
/images/test4.jpg
/images/tiger.bmp
/spiffs.info
usage: esptool write_flash [-h] [--flash_freq {keep,40m,26m,20m,80m}]
                           [--flash_mode {keep,qio,qout,dio,dout}]
                           [--flash_size FLASH_SIZE]
                           [--spi-connection SPI_CONNECTION] [--no-progress]
                           [--verify] [--compress | --no-compress]
                           <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: Address "0x0x180000" must be a number
make: *** [flashfs] Error 2

font_rotate = 0 issue.

Hi loboris,
I just got brand new WROVER_KIT V3 with LCD Type ST7789V. I have downloaded your library and everything works fine. I can see all the demos excepted the text print on the LCD.

I have found that when font_rotate = 0 then it can not print string on the screen.
Then I have tried setting font_rotate = 1 then the strings now being printed.

By the way, thank you for contributing the library.
//juphaono
lcdissue

White screen after power on

Note: Depending on PCB design, the SPI frequency can be too high.
I had to reduce it from the default value of 40MHz to 26MHz.

why chars are printed reversed?

Loboris, Thanks for writing this library. Its pretty nice..
I am using ST7735R with esp32. My issue is, all the chars are printed reversed. I am using your demo and TFT_print() to print the string on the screen. I am not sure what is wrong with my setup. Thanks.

Amar

Feature requests

Hallo Lovosevic,

could you expand the TFT_print function so that it is possible to display the desired text in a certain text size?

Furthermore, I would welcome a function that allows you to draw a line with a certain thickness (irrespective of the angle).
TFT_drawLineByAngle (x, y, start, len, angle, color, thickness = 1 /as default/);

XPT2046 touch calculation

I'm not having much success getting touch to work. There is one show stopper in TFT_read_touch in tft.c.

There is a test for (ybottom - ytop) <= 0 which is always true and so calculation is always abandoned.

The constant TP_CALY_XPT2046 = 122224794 === 0x749009A
Masking that value with 0x3FFF returns 0x009A - that's ybottom
Shifting TP_CALY right by 16 bits and masking with 0x3FFF returns 0x0749 - thats ytop.

It's a constant calculation so I'm puzzled that it's recomputed every reading. I'm not too sure what's intended.

disp_images() shows no images

Since after the fix for issue# 10 I had still no image. So I built and flashed an new image file with "make flashfs".
The download to th target failed with:

I (93) boot: End of partition table
I (97) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0bb10 ( 47888) map
I (113) esp_image: segment 1: paddr=0x0001bb38 vaddr=0x3ffb0000 size=0x044d8 ( 17624) load
I (118) esp_image: segment 2: paddr=0x00020018 vaddr=0x400d0018 size=0x1f7d8 (128984) map
E (142) esp_image: invalid segment length 0x6662696c
E (143) boot: Factory app partition is not bootable
E (143) boot: No bootable app partitions in the partition table
user code done

I have fixed it in main \ Kconfig.projbuild where I changed the values to hex values there.

menu "TFT Display DEMO Configuration"

config SPIFFS_BASE_ADDR
    hex "SPIFFS Base address"
    range 0x100000 0x1FFE000
    default 0x180000
    help
	Starting address of the SPIFFS area in ESP32 Flash

Is the function TFT_invertDisplay() missing the disp_select() ?

Great library :-) Just that I had to invert the colour for a new LCD and that function didn't work. I had to change to this.

void TFT_invertDisplay(const uint8_t mode) {
if (disp_select() != ESP_OK) {
printf("TFT_invertDisplay ERROR !!!!\n");
return;
}

if ( mode == INVERT_ON ) disp_spi_transfer_cmd(TFT_INVONN);
else disp_spi_transfer_cmd(TFT_INVOFF);

disp_deselect();
}

Is it ok ?

Thanks for the great work.

Support for ILI9163 screens?

Hi,

Great library, thanks for sharing it.
Is it possible to use the ILI9163 128x128 px screen somehow? Of so how? If not, will it be supported at some point any soon?

Thanks.

image not being displayed

Followed instructions and configured menuconfig, compiled and make flash, make flashfs for wrover kit V3. Display light but no image displayed. Then it hanges.

V (4792) tcpip_adapter: check: local, if=0 fn=0x400ec028^M
^M
V (4797) tcpip_adapter: call api in lwip: ret=0x5001, give sem^M
V (4802) tcpip_adapter: check: remote, if=0 fn=0x400ec028^M
^M
V (4808) event: exit default callback^M
^M^M
^M
I (6889) [SPIFFS]: Registering SPIFFS file system^M
I (6889) [SPIFFS]: Mounting SPIFFS files system^M
I (6889) [SPIFFS]: Start address: 0x180000; Size 1024 KB^M
I (6892) [SPIFFS]: Work buffer: 2048 B^M
I (6895) [SPIFFS]: FDS buffer: 384 B^M
I (6899) [SPIFFS]: Cache size: 2048 B^M
I (6974) [SPIFFS]: Mounted^M
^M^M
==========================================^M^M
Display: ST7789V: PORTRAIT 240,320 Color^M^M
^M^M
Clear screen time: 60 ms^M^M
Send color buffer time: 229 us (240 pixels)^M^M
D (124777) tcpip_adapter: if0 ip lost tmr: enter^M
D (124777) tcpip_adapter: if0 ip lost tmr: raise ip lost event^M
D (124777) event: SYSTEM_EVENT_STA_LOST_IP^M
V (124780) event: enter default callback^M
I (124783) event: station ip lost^M
V (124786) event: exit default callback^M
JPG Decode time: 85 ms^M^M
BMP time, scale: 5: 86 ms^M^M
BMP time, scale: 4: 85 ms^M^M
BMP time, scale: 3: 85 ms^M^M
BMP time, scale: 2: 85 ms^M^M
BMP time, scale: 1: 85 ms^M^M
BMP time, scale: 0: 85 ms^M^M
^M^M
==========================================^M^M
Display: ST7789V: LANDSCAPE 320,240 Color^M^M
^M^M
Clear screen time: 57 ms^M^M
Send color buffer time: 302 us (320 pixels)^M^M
ets Jun 8 2016 00:22:57^M
^M
rst:0x1 (POWERON_RESET),boot:0x26 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_FEO_V2))^M
waiting for download^M

Please provide product link

Hi there,
I tried to Google and found so many of them online, especially on Aliexpress. To avoid quality and incompatibility issues, would you please provide links to the products that you think will work?

Thank you
Lim

Demo does not work correctly

My setup:
ESP-WROOM-32
ILI9341
XPT2046
16GB SDHC
Everything is wired up correctly, as you can see below, but something is wrong with the image... Application somehow thinks this is not a 320x240 display


(My camera is actually pretty bad, sorry)
This is my configuration in tftspi.h:

#define DEFAULT_DISP_TYPE DISP_TYPE_ILI9341
#define DEFAULT_TFT_DISPLAY_WIDTH 320
#define DEFAULT_TFT_DISPLAY_HEIGHT 240
#define DISP_COLOR_BITS_24 0x66
#define DEFAULT_GAMMA_CURVE 0
#define DEFAULT_SPI_CLOCK 30000000
#define TFT_INVERT_ROTATION 1
#define TFT_INVERT_ROTATION1 0
#define TFT_INVERT_ROTATION2 1
#define TFT_RGB_BGR 0x08

#define USE_TOUCH TOUCH_TYPE_NONE

#define PIN_NUM_MISO 19 // SPI MISO
#define PIN_NUM_MOSI 23 // SPI MOSI
#define PIN_NUM_CLK 18 // SPI CLOCK pin
#define PIN_NUM_CS 5 // Display CS pin
#define PIN_NUM_DC 13 // Display command/data pin
#define PIN_NUM_TCS 35 // Touch screen CS pin (NOT used if USE_TOUCH=0)

#define PIN_NUM_RST 22 // GPIO used for RESET control (#16)
#define PIN_NUM_BCKL 0 // GPIO used for backlight control
#define PIN_BCKL_ON 1 // GPIO value for backlight ON
#define PIN_BCKL_OFF 0 // GPIO value for backlight OFF

And there is the sdkconfig.h:

#define CONFIG_ESP32_PHY_MAX_TX_POWER 20
#define CONFIG_TRACEMEM_RESERVE_DRAM 0x0
#define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 16
#define CONFIG_FATFS_LFN_NONE 1
#define CONFIG_TCP_RECVMBOX_SIZE 6
#define CONFIG_FATFS_CODEPAGE_437 1
#define CONFIG_TCP_WND_DEFAULT 5744
#define CONFIG_PARTITION_TABLE_OFFSET 0x8000
#define CONFIG_ESPTOOLPY_FLASHSIZE_4MB 1
#define CONFIG_IPC_TASK_STACK_SIZE 1024
#define CONFIG_FATFS_PER_FILE_CACHE 1
#define CONFIG_ESPTOOLPY_FLASHFREQ "80m"
#define CONFIG_MBEDTLS_KEY_EXCHANGE_RSA 1
#define CONFIG_UDP_RECVMBOX_SIZE 6
#define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0
#define CONFIG_MBEDTLS_AES_C 1
#define CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED 1
#define CONFIG_MBEDTLS_GCM_C 1
#define CONFIG_ESPTOOLPY_FLASHSIZE "4MB"
#define CONFIG_HEAP_POISONING_DISABLED 1
#define CONFIG_BROWNOUT_DET_LVL_SEL_0 1
#define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER 1
#define CONFIG_INT_WDT 1
#define CONFIG_MBEDTLS_SSL_PROTO_TLS1 1
#define CONFIG_MBEDTLS_ECDSA_C 1
#define CONFIG_LOG_BOOTLOADER_LEVEL_INFO 1
#define CONFIG_HTTPD_MAX_REQ_HDR_LEN 512
#define CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE 0
#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1
#define CONFIG_MBEDTLS_ECDH_C 1
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE 1
#define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_MBEDTLS_SSL_ALPN 1
#define CONFIG_MBEDTLS_PEM_WRITE_C 1
#define CONFIG_LOG_DEFAULT_LEVEL_INFO 1
#define CONFIG_BT_RESERVE_DRAM 0x0
#define CONFIG_FATFS_FS_LOCK 0
#define CONFIG_IP_LOST_TIMER_INTERVAL 120
#define CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED 1
#define CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED 1
#define CONFIG_CONSOLE_UART_BAUDRATE 115200
#define CONFIG_LWIP_MAX_SOCKETS 10
#define CONFIG_LWIP_NETIF_LOOPBACK 1
#define CONFIG_EMAC_TASK_PRIORITY 20
#define CONFIG_TIMER_TASK_STACK_DEPTH 2048
#define CONFIG_TCP_MSS 1436
#define CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED 1
#define CONFIG_FATFS_CODEPAGE 437
#define CONFIG_EXAMPLE_DISPLAY_TYPE 4
#define CONFIG_ULP_COPROC_RESERVE_MEM 0
#define CONFIG_LWIP_MAX_UDP_PCBS 16
#define CONFIG_ESPTOOLPY_BAUD 921600
#define CONFIG_INT_WDT_CHECK_CPU1 1
#define CONFIG_ADC_CAL_LUT_ENABLE 1
#define CONFIG_FLASHMODE_DIO 1
#define CONFIG_ESPTOOLPY_AFTER_RESET 1
#define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED 1
#define CONFIG_LWIP_DHCPS_MAX_STATION_NUM 8
#define CONFIG_TOOLPREFIX "xtensa-esp32-elf-"
#define CONFIG_MBEDTLS_ECP_C 1
#define CONFIG_FREERTOS_IDLE_TASK_STACKSIZE 1536
#define CONFIG_MBEDTLS_RC4_DISABLED 1
#define CONFIG_SPIFFS_SIZE 1048576
#define CONFIG_CONSOLE_UART_NUM 0
#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE 1
#define CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC 1
#define CONFIG_TCP_OVERSIZE_MSS 1
#define CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS 1
#define CONFIG_CONSOLE_UART_DEFAULT 1
#define CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN 16384
#define CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS 4
#define CONFIG_ESPTOOLPY_FLASHSIZE_DETECT 1
#define CONFIG_PARTITION_TABLE_CUSTOM 1
#define CONFIG_TIMER_TASK_STACK_SIZE 3584
#define CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE 1
#define CONFIG_MBEDTLS_X509_CRL_PARSE_C 1
#define CONFIG_LWIP_DHCPS_LEASE_UNIT 60
#define CONFIG_TCPIP_TASK_STACK_SIZE 2048
#define CONFIG_TASK_WDT 1
#define CONFIG_MAIN_TASK_STACK_SIZE 8192
#define CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0 1
#define CONFIG_LWIP_MAX_ACTIVE_TCP 16
#define CONFIG_TASK_WDT_TIMEOUT_S 20
#define CONFIG_INT_WDT_TIMEOUT_MS 300
#define CONFIG_ESPTOOLPY_FLASHMODE "dio"
#define CONFIG_NEWLIB_STDIN_LINE_ENDING_CR 1
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA 1
#define CONFIG_ESPTOOLPY_BEFORE "default_reset"
#define CONFIG_ADC2_DISABLE_DAC 1
#define CONFIG_LOG_DEFAULT_LEVEL 3
#define CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION 1
#define CONFIG_TIMER_QUEUE_LENGTH 10
#define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT 1
#define CONFIG_MAKE_WARN_UNDEFINED_VARIABLES 1
#define CONFIG_FATFS_TIMEOUT_MS 10000
#define CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS 1
#define CONFIG_MBEDTLS_CCM_C 1
#define CONFIG_SPI_MASTER_ISR_IN_IRAM 1
#define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER 20
#define CONFIG_ESP32_RTC_CLK_CAL_CYCLES 1024
#define CONFIG_ESP32_WIFI_TX_BA_WIN 6
#define CONFIG_ESP32_WIFI_NVS_ENABLED 1
#define CONFIG_MDNS_MAX_SERVICES 10
#define CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED 1
#define CONFIG_LIBSODIUM_USE_MBEDTLS_SHA 1
#define CONFIG_DMA_RX_BUF_NUM 10
#define CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED 1
#define CONFIG_TCP_SYNMAXRTX 6
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA 1
#define CONFIG_PYTHON "python"
#define CONFIG_MBEDTLS_ECP_NIST_OPTIM 1
#define CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1 1
#define CONFIG_ESPTOOLPY_COMPRESSED 1
#define CONFIG_PARTITION_TABLE_FILENAME "partitions_example.csv"
#define CONFIG_TCP_SND_BUF_DEFAULT 5744
#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1
#define CONFIG_TCP_MSL 60000
#define CONFIG_MBEDTLS_SSL_PROTO_TLS1_1 1
#define CONFIG_LWIP_SO_REUSE_RXTOALL 1
#define CONFIG_WIFI_SSID "SSID DELETED"
#define CONFIG_ESP32_WIFI_RX_BA_WIN 6
#define CONFIG_MBEDTLS_X509_CSR_PARSE_C 1
#define CONFIG_SPIFFS_LOG_BLOCK_SIZE 8192
#define CONFIG_SPIFFS_BASE_ADDR 0x180000
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA 1
#define CONFIG_LWIP_DHCP_DOES_ARP_CHECK 1
#define CONFIG_ESPTOOLPY_FLASHFREQ_80M 1
#define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2304
#define CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V 1
#define CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY 2000
#define CONFIG_BROWNOUT_DET_LVL 0
#define CONFIG_MBEDTLS_PEM_PARSE_C 1
#define CONFIG_ESP32_APPTRACE_DEST_NONE 1
#define CONFIG_MBEDTLS_SSL_PROTO_TLS1_2 1
#define CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA 1
#define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_HTTPD_MAX_URI_LEN 512
#define CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED 1
#define CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED 1
#define CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1 1
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ 240
#define CONFIG_MBEDTLS_HARDWARE_AES 1
#define CONFIG_FREERTOS_HZ 1000
#define CONFIG_LOG_COLORS 1
#define CONFIG_EXAMPLE_DISPLAY_TYPE0 1
#define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE 1
#define CONFIG_STACK_CHECK_NONE 1
#define CONFIG_ADC_CAL_EFUSE_TP_ENABLE 1
#define CONFIG_FREERTOS_ASSERT_FAIL_ABORT 1
#define CONFIG_BROWNOUT_DET 1
#define CONFIG_ESP32_XTAL_FREQ 40
#define CONFIG_MONITOR_BAUD_115200B 1
#define CONFIG_LOG_BOOTLOADER_LEVEL 3
#define CONFIG_MBEDTLS_TLS_ENABLED 1
#define CONFIG_LWIP_MAX_RAW_PCBS 16
#define CONFIG_MBEDTLS_SSL_SESSION_TICKETS 1
#define CONFIG_ESP_ERR_TO_NAME_LOOKUP 1
#define CONFIG_MBEDTLS_SSL_RENEGOTIATION 1
#define CONFIG_ESPTOOLPY_BEFORE_RESET 1
#define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200
#define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT 5
#define CONFIG_PARTITION_TABLE_MD5 1
#define CONFIG_TCPIP_RECVMBOX_SIZE 32
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_240 1
#define CONFIG_TCP_MAXRTX 12
#define CONFIG_ESPTOOLPY_AFTER "hard_reset"
#define CONFIG_LWIP_SO_REUSE 1
#define CONFIG_ESP32_XTAL_FREQ_40 1
#define CONFIG_DMA_TX_BUF_NUM 10
#define CONFIG_LWIP_MAX_LISTENING_TCP 16
#define CONFIG_FREERTOS_INTERRUPT_BACKTRACE 1
#define CONFIG_WL_SECTOR_SIZE 4096
#define CONFIG_ESP32_DEBUG_OCDAWARE 1
#define CONFIG_TIMER_TASK_PRIORITY 1
#define CONFIG_MBEDTLS_TLS_CLIENT 1
#define CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED 1
#define CONFIG_MONITOR_BAUD 115200
#define CONFIG_ESP32_DEBUG_STUBS_ENABLE 1
#define CONFIG_FREERTOS_CORETIMER_0 1
#define CONFIG_PARTITION_TABLE_CUSTOM_FILENAME "partitions_example.csv"
#define CONFIG_MBEDTLS_HAVE_TIME 1
#define CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY 1
#define CONFIG_TCP_QUEUE_OOSEQ 1
#define CONFIG_ADC_CAL_EFUSE_VREF_ENABLE 1
#define CONFIG_MBEDTLS_TLS_SERVER 1
#define CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT 1
#define CONFIG_FREERTOS_ISR_STACKSIZE 1536
#define CONFIG_OPENSSL_ASSERT_DO_NOTHING 1
#define CONFIG_WL_SECTOR_SIZE_4096 1
#define CONFIG_OPTIMIZATION_LEVEL_DEBUG 1
#define CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED 1
#define CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED 1
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA 1
#define CONFIG_WIFI_PASSWORD "PASSWORD DELETED"
#define CONFIG_SYSTEM_EVENT_QUEUE_SIZE 32
#define CONFIG_ESP32_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESPTOOLPY_BAUD_921600B 1
#define CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_LWIP_LOOPBACK_MAX_PBUFS 8
#define CONFIG_SPI_FLASH_ROM_DRIVER_PATCH 1
#define CONFIG_EXAMPLE_USE_WIFI 1
#define CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED 1
#define CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0 1
#define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT 3072
#define CONFIG_MONITOR_BAUD_OTHER_VAL 115200
#define CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF 1
#define CONFIG_ESPTOOLPY_PORT "COM4"
#define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS 1
#define CONFIG_ESP32_PANIC_PRINT_HALT 1
#define CONFIG_SPIFFS_LOG_PAGE_SIZE 256

Can you please help me?

SD card and Display on the same SPI bus

I tried using SD write every 30 seconds along with display. I took care of CS select and deselect of the display when writing to the SD. Display seems to freeze and never recovers. Below is my sample code. Did anyone try writing to SD card periodically while displaying something? Thank you for the help.

`
while (1)
{
Wait(10000);
if(waitSDwrite>3)
{
Wait(1000);
// ==== Test select/deselect ====
int ret = spi_lobo_device_deselect(spi);
assert(ret==ESP_OK);
waitSDwrite = 0;
test_sd_card();
ret = spi_lobo_device_select(spi, 1);
assert(ret==ESP_OK);
Wait(1000);
}
else
{
TFT_fillWindow(TFT_BLACK);
_fg = TFT_RED;
TFT_print("Hello World\n", CENTER, CENTER);
waitSDwrite++;
}
}

`

Task watchdog got triggered. The following tasks did not reset the watchdog in time: - IDLE (CPU 0)

New to this. Please help. Here's the output when running make monitor.

Aldrin@DESKTOP-K0GL855 MINGW32 ~/esp/ESP32_TFT_library
$ make monitor
/home/Aldrin/esp/ESP32_TFT_library/components/mkspiffs/Makefile.projbuild:13: warning: overriding recipe for target 'clean'
/home/Aldrin/esp/esp-idf/components/app_update/Makefile.projbuild:60: warning: ignoring old recipe for target 'clean'
GENCONFIG
/home/Aldrin/esp/ESP32_TFT_library/components/mkspiffs/Makefile.projbuild:13: warning: overriding recipe for target 'clean'
/home/Aldrin/esp/esp-idf/components/app_update/Makefile.projbuild:60: warning: ignoring old recipe for target 'clean'
Python requirements from D:/msys32/home/Aldrin/esp/esp-idf/requirements.txt are satisfied.
MONITOR
--- idf_monitor on COM3 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0010,len:4
load:0x3fff0014,len:6104
load:0x40078000,len:9308
load:0x40080400,len:5836
entry 0x40080744
I (174) boot: ESP-IDF v3.2-dev-688-g499d0674 2nd stage bootloader
I (175) boot: compile time 22:58:02
I (175) boot: Enabling RNG early entropy source...
I (195) boot: SPI Speed : 40MHz
I (208) boot: SPI Mode : DIO
I (221) boot: SPI Flash Size : 4MB
I (234) boot: Partition Table:
I (245) boot: ## Label Usage Type ST Offset Length
I (268) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (291) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (314) boot: 2 factory factory app 00 00 00010000 00100000
I (338) boot: End of partition table
I (351) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x189ac (100780) map
I (596) esp_image: segment 1: paddr=0x000289d4 vaddr=0x3ffb0000 size=0x06030 ( 24624) load
I (657) esp_image: segment 2: paddr=0x0002ea0c vaddr=0x3ffb6030 size=0x00000 ( 0) load
I (659) esp_image: segment 3: paddr=0x0002ea14 vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at D:/msys32/home/Aldrin/esp/esp-idf/components/freertos/xtensa_vectors.S:168
5

I (681) esp_image: segment 4: paddr=0x0002ee1c vaddr=0x40080400 size=0x011f4 ( 4596) load
I (718) esp_image: segment 5: paddr=0x00030018 vaddr=0x400d0018 size=0x7376c (472940) map
0x400d0018: _stext at ??:?

I (1752) esp_image: segment 6: paddr=0x000a378c vaddr=0x400815f4 size=0x11570 ( 71024) load
0x400815f4: esp_restart at D:/msys32/home/Aldrin/esp/esp-idf/components/esp32/system_api.c:172

I (1936) esp_image: segment 7: paddr=0x000b4d04 vaddr=0x400c0000 size=0x00000 ( 0) load
I (1937) esp_image: segment 8: paddr=0x000b4d0c vaddr=0x50000000 size=0x00000 ( 0) load
I (2030) boot: Loaded app from partition at offset 0x10000
I (2031) boot: Disabling RNG early entropy source...
I (2033) cpu_start: Pro cpu up.
I (2044) cpu_start: Starting app cpu, entry point is 0x400810fc
0x400810fc: call_start_cpu1 at D:/msys32/home/Aldrin/esp/esp-idf/components/esp32/cpu_start.c:226

I (1) cpu_start: App cpu up.
I (2077) heap_init: Initializing. RAM available for dynamic allocation:
I (2098) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (2116) heap_init: At 3FFBC230 len 00023DD0 (143 KiB): DRAM
I (2136) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (2156) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (2176) heap_init: At 40092B64 len 0000D49C (53 KiB): IRAM
I (2195) cpu_start: Pro cpu start user code
I (284) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.

==============================
TFT display DEMO, LoBo 11/2017

Pins used: miso=19, mosi=18, sck=5, cs=15
Touch CS: 32

SPI: display device added to spi bus (1)
SPI: attached display device, speed=8000000
SPI: bus uses native pins: false
SPI: touch screen device added to spi bus (1)
SPI: attached TS device, speed=1000000
SPI: display init...
OK
STMPE touch initialized, ver: ffff - ff
SPI: Max rd speed = 1000000
SPI: Changed speed to 26666666


Graphics demo started

I (3519) [TFT Demo]: Time is not set yet. Connecting to WiFi and getting time over NTP.
I (3532) wifi: wifi driver task: 3ffc4ae4, prio:23, stack:3584, core=0
I (3532) wifi: wifi firmware version: 19b3110
I (3532) wifi: config NVS flash: enabled
I (3535) wifi: config nano formating: disabled
I (3539) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (3548) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (3574) wifi: Init dynamic tx buffer num: 32
I (3574) wifi: Init data frame dynamic rx buffer num: 32
I (3574) wifi: Init management frame dynamic rx buffer num: 32
I (3578) wifi: Init static rx buffer size: 1600
I (3582) wifi: Init static rx buffer num: 10
I (3586) wifi: Init dynamic rx buffer num: 32
I (3590) [TFT Demo]: Setting WiFi configuration SSID cksantoshome...
I (3653) phy: phy_version: 3960, 5211945, Jul 18 2018, 10:40:07, 0, 0
I (3655) wifi: mode : sta (30:ae:a4:15:c7:f8)
I (4985) wifi: n:11 0, o:1 0, ap:255 255, sta:11 0, prof:1
I (5644) wifi: state: init -> auth (b0)
I (5653) wifi: state: auth -> assoc (0)
I (5660) wifi: state: assoc -> run (10)
I (5693) wifi: connected with cksantoshome, channel 11
I (5693) wifi: pm start, type: 1

I (6533) event: sta ip: 10.0.0.30, mask: 255.255.255.0, gw: 10.0.0.1
I (6534) [TFT Demo]: Initializing SNTP
I (7039) [TFT Demo]: System time is set.
I (7039) wifi: state: run -> init (0)
I (7040) wifi: pm stop, total sleep time: 717267 us / 1346473 us

I (7042) wifi: n:11 0, o:11 0, ap:255 255, sta:11 0, prof:1
I (7058) wifi: flush txq
I (7058) wifi: stop sw txq
I (7060) wifi: lmac stop hw txq
E (7060) wifi: esp_wifi_connect 944 wifi not start

I (9157) [SPIFFS]: Registering SPIFFS file system
I (9158) [SPIFFS]: Mounting SPIFFS files system
I (9158) [SPIFFS]: Start address: 0x180000; Size 1024 KB
I (9163) [SPIFFS]: Work buffer: 2048 B
I (9168) [SPIFFS]: FDS buffer: 384 B
I (9172) [SPIFFS]: Cache size: 2048 B
I (9214) [SPIFFS]: Mounted

==========================================
Display: ILI9341: PORTRAIT 240,320 Color

 Clear screen time: 61 ms

Send color buffer time: 230 us (240 pixels)
I (127048) event: station ip lost
JPG Decode time: 288 ms
BMP time, scale: 5: 452 ms
BMP time, scale: 4: 437 ms
BMP time, scale: 3: 439 ms
BMP time, scale: 2: 443 ms
BMP time, scale: 1: 452 ms
BMP time, scale: 0: 336 ms
Task watchdog got triggered. The following tasks did not reset the watchdog in time:

  • IDLE (CPU 0)
    Tasks currently running:
    CPU 0: main
    CPU 1: IDLE
    Task watchdog got triggered. The following tasks did not reset the watchdog in time:
  • IDLE (CPU 0)
    Tasks currently running:
    CPU 0: main
    CPU 1: IDLE

Latest ESP-WROVER-KIT uses ILI9341

Did not work with default settings. The following works:

// ** Set the correct configuration for ESP32-WROVER-KIT v3
// --------------------------------------------------------
//#define DEFAULT_DISP_TYPE           DISP_TYPE_ST7789V
#define DEFAULT_DISP_TYPE   DISP_TYPE_ILI9341

CPU halted error

Hello,

I'm trying to run the demo on my ESP32-WROVER-KIT. I did make menuconfig and set it as such (without wifi).

Although I see the font and line/circle demos, when I go to the JPEG images I get this:


Graphics demo started

I (1531) [SPIFFS]: Registering SPIFFS file system
I (1531) [SPIFFS]: Mounting SPIFFS files system
I (1531) [SPIFFS]: Start address: 0x180000; Size 1024 KB
I (1537) [SPIFFS]: Work buffer: 2048 B
I (1541) [SPIFFS]: FDS buffer: 384 B
I (1546) [SPIFFS]: Cache size: 2048 B
I (1594) [SPIFFS]: Mounted

==========================================
Display: ILI9488: PORTRAIT 240,320 Color

 Clear screen time: 60 ms

Send color buffer time: 230 us (240 pixels)
Guru Meditation Error of type LoadProhibited occurred on core 0. Exception was unhandled.
Register dump:
PC : 0x40002020 PS : 0x00060430 A0 : 0x800020b8 A1 : 0x3ffbb170
A2 : 0x3ffaf720 A3 : 0xfffffffd A4 : 0x3ff96458 A5 : 0x00000008
A6 : 0x0000000d A7 : 0x00000008 A8 : 0x8000be99 A9 : 0x3ffbb150
A10 : 0x3ffaf720 A11 : 0x40084a74 A12 : 0x3ffbb1e4 A13 : 0x3ffaf578
A14 : 0x00000068 A15 : 0x00000006 SAR : 0x0000001c EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000009 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000

Backtrace: 0x40002020:0x3ffbb170 0x400020b5:0x3ffbb190 0x400fe7ad:0x3ffbb1b0 0x400e5ff9:0x

CPU halted.

I read about doing make makefs etc but it does not seem to work for me. Not sure what I'm doing wrong here.

Any help is appreciated.

Thanks

heap corruption when printing 'g'

I'm experiencing heap corruption when trying to print a string containing the lowercase letter g using the TFT_print function. The text up to the letter g is printed, and the part of the g that looks like an a, but the descender and the rest of the text is cut off. The esp crashes with

Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.                        
Core 0 register dump:                                                                                     
PC      : 0x4008f6c3  PS      : 0x00060b33  A0      : 0x80082824  A1      : 0x3ffbb0e0                    
0x4008f6c3: is_free at /home/rajan/esp/esp-idf/components/heap/multi_heap.c:377                           
 (inlined by) multi_heap_malloc_impl at /home/rajan/esp/esp-idf/components/heap/multi_heap.c:429          
                                                                                                          
A2      : 0x3ffb9598  A3      : 0x0000014c  A4      : 0x3ffba044  A5      : 0x00000000                    
A6      : 0x00000840  A7      : 0x00000200  A8      : 0x00000001  A9      : 0xff00d044                    
A10     : 0x3ffba044  A11     : 0x00000001  A12     : 0x3ffba048  A13     : 0x3ffb95a8                    
A14     : 0x00000344  A15     : 0x3ffba150  SAR     : 0x0000001b  EXCCAUSE: 0x0000001c                    
EXCVADDR: 0xff00d044  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffff9                    
                                                                                                          
Backtrace: 0x4008f6c3:0x3ffbb0e0 0x40082821:0x3ffbb100 0x400e6a95:0x3ffbb120 0x400e7132:0x3ffbb150 0x400d2
b0b:0x3ffbb180 0x400d0f2e:0x3ffbb360                                                                      
0x4008f6c3: is_free at /home/rajan/esp/esp-idf/components/heap/multi_heap.c:377                           
 (inlined by) multi_heap_malloc_impl at /home/rajan/esp/esp-idf/components/heap/multi_heap.c:429          
                                                                                                          
0x40082821: heap_caps_malloc at /home/rajan/esp/esp-idf/components/heap/heap_caps.c:130                   
                                                                                                          
0x400e6a95: printProportionalChar at /home/rajan/esp/hello_world/components/tft/tft.c:1523                

0x400e7132: TFT_print at /home/rajan/esp/hello_world/components/tft/tft.c:2019 (discriminator 1)

0x400d2b0b: app_main at /home/rajan/esp/hello_world/main/hello_world_main.c:165

0x400d0f2e: main_task at /home/rajan/esp/esp-idf/components/esp32/cpu_start.c:470

and resets.

Trouble Compiling tft_demo in ESP32_TFT_library

I am getting the messages shown below when attempting to compile the demo app to run on my ESP32 Rover board. Any suggestions?

CC /Users/jim/esp/ESP32_TFT_library/build/spiffs/spiffs_vfs.o
/Users/jim/esp/ESP32_TFT_library/components/spiffs/./spiffs_vfs.c: In function vfs_spiffs_register':
/Users/jim/esp/ESP32_TFT_library/components/spiffs/./spiffs_vfs.c:836:9: error:unknown field 'fd_offset' specified in initializer
.fd_offset = 0,
^
/Users/jim/esp/ESP32_TFT_library/components/spiffs/./spiffs_vfs.c:837:18: warning: initialized field overwritten [-Woverride-init]
.flags = ESP_VFS_FLAG_DEFAULT,
^
/Users/jim/esp/ESP32_TFT_library/components/spiffs/./spiffs_vfs.c:837:18: note:(near initialization for 'vfs.flags')
make[1]: *** [spiffs_vfs.o] Error 1
make: *** [component-spiffs-build] Error 2

Lolin/Wemos 128x128 7735 almost works... but not quite :-( and it breaks the SDCard :-( :-(

I'm using a Wemos/Lolin 1.44" 128x128 7735 TFT. It's the one that plugs into the Lolin D32 Pro and I think the same as the Adafruit 1.44" TFT.

I've set the display type to DISP_TYPE_ST7735R (B seems the same) and DEFAULT_TFT_DISPLAY_WIDTH and DEFAULT_TFT_DISPLAY_HEIGHT to 128 and the tft_demo is sooooo close to working well.

What's not working is a sort of wrap/tear of the boxes at the top and bottom of the demo and the whole display being offset a few pixels up and to the left:
20180904_181126
20180904_181040

FWIW, I've tried two displays and two ESP32 boards. The hardware works with the Adafruit ST7735 Library in the Arduino IDE using tft.initR(INITR_144GREENTAB) but I'm trying to use this library with esp-idf.

I've tried playing with the XSTART and XEND settings (just flailing around in the dark really) but that doesn't seem to make any difference.

Can anyone point me in the right direction?

Bug: TFT_clearStringRect not working correctly

I tried using TFT_clearStringRect but found a bug.
I changed the last parameter in the implementation to TFT_BLUE to troubleshoot.

Not sure why but here is how its working now
Before
TFT_fillRect(x+dispWin.x1, y+dispWin.y1, w, h, _bg);
After
TFT_fillRect(x+dispWin.x1, y+dispWin.y1-(h*2), w, h+1, _bg);

I haven't gone through the entire code, so not sure why your line does not work.

Suggestion:
Can we change the 3rd parameter to number of characters so that its easy to specify how far the line needs to be cleared?

The buffer idea works only if you have same length string being printed. Otherwise if the previous string was longer, there will be left overs.

Getting assert - trying to wrap in C++

I'm trying to build a wrapper lib around this. The demo seems to work fine, but when I attempt to compile into a class with the externs, I'm getting an assert failure. I pulled the return value and passed it to esp_err_to_name and it returned ESP_ERR_INVALID_ARG.

Since c++ doesn't like the way the demo initialized the structs, I did change them, but I'm not sure if there's something I missed.

buscfg.miso_io_num=PIN_NUM_MISO;              // set SPI MISO pin
buscfg.mosi_io_num=PIN_NUM_MOSI;              // set SPI MOSI pin
buscfg.sclk_io_num=PIN_NUM_CLK;               // set SPI CLK pin
buscfg.quadwp_io_num=-1;
buscfg.quadhd_io_num=-1;
buscfg.max_transfer_sz = 6*1024;

spi_lobo_device_interface_config_t devcfg;

devcfg.clock_speed_hz=8000000;
devcfg.mode=0;
devcfg.spics_io_num=-1;
devcfg.spics_ext_io_num=PIN_NUM_CS;
devcfg.flags=LB_SPI_DEVICE_HALFDUPLEX;

ret=spi_lobo_bus_add_device(SPI_BUS, &buscfg, &devcfg, &spi);

Any ideas?

Display JPG and BMP images for wrover kit V3 with ILI9341

Here are the changes I made to the ESP32_TFT_library to display jpg and bmp images. It will display the test images. If you add images you have to add code in tft_demo.c. I added images and had to
increase the flash size. I used FastStone Photo Resizer to reduce my jpg files down

    run - make menuconfig
            Serial flasher config
                    change ttyUSB0 to ttyUSB1
                    change (if needed) Flash size (2 Mo)
                            tp (4 MB)

            TFT Display Demo configuration
                    change (if needed) (1048576) Size in bytes

                    Select predefined display confuration (None)
                            change to M5Stack TTF display

    in main/tft_demo.c

            add  after #include "spiffs_vfs.h"

                    #include "esp_vfs.h"


            add  in function disp_images() after disp_header("JPEG IMAGES");

    sprintf(tmp_buff, SPIFFS_BASE_PATH"/images");

"JPG-BMP" 124L, 5528C written 1,1 Top

ILI6122

Does ILI6122 be supported by esp-32 ?

crash with lastest version

Hello Boris,

I get, build and run (gbr) the current version and it crashed with:

Guru Meditation Error of type LoadProhibited occurred on core  0. Exception was unhandled.
Register dump:
PC      : 0x40002020  PS      : 0x00060130  A0      : 0x800020b8  A1      : 0x3ffc2790  
A2      : 0x3ffc2a78  A3      : 0x8011c71e  A4      : 0x3ff96458  A5      : 0x00000008  
A6      : 0x0000000d  A7      : 0x00000008  A8      : 0x8000be99  A9      : 0x3ffc2770  
A10     : 0x3ffc2a78  A11     : 0x40084f90  A12     : 0x3ffc2804  A13     : 0x3ffce014  
A14     : 0x00000068  A15     : 0x00000006  SAR     : 0x0000001c  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x8011c72a  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0x00000000  

Backtrace: 0x40002020:0x3ffc2790 0x400020b5:0x3ffc27b0 0x4011e365:0x3ffc27d0 0x401025be:0x3ffc28e0 0x40102b4c:0x3ffc2900 0x40102e84:0x3ffc2920 0x400d0e6b:0x3ffc2980

CPU halted.
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

After some investigation (with image_debug = 1) I found out that this happens after "File error: Bad file numbers" occurs. Digging deeper: the crash happens at the end of function TFT_jpg_image( ) when closing the the not existing file (line 2467).
I solved the problem by putting up "dev.fhndl = NULL;" (line2390) some lines before the if query.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.