T-Deck goes into reset loop after flashing with ulisp-tdeck


#1

So, I just got my T-Deck, and after flashing it with ulisp-tdeck per the Installation instructions at http://www.ulisp.com/show?4JAO, my T-Deck appears to have become stuck in a hard reset loop. The last lines of the Arduino console are:

Sketch uses 913725 bytes (69%) of program storage space. Maximum is 1310720 bytes.
Global variables use 223504 bytes (68%) of dynamic memory, leaving 104176 bytes for local variables. Maximum is 327680 bytes.
python3 /home/dennis/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool.py --chip esp32s3 --port /dev/ttyACM0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 16MB 0x0 /tmp/arduino_build_330646/ulisp-tdeck.ino.bootloader.bin 0x8000 /tmp/arduino_build_330646/ulisp-tdeck.ino.partitions.bin 0xe000 /home/dennis/.arduino15/packages/esp32/hardware/esp32/2.0.16/tools/partitions/boot_app0.bin 0x10000 /tmp/arduino_build_330646/ulisp-tdeck.ino.bin 
esptool.py v4.5.1
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: dc:da:0c:19:72:64
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00003fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x000effff...
Compressed 15104 bytes to 10429...
Writing at 0x00000000... (100 %)
Wrote 15104 bytes (10429 compressed) at 0x00000000 in 0.2 seconds (effective 488.7 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (effective 530.7 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 707.0 kbit/s)...
Hash of data verified.
Compressed 914096 bytes to 584783...
Writing at 0x00010000... (2 %)
Writing at 0x0001b958... (5 %)
...
Writing at 0x000e58af... (97 %)
Writing at 0x000eaf7c... (100 %)
Wrote 914096 bytes (584783 compressed) at 0x00010000 in 6.8 seconds (effective 1078.9 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

but the /dev/ttyACM0 port (I’m using Linux) never comes back after resetting. Checking my dmesg log, I see the following messages, that repeat forever as long as the T-Deck is connected:

[23150.215777] usb 1-5.3: new full-speed USB device number 65 using xhci_hcd
[23150.305257] usb 1-5.3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[23150.305261] usb 1-5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[23150.305262] usb 1-5.3: Product: USB JTAG/serial debug unit
[23150.305263] usb 1-5.3: Manufacturer: Espressif
[23150.305264] usb 1-5.3: SerialNumber: DC:DA:0C:19:72:64
[23150.323474] cdc_acm 1-5.3:1.0: ttyACM0: USB ACM device
[23150.792567] usb 1-5.3: USB disconnect, device number 65
[23150.982811] usb 1-5.3: new full-speed USB device number 66 using xhci_hcd
[23151.072299] usb 1-5.3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[23151.072303] usb 1-5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[23151.072304] usb 1-5.3: Product: USB JTAG/serial debug unit
[23151.072305] usb 1-5.3: Manufacturer: Espressif
[23151.072306] usb 1-5.3: SerialNumber: DC:DA:0C:19:72:64
[23151.090397] cdc_acm 1-5.3:1.0: ttyACM0: USB ACM device
[23151.560682] usb 1-5.3: USB disconnect, device number 66
[23151.751856] usb 1-5.3: new full-speed USB device number 67 using xhci_hcd
[23151.842402] usb 1-5.3: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[23151.842407] usb 1-5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[23151.842408] usb 1-5.3: Product: USB JTAG/serial debug unit
[23151.842409] usb 1-5.3: Manufacturer: Espressif
[23151.842410] usb 1-5.3: SerialNumber: DC:DA:0C:19:72:64
[23151.860531] cdc_acm 1-5.3:1.0: ttyACM0: USB ACM device
[23152.328647] usb 1-5.3: USB disconnect, device number 67
...

So the T-Deck is constantly connecting and disconnecting. Any idea how I can recover from this condition?


Success in getting LilyGO T-Deck to work
#2

Try long press Reset, or double-click Reset?


#3

Ah. Found the answer at https://github.com/Xinyuan-LilyGO/T-Deck. To put the T-Deck into bootloader mode, I had to hold down the trackball button while resetting it. So I should be able to re-flash it now. Not sure what caused the initial problem though…but I was using version 2.0.16 (latest stable version) of the Expressif ESP32 board package. I’ll try reverting to version 2.0.14 as used in your instructions and see if it works.


#4

Reverted to version 2.0.14 of the ESP32 core and it works fine now. Just an FYI, if I attempt to disable sd card support by commenting out // #define sdcardsupport, ulisp-tdeck fails to compile (FSWrite is defined void).


#5