How to display image on TTGO-T-Display ESP32

I used the sample code of Jpegcoder and An error keep occur:
Arduino: 1.8.19 (Windows 10), Board: "LilyGo T-Display, Disabled, Core 1, Core 1, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None, Disabled"

Sketch uses 353105 bytes (26%) of program storage space. Maximum is 1310720 bytes.

Global variables use 24488 bytes (7%) of dynamic memory, leaving 303192 bytes for local variables. Maximum is 327680 bytes.

usage: esptool [-h]

           [--chip {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2,esp32c6,esp32h2}]

           [--port PORT] [--baud BAUD]

           [--before {default_reset,usb_reset,no_reset,no_reset_no_sync}]

           [--after {hard_reset,soft_reset,no_reset,no_reset_stub}]

           [--no-stub] [--trace] [--override-vddsdio [{1.8V,1.9V,OFF}]]

           [--connect-attempts CONNECT_ATTEMPTS]

           {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,merge_bin,get_security_info,version}

           ...

esptool: error: argument operation: invalid choice: '{upload.flags}' (choose from 'load_ram', 'dump_mem', 'read_mem', 'write_mem', 'write_flash', 'run', 'image_info', 'make_image', 'elf2image', 'read_mac', 'chip_id', 'flash_id', 'read_flash_status', 'write_flash_status', 'read_flash', 'verify_flash', 'erase_flash', 'erase_region', 'merge_bin', 'get_security_info', 'version')

esptool: error: argument operation: invalid choice: '{upload.flags}' (choose from 'load_ram', 'dump_mem', 'read_mem', 'write_mem', 'write_flash', 'run', 'image_info', 'make_image', 'elf2image', 'read_mac', 'chip_id', 'flash_id', 'read_flash_status', 'write_flash_status', 'read_flash', 'verify_flash', 'erase_flash', 'erase_region', 'merge_bin', 'get_sec

1 Like

I had the same error. There were two lines missing in .arduino15/packages/esp32/hardware/esp32/2.0.14/boards.txt:

lilygo_t_display.upload.flags=
lilygo_t_display.upload.extra_flags=

Lines added, IDE restarted, uploading worked...

3 Likes

Is it a TTGO T-Display S3?

when yes, go to their GITHUB:
GitHub - Xinyuan-LilyGO/T-Display-S3

download and install the

TFT_eSPI

start with the Sketch

T-Display-S3/example/tft at main · Xinyuan-LilyGO/T-Display-S3 · GitHub

should work right of the box. Includes an example to display an image.

1 Like

its just ttgo t-display

I cant upload an image, when I check the serial terminal, it appear this error:
E (599) esp_littlefs: ./components/esp_littlefs/src/littlefs/lfs.c:1347:error: Corrupted dir pair at {0x0, 0x1}

E (599) esp_littlefs: mount failed, (-84)
E (600) esp_littlefs: Failed to initialize LittleFS
SPIFFS initialisation failed!

This resolved uploads for me using the T-Display template. Previously I was just using ESP32 Dev Board without issue, but had to manually set everything.

You just made my day, thanks!

you're a lifesaver! this worked

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.