Boris Lovosevic edited this page Mar 30, 2018 · 24 revisions

Welcome to the LoBo MicroPython for ESP32

This repository can be used to build MicroPython for ESP32 boards/modules with psRAM as well as for ESP32 boards/modules without psRAM.

Building on Linux, MacOS, Windows (including Linux Subsystem on Windows 10) and ARM platforms (like RaspberyPi and other fruit_Pi systems) is supported.

MicroPython works great on ESP32, but the most serious issue is still (as on most other MicroPython boards) limited amount of free memory.
This repository contains all the tools and sources necessary to build working MicroPython firmware which can fully use the advantages of 4MB (or more) of psRAM.
It is huge difference between MicroPython running with less than 100KB of free memory and running with 4MB of free memory.

You can discuss about this MicroPython port on its forum.

ESP32 can use external SPIRAM (psRAM) to expand available RAM up to 16MB.
It is highly recommended to use the board/module with 4MB of psRAM for MicroPython development.

Currently, there are several modules & development boards which incorporates 4MB of psRAM:


  • MicroPython core based on latest build from main Micropython repository
  • added changes needed to build for ESP32 with psRAM
  • Default configuration has 2MB of MicroPython heap, 20KB of MicroPython stack, ~200KB of free DRAM heap for C modules and functions
  • MicroPython can be built in unicore (FreeRTOS & MicroPython task running only on the first ESP32 core, or dualcore configuration (MicroPython task running on ESP32 App core)
  • ESP32 Flash can be configured in any mode, QIO, QOUT, DIO, DOUT
  • script is provided to make building MicroPython firmware as easy as possible
  • Internal Fat filesystem is built with esp-idf wear leveling driver, so there is less danger of damaging the flash with frequent writes.
  • SPIFFS and LittleFS file systems are supported and can be used instead of FatFS in SPI Flash. Configurable via menuconfig
  • Flexible automatic and/or manual filesystem configuration
  • sdcard support is included which uses esp-idf sdmmc driver and can work in SD mode (1-bit and 4-bit) or in SPI mode (sd card can be connected to any pins). For imformation on how to connect sdcard see the documentation.
  • Files timestamp is correctly set to system time both on internal fat filesysten and on sdcard
  • Native ESP32 VFS support for spi Flash & sdcard filesystems.
  • RTC Class is added to machine module, including methods for synchronization of system time to ntp server, deepsleep, wakeup from deepsleep on external pin level, ...
  • Time zone can be configured via menuconfig and is used when syncronizing time from NTP server
  • Built-in ymodem module for fast transfer of text/binary files to/from host
  • Some additional frozen modules are added, like pye editor, urequests, functools, logging, ...
  • Btree module included, can be Enabled/Disabled via menuconfig
  • _threads module greatly improved, inter-thread notifications and messaging included
  • Neopixel module using ESP32 RMT peripheral with many new features
  • DHT module implemented using ESP32 RMT peripheral
  • 1-wire module implemented using ESP32 RMT peripheral
  • i2c module uses ESP32 hardware i2c driver
  • spi module uses ESP32 hardware spi driver
  • adc module improved, new functions added
  • pwm module, ESP32 hardware based
  • timer module improved, new timer types and features
  • curl module added, many client protocols including FTP and eMAIL
  • ssh module added with sftp/scp support and exec function to execute program on server
  • display module added with full support for spi TFT displays
  • mqtt module added, implemented in C, runs in separate task
  • mDNS module added, implemented in C, runs in separate task
  • telnet module added, connect to REPL via WiFi using telnet protocol
  • ftp server module added, runs as separate ESP32 task
  • GSM/PPPoS support, connect to the Internet via GSM module
  • OTA Update supported, various partitions layouts
  • Eclipse project files included. To include it into Eclipse goto File->Import->Existing Projects into Workspace->Select root directory->[select MicroPython_BUILD directory]->Finish. Rebuild index.

ESP32 documentation not related to MicroPython

ESP-IDF Programming Guide
Espressif Documentation

MicroPython documentation not related to ESP32 port

MicroPython documentation - pyboard
MicroPython documentation - ESP8266

Internal FS (SPIFFS): Mounted on partition 'internalfs' [size: 2097152; Flash address: 0x1E0000]
Filesystem size: 1920256 B
           Used: 512 B
           Free: 1919744 B

FreeRTOS running on BOTH CORES, MicroPython task running on both cores.
Running from partition at 10000, type 0 [MicroPython].

 Reset reason: Power on reset
    uPY stack: 19456 bytes
     uPY heap: 2049088/5536/2043552 bytes (in SPIRAM using malloc)

MicroPython ESP32_LoBo_v3.1.0 - 2018-01-01 on ESP32-WROVER-KIT with ESP32
Type "help()" for more information.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.