Upload failure to LilyGo T-Display VGA32_V1.4

I'm attempting to upload a compiled sketch to a Lilygo t-display vga32_v1.4 board.
I'm using ide 2.3.6 running on Windows 10.
The sketch compiles ok, but fails to upload. The output is below. It appears to be a problem with the syntax of the command line which executes the upload.

Any suggestions would be appreciated.


Sketch uses 917261 bytes (29%) of program storage space. Maximum is 3145728 bytes.
Global variables use 49188 bytes (15%) of dynamic memory, leaving 278492 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.5.1/esptool.exe" --chip esp32 --port "COM7" --baud 921600 {upload.flags} --before default_reset --after hard_reset write_flash  -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 "C:\Users\leecl\AppData\Local\arduino\sketches\9BA8581FDBEE4BFF9067CFC146825331/NetworkTerminal.ino.bootloader.bin" 0x8000 "C:\Users\leecl\AppData\Local\arduino\sketches\9BA8581FDBEE4BFF9067CFC146825331/NetworkTerminal.ino.partitions.bin" 0xe000 "C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.17/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\leecl\AppData\Local\arduino\sketches\9BA8581FDBEE4BFF9067CFC146825331/NetworkTerminal.ino.bin" {upload.extra_flags}
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')
Failed uploading: uploading error: exit status 2`Us

e code tags to format code for the forum`

Hi @leecliff8735. This error is caused by a bug in the 3rd party "esp32" boards platform:

The bug has already been fixed, but you are using an outdated version of the platform from before the time of the fix. Unless you have a specific reason for using this version 2.0.17, you can fix the problem by updating to the latest version of the platform. I'll provide instructions you can follow to do that:

  1. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Find the "esp32" entry in the list of boards platforms.
  3. Click the "UPDATE" button at the bottom of the entry.
  4. Wait for the update process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully installed platform ...

After that, try uploading the sketch again. Hopefully this time it will work as expected.

Thank you for the response

I'm using FabGL module. The author has posted this info on github:

Warning! The latest version of the Espressif ESP32 library that FabGL runs on is 2.0.17 (or even earlier). Unfortunately, the latest versions of Espressif leave too little memory free for applications, and a project the size of FabGL can no longer function as intended.

If I use the latest version of the espresssif ESP (3.2.0), the sketch fails to compile. Here is the output:

      |      ^~~~~~~~~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\serialport.cpp: In member function 'void fabgl::SerialPort::setup(int, uint32_t, int, char, float, fabgl::FlowControl, bool)':
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\serialport.cpp:241:3: error: 'gpio_matrix_in' was not declared in this scope
  241 |   gpio_matrix_in(m_rxPin, URXD_IN_IDX[m_idx], m_inverted);
      |   ^~~~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\serialport.cpp:242:3: error: 'gpio_matrix_out' was not declared in this scope; did you mean 'gpio_iomux_out'?
  242 |   gpio_matrix_out(m_txPin, UTXD_OUT_IDX[m_idx], m_inverted, false);
      |   ^~~~~~~~~~~~~~~
      |   gpio_iomux_out
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\serialport.cpp: In member function 'void fabgl::SerialPort::sendBreak(bool)':
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\serialport.cpp:343:5: error: 'gpio_matrix_out' was not declared in this scope; did you mean 'gpio_iomux_out'?
  343 |     gpio_matrix_out(m_txPin, MATRIX_DETACH_OUT_SIG, m_inverted, false);
      |     ^~~~~~~~~~~~~~~
      |     gpio_iomux_out
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\serialport.cpp:347:5: error: 'gpio_matrix_out' was not declared in this scope; did you mean 'gpio_iomux_out'?
  347 |     gpio_matrix_out(m_txPin, UTXD_OUT_IDX[m_idx], m_inverted, false);
      |     ^~~~~~~~~~~~~~~
      |     gpio_iomux_out
In file included from c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:31:
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp: In function 'void fabgl::replace_placeholders(uint32_t, int, bool, gpio_num_t, gpio_num_t, bool, gpio_num_t, gpio_num_t)':
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1049:48: error: 'RTC_GPIO_ENABLE_W1TS_REG' was not declared in this scope; did you mean 'GPIO_ENABLE_W1TS_REG'?
 1049 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TS_REG, DAT_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TS_S, 1);
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:333:15: note: in definition of macro 'I_WR_REG'
  333 |     .addr = ((reg) / sizeof(uint32_t)) & 0xff, \
      |               ^~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1049:35: note: in expansion of macro 'I_WR_REG_BIT'
 1049 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TS_REG, DAT_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TS_S, 1);
      |                                   ^~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1049:102: error: 'RTC_GPIO_ENABLE_W1TS_S' was not declared in this scope; did you mean 'GPIO_ENABLE_DATA_S'?
 1049 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TS_REG, DAT_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TS_S, 1);
      |                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:336:12: note: in definition of macro 'I_WR_REG'
  336 |     .low = low_bit, \
      |            ^~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1049:35: note: in expansion of macro 'I_WR_REG_BIT'
 1049 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TS_REG, DAT_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TS_S, 1);
      |                                   ^~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1051:48: error: 'RTC_GPIO_ENABLE_W1TC_REG' was not declared in this scope; did you mean 'GPIO_ENABLE_W1TC_REG'?
 1051 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TC_REG, DAT_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TC_S, 1);
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:333:15: note: in definition of macro 'I_WR_REG'
  333 |     .addr = ((reg) / sizeof(uint32_t)) & 0xff, \
      |               ^~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1051:35: note: in expansion of macro 'I_WR_REG_BIT'
 1051 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TC_REG, DAT_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TC_S, 1);
      |                                   ^~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1051:102: error: 'RTC_GPIO_ENABLE_W1TC_S' was not declared in this scope; did you mean 'GPIO_ENABLE_DATA_S'?
 1051 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TC_REG, DAT_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TC_S, 1);
      |                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:336:12: note: in definition of macro 'I_WR_REG'
  336 |     .low = low_bit, \
      |            ^~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1051:35: note: in expansion of macro 'I_WR_REG_BIT'
 1051 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TC_REG, DAT_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TC_S, 1);
      |                                   ^~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1058:48: error: 'RTC_GPIO_ENABLE_W1TS_REG' was not declared in this scope; did you mean 'GPIO_ENABLE_W1TS_REG'?
 1058 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TS_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TS_S, 1);
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:333:15: note: in definition of macro 'I_WR_REG'
  333 |     .addr = ((reg) / sizeof(uint32_t)) & 0xff, \
      |               ^~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1058:35: note: in expansion of macro 'I_WR_REG_BIT'
 1058 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TS_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TS_S, 1);
      |                                   ^~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1058:102: error: 'RTC_GPIO_ENABLE_W1TS_S' was not declared in this scope; did you mean 'GPIO_ENABLE_DATA_S'?
 1058 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TS_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TS_S, 1);
      |                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:336:12: note: in definition of macro 'I_WR_REG'
  336 |     .low = low_bit, \
      |            ^~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1058:35: note: in expansion of macro 'I_WR_REG_BIT'
 1058 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TS_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TS_S, 1);
      |                                   ^~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1060:48: error: 'RTC_GPIO_ENABLE_W1TC_REG' was not declared in this scope; did you mean 'GPIO_ENABLE_W1TC_REG'?
 1060 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TC_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TC_S, 1);
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:333:15: note: in definition of macro 'I_WR_REG'
  333 |     .addr = ((reg) / sizeof(uint32_t)) & 0xff, \
      |               ^~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1060:35: note: in expansion of macro 'I_WR_REG_BIT'
 1060 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TC_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TC_S, 1);
      |                                   ^~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1060:102: error: 'RTC_GPIO_ENABLE_W1TC_S' was not declared in this scope; did you mean 'GPIO_ENABLE_DATA_S'?
 1060 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TC_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TC_S, 1);
      |                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:336:12: note: in definition of macro 'I_WR_REG'
  336 |     .low = low_bit, \
      |            ^~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1060:35: note: in expansion of macro 'I_WR_REG_BIT'
 1060 |               *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_ENABLE_W1TC_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_ENABLE_W1TC_S, 1);
      |                                   ^~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1066:42: error: 'RTC_GPIO_IN_REG' was not declared in this scope; did you mean 'GPIO_IN_REG'?
 1066 |             *ins = (ulp_insn_t) I_RD_REG(RTC_GPIO_IN_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_IN_NEXT_S, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_IN_NEXT_S);
      |                                          ^~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:347:15: note: in definition of macro 'I_RD_REG'
  347 |     .addr = ((reg) / sizeof(uint32_t)) & 0xff, \
      |               ^~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1066:87: error: 'RTC_GPIO_IN_NEXT_S' was not declared in this scope
 1066 |             *ins = (ulp_insn_t) I_RD_REG(RTC_GPIO_IN_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_IN_NEXT_S, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_IN_NEXT_S);
      |                                                                                       ^~~~~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:350:12: note: in definition of macro 'I_RD_REG'
  350 |     .low = low_bit, \
      |            ^~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1072:46: error: 'RTC_GPIO_OUT_REG' was not declared in this scope; did you mean 'GPIO_OUT_REG'?
 1072 |             *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_OUT_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_IN_NEXT_S, ins->macro.label);
      |                                              ^~~~~~~~~~~~~~~~
C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ulp/ulp_fsm/include/esp32/ulp.h:333:15: note: in definition of macro 'I_WR_REG'
  333 |     .addr = ((reg) / sizeof(uint32_t)) & 0xff, \
      |               ^~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\comdrivers\ps2controller.cpp:1072:33: note: in expansion of macro 'I_WR_REG_BIT'
 1072 |             *ins = (ulp_insn_t) I_WR_REG_BIT(RTC_GPIO_OUT_REG, CLK_rtc_gpio_num[ps2port] + RTC_GPIO_IN_NEXT_S, ins->macro.label);
      |                                 ^~~~~~~~~~~~
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\dispdrivers\cvbs16controller.cpp: In static member function 'static void fabgl::CVBS16Controller::drawScanlineX1(void*, uint16_t*, int, int)':
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\dispdrivers\cvbs16controller.cpp:552:74: error: 'spi_flash_cache_enabled' was not declared in this scope; did you mean 'spi_flash_cache2phys'?
  552 |   if (CVBSGenerator::VSync() && !ctrl->m_primitiveProcessingSuspended && spi_flash_cache_enabled() && ctrl->m_primitiveExecTask) {
      |                                                                          ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                                          spi_flash_cache2phys
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\dispdrivers\cvbs16controller.cpp: In static member function 'static void fabgl::CVBS16Controller::drawScanlineX2(void*, uint16_t*, int, int)':
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\dispdrivers\cvbs16controller.cpp:627:74: error: 'spi_flash_cache_enabled' was not declared in this scope; did you mean 'spi_flash_cache2phys'?
  627 |   if (CVBSGenerator::VSync() && !ctrl->m_primitiveProcessingSuspended && spi_flash_cache_enabled() && ctrl->m_primitiveExecTask) {
      |                                                                          ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                                          spi_flash_cache2phys
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\dispdrivers\cvbs16controller.cpp: In static member function 'static void fabgl::CVBS16Controller::drawScanlineX3(void*, uint16_t*, int, int)':
c:\Users\leecl\Documents\Arduino\libraries\FabGL\src\dispdrivers\cvbs16controller.cpp:699:74: error: 'spi_flash_cache_enabled' was not declared in this scope; did you mean 'spi_flash_cache2phys'?
  699 |   if (CVBSGenerator::VSync() && !ctrl->m_primitiveProcessingSuspended && spi_flash_cache_enabled() && ctrl->m_primitiveExecTask) {
      |                                                                          ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                                          spi_flash_cache2phys

Using library FabGL at version 1.0.9 in folder: C:\Users\leecl\Documents\Arduino\libraries\FabGL 
Using library SPI at version 3.2.0 in folder: C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\SPI 
Using library WiFi at version 3.2.0 in folder: C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi 
Using library Networking at version 3.2.0 in folder: C:\Users\leecl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network 
exit status 1

Compilation error: exit status 1
type or paste code here

Hi.

I did get this sketch to compile and upload. I used an older version of IDE (1.8.18) and the 2.0.17 version of the Espressif ESP32 library.

Thank you.

-Lee

Great news! Thanks for taking the time to post an update.

Regards, Per