Date

Overview

This is a shot post on how to set up the TTGO T8 with the stock Micropython firmware.
A more in-depth guide of building the firmware will come later.

TTGO T8

I had been using DFRobot's ESP32 FireBeetle boards for some time with out too much to complain about.
However ESP32 boards and the Espressif API are getting more advanced.
One feature that will really help out us MicroPython users is SPI SRAM also known as psRAM.
This neat feature lets board designers incorporate an external RAM module wried in parallel with the SPI flash chip.
This gives us way more free memory to make use of.
Normally when running MicroPython on an ESP32 you would have only 100's of KB available free memory, now with the psRAM chip you get up to 4MB!
Not to say you can't do amazing things with only a few 100KB, but given the price point of the T8 boards it is a simple choice.

Sadly the DfRobot part has not really kept up, so I went in search for something else.
I found the LilyGO TTGO T8 to be an amazing board for the price point.
In addition they have full schematics available on there Github repo.

Stock firmware

One good thing about the ESP32 boards is they mostly work with the stock firmware.
This lets you play-around and get a good feel of what you could do with the boards.

First your going to need the esptool.
On most distributions you can install it via pip:

pip install esptool

Next up we need to erase the flash of the new ESP32 boards.
Find out what serial device your board appears as. Use dmesg etc...
Mine use the kernel module cp210x and it appears at /dev/ttyUSB0.
Since its the first board plugged in.

To erase :

esptool --chip esp32 --port /dev/ttyUSB0 erase_flash

Now your going to need a Micropython firmware that has been pre-built and ready to flash.
Lucky for us that is easy as going to the Micropython Downloads page.
In this example I used the firmware esp32spiram-20190513-v1.10-338-gf812394c3.bin This will give us access to the psRAM.

Flash it with :

esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z 0x1000 esp32spiram-20190513-v1.10-338-gf812394c3.bin 

You should now be able to connect via minicom or some other serial emulator.
Connect with 115200 8N1 no soft or hardware flow control.

You can check to see if the psRAM is working via :

MicroPython v1.10-338-gf812394c3 on 2019-05-13; ESP32 module with ESP32
Type "help()" for more information.     
>>> import gc                           
>>> gc.collect()
>>> gc.mem_free()
4093392
>>> 

With a custom build of Micropython we can get more detailed boot messages to also confirm this better, however for now this is the best we have.
In another post I will detail how to build from scratch, and how to use custom modules and auto booting our code base.


Comments

There are no comments yet. Email me and I will add your comment.