uLisp now supports ESP32-S2, ESP32-S3, and ESP32-C3 boards


#1

The ESP Version 4.1 of uLisp now adds support for several new ESP32 modules recently released by Espressif: the ESP32-S2, ESP32-C3, and ESP32-S3.

Also, uLisp ESP Version 4.1 now uses LittleFS to allow you to save the entire workspace on all ESP32 boards using (save-image).

Specifications

The following table compares all the features of these modules relevant to uLisp:

ESP8266 ESP32 ESP32-S2 ESP32-C3 ESP32-S3 ESP32-C6
Released Aug 2014 Sept 2016 Sept 2019 Nov 2020 Dec 2020 April 2021
MCU Tensilica L106 Tensilica LX6 Tensilica LX7 RISC-V Tensilica LX7 RISC-V
Speed 160 MHz 240 MHz 240 MHz 160 MHz 240 MHz 160 MHz
Cores 1 1 or 2 1 1 2 1
SRAM 160 KB 520 KB 320 KB 400 KB 512 KB 400 KB
Wi-Fi Wi-Fi 4 Wi-Fi 4 Wi-Fi 4 Wi-Fi 4 Wi-Fi 4 Wi-Fi 6
Bluetooth No BLE 4.2 No BLE 5.0 BLE 5.0 BLE 5.0
SPI 2 4 4 3 ? ?
I2C 1 2 2 1 2 ?
UART 2 3 2 2 ? ?
USB No No USB USB USB ?
ADC 1 x 10-bit 2 x 8-bit 2 x 8-bit No ? No
DAC No 2 x 8-bit 2 x 8-bit No ? No
Benchmark 14.3 s (UART) 8.0 s (UART) 2.7 s (USB)* 7.8 s (UART) 6.1 s (UART) ?

The benchmark is the time taken to calculate the recursive integer function (tak 18 12 6); see Benchmarks.

* Or 5.7 s (UART).

Highlights

The key highlights of these differences are:

  • The ESP32-S2, ESP32-C3, and ESP32-S3 have native USB, which means that boards can be designed without needing a separate USB-to-Serial chip.
  • The ESP32-C3 is based on a RISC-V processor, making it a lower cost option.
  • The ESP32-S3 is an updated ESP32, offering the same features but with higher specifications.

Several manufacturers have made boards based on the ESP32-S2, and here I’ve reviewed a selection of six different ones that I can recommend for use with uLisp.

ESP32-S2-Saola-1

The ESP32-S2-Saola-1 is Espressif’s official development board based on the ESP32-S2-WROOM module. It uses a CP2102 USB-to-Serial chip for the serial interface:

It has 4 Mbytes of SPI flash but no SPI PSRAM.

Installing uLisp from the Arduino IDE

  • Install the ESP32 Arduino core version 2.0.3 or later.
  • Select ESP32 Arduino from the Board menu, and ESP32S2 Dev Module from the submenu.

You can leave the other options at their defaults.

WROOM and WROVER

An alternative version of this board based on a WROVER module incorporates an 8 Mbyte SPI PSRAM chip. Currently uLisp doesn’t take advantage of this.

Native USB

The ESP32-S2 supports native USB. To use this you need to wire D19 and D20 to the D- and D+ connections of a USB socket or cable, and upload uLisp with the USB CDC On Boot option set to Enabled.

Adafruit ESP32-S2 Feather

The Adafruit ESP32-S2 Feather adopts the same format as Adafruit’s other Feather boards, making it compatible with a number of their Feather wings:

It has a USB-C connector, and uses the ESP32-S2’s native USB, avoiding the need for a UART chip.

It provides 4 MB flash and 2 MB PSRAM, and includes a JST connector for a Lipo battery, a Lipo charger to allow the battery to be charged from the USB port, and an I2C LC709203 battery monitor chip. The board also has a QWIIC/STEMMA QT connector for connecting I2C modules.

A version is also available with an integrated BME280 temperature/humidity/pressure sensor.

Installing uLisp from the Arduino IDE

There seems to be a problem with Adafruit’s own board option for this board so I recommend using Espressif’s generic board file:

  • Install the ESP32 Arduino core version 2.0.3 or later.
  • Select ESP32 Arduino from the Board menu.
  • Select the ESP32S2 Dev Module board option.
  • Set USB CDC On Boot to Enabled.

You can leave the other options at their defaults.

Adafruit ESP32-S2 QT-Py

The Adafruit ESP32-S2 QT-Py adopts the same compact format as their other QT-Py boards:

It has a USB-C connector, and uses the ESP32-S2’s native USB, avoiding the need for a UART chip. It provides 4 MB flash and 2 MB PSRAM.

Installing uLisp from the Arduino IDE

Adafruit’s own board option for this board doesn’t seem to work with LittleFS, so I recommend using Espressif’s generic board file which is fine:

  • Install the ESP32 Arduino core version 2.0.3 or later.
  • Select ESP32 Arduino from the Board menu.
  • Select the ESP32S2 Dev Module board option.
  • Set USB CDC On Boot to Enabled.

You can leave the other options at their defaults.

Unexpected Maker Feather S2

Another Feather-format board is the Unexpected Maker FeatherS2:

It has a USB-C connector, and uses the ESP32-S2’s native USB, avoiding the need for a UART chip. It provides 16 MB flash and 8 MB PSRAM. Like the Adafruit board it includes a JST connector for a Lipo battery, and a Lipo charger to allow the battery to be charged from the USB port.

The board includes Power (red), Charge (orange), and pin 13 (blue) LEDs, an APA102 RGB LED which is easy to drive from uLisp, and an ALS-PT19 Ambient Light Sensor which you can read on an analogue input.

The board has a QWIIC/STEMMA QT connector for connecting I2C modules.

Installing uLisp from the Arduino IDE

  • Install the ESP32 Arduino core version 2.0.3 or later.
  • Select ESP32 Arduino from the Board menu.
  • Select the UM FeatherS2 board option.
  • Set Partition Scheme to Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), otherwise you won’t be able to use save-image.

You can leave the other options at their defaults.

ESP32-C3-DevKitM-1

The ESP32-C3-DevKitM-1 is Espressif’s official DevKit board for the RISC-V ESP32-C3 based on the ESP32-C3-MINI-1 module. It uses a CP2102 USB-to-Serial chip for the serial interface, so doesn’t take advantage of the ESP-C3’s built-in USB interface:

It provides 4 Mbytes of SPI flash, but no PSRAM.

Installing uLisp from the Arduino IDE

  • Install the ESP32 Arduino core version 2.0.3 or later.
  • Select ESP32 Arduino from the Board menu.
  • Select the ESP32C3 Dev Module board option.

You can leave the other options at their defaults.

ESP32-S3-DevKitM-1

The ESP-S3-DevKitM-1 is Espressif’s official DevKit board for the ESP32-S3 based on the ESP32-S3-MINI-1 module. It provides 8 Mbytes of flash and no PSRAM. A variety of other S3 boards are also available with the options of 32 Mbytes of flash, and 2 Mbytes or 8 Mbytes of PSRAM.

The DevKit S3 boards have two USB connections: the one labelled UART uses a CP2102 USB-to-Serial chip for the serial interface, and the one labelled USB connects to the ESP32-S3’s built-in USB interface:

Installing uLisp from the Arduino IDE

With the current ESP32 Arduino core there’s a problem using the built-in USB interface, so I recommend only using the UART connection:

  • Install the ESP32 Arduino core version 2.0.3 or later.
  • Connect your computer to the USB connection labelled UART.
  • Select ESP32 Arduino from the Board menu.
  • Select the ESP32S3 Dev Module board option.
  • Set USB CDC On Boot to Disabled to use the UART.

You can leave the other options at their defaults.