Skip to content
Elvin Slavik edited this page Nov 27, 2021 · 4 revisions

ESP32

The typical method of compiling usqlite for ESP32 based devices is to use the USER_C_MODULES parameter with make.

See also MicroPython port to the ESP32

e.g. Compiling on a Linux system targeting the TinyPICO with a project root folder in the home directory named tinypico

partitions.csv

Before building, you may need to edit partitions.csv to ensure the factory partition is large enough for MicroPython when usqlite is included. Typically an additional ~550Kb is needed, depending on the SQLite configuration options.

e.g. ~/tinypico/micropython/ports/esp32/partitions.csv

# Notes: the offset of the partition table itself is set in
# $IDF_PATH/components/partition_table/Kconfig.projbuild.
# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x6000,
phy_init, data, phy,     0xf000,  0x1000,
factory,  app,  factory, 0x10000, 0x240000,
vfs,      data, fat,     0x2C0000, 0x140000,

Compiling

cd ~/tinypico/micropython/ports/esp32
make submodules
make clean BOARD=UM_TINYPICO
make BOARD=UM_TINYPICO USER_C_MODULES=~/tinypico/modules/micropython.cmake
Clone this wiki locally