Installing Circuitpython on TTGO T8 ESP32-S2 ST7789

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Bernschneider
 
Posts: 3
Joined: Thu May 06, 2021 11:16 am

Installing Circuitpython on TTGO T8 ESP32-S2 ST7789

Post by Bernschneider »

I´m trying to install Circuitpython on TTGO T8 ESP32-S2 ST7789. In the first run I could flash the file adafruit-circuitpython-lilygo_ttgo_t8_s2_st7789-de_DE-6.2.0.bin provided by Adafruit for this board using esptool.py. After reset the board display showed a nice text asking to download a code.py file. But I found no CIRCUITPY: drive with the Mac Finder.

Then I think I made the mistake, because I flashed the file metro_esp32_s2_tinyuf2_combo.bin. After this nothing was working anymore: There was no CIRCUITPY: drive, no board display message and and I couldn´t repeat step 1, also after first running erase_flash. After flashing 100% I repeatedly got the error message "A fatal error occurred: MD5 of file does not match data in flash!".

I also tried with Arduino IDE and ESP 2.0 Alpha library, but got the same error message after flashing.

I tried everything both on Raspberry Pi 400 and Macbook Air.

What can I do?

Thanks, Peter

User avatar
mikeysklar
 
Posts: 13823
Joined: Mon Aug 01, 2016 8:10 pm

Re: Installing Circuitpython on TTGO T8 ESP32-S2 ST7789

Post by mikeysklar »

@Bernshneider,

Have you tried using a JTAG/SWD debugger? This device can make all the difference between having a board with a stuck bootloader versus a totally bricked controller.

https://www.adafruit.com/product/3571
https://learn.adafruit.com/how-to-progr ... s?view=all

User avatar
Bernschneider
 
Posts: 3
Joined: Thu May 06, 2021 11:16 am

Re: Installing Circuitpython on TTGO T8 ESP32-S2 ST7789

Post by Bernschneider »

Thanks Mike!

I could send my board back and the shop refunded the money. For me it´s now cheaper to buy a new LilyGo board instead of buying a JTAG/SWD debugger.

But before I buy a second board, I want to find out how to install Circuitpython for this board. As I learned it´s not enough to flash the adafruit-circuitpython-lilygo_ttgo_t8_s2_st7789-de_DE-6.2.0.bin file.

What must I do then?

Cheers, Peter

User avatar
mikeysklar
 
Posts: 13823
Joined: Mon Aug 01, 2016 8:10 pm

Re: Installing Circuitpython on TTGO T8 ESP32-S2 ST7789

Post by mikeysklar »

@Bernschneider,

We had a forum user successfully get the bin file installed and they clearly documented the steps using the 3.1-dev version of esptool.py.

viewtopic.php?f=60&t=176774&p=862340&hilit=ttgo#p862340

Code: Select all

moment).

*** Details of first method - using builtin bootloader and the circuitpython.bin file ****
I will use the Raspberry Pi 4 (4M version)
The lilygo_tgo_t8_s2_st7789 board can be put in one of two modes, what I call Native USB mode and ch-340 mode. To use the "builtin bootloader and the circuitpython.bin" method you need to put the lilygo_tgo_t8_s2_st7789 board into ch-340 mode. 
(If looking at the board the dip switch is in the lower left corner.
Dip Switch from left to right UP DOWN UP DOWN)
The ch-340 mode uses usb/uart chip.
Connect the lilygo_tgo_t8_s2_st7789 board to a USB port on the Raspberry Pi. Connect to the Raspberry Pi. You can connect using keyboard/Monitor or VNC or SSH. I used SSH.
1. Install esptool.py using pip ($sudo install esptool). Check what version of esptool you have ...
$esptool.py version My esptool is ...
esptool.py v3.1-dev
3.1-dev
make sure your version is 3.0 or later.
2. Find out what port is being used for the lilygo_tgo_t8_s2_st7789. Simplest method is to do a $ls /dev/tty* then remove the board a do $la /dev/tty* and check the difference. My port was /dev/ttyUSB0
3. Clean up your lilygo_tgo_t8_s2_st7789 board
$ esptool.py --chip auto --port /dev/ttyUSB0 erase_flash 
4. If you haven't already download the latest circuipython.bin file for the lilygo_tgo_t8_s2_st7789 board from circuitpython.org
5. install the circuitpython.bin file onto the lilygo_tgo_t8_s2_st7789 board
$ esptool.py --chip auto --port /dev/ttyUSB0 -b 460800 --before=default_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0000 ./circuitpython.bin

User avatar
Bernschneider
 
Posts: 3
Joined: Thu May 06, 2021 11:16 am

Re: Installing Circuitpython on TTGO T8 ESP32-S2 ST7789

Post by Bernschneider »

@mikesysklar
Many thank for this link!

The described method looks very good as I had already reached the point, where the builtin display shows the message described by Frank.

I only didn´t know, that I then must toggle the dip switches and in this way change the board into Native USB mode :-)

I will get the new board in a few days and immediately will try it out.

Cheers, Peter

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”