Is it possible to create a SQLite database on the ESP32?
[Copy link]
Here is a discussion on the English forum:
https://forum.micropython.org/viewtopic ... 13&p=46770
Is it possible to create a SQLite database on ESP32?
Dilan
micropython-sqlite3 only works with a version of micropython that has FFI. It's basically just a frontend to the sqlite3 C version, which is probably too large to run on the ESP32.
I suppose it might be possible to port it to the ESP32. The libsqlite3.a file on my Mac is 1.8 Mb. But I'm guessing it would take a lot of effort, since I imagine sqlite3 makes heavy use of C runtime library functions, many of which are not implemented on the micro platform. You'd probably also need a lot of RAM.
Dave Hylands
Jimo There
were some experiments done a few years ago (~2014) that showed a cut-down SQLite would have a ROM of about 200k, and not ostensibly hard to implement.
I'd be curious what you'd do with SQLite on a microcontroller though.
As Dave points out, micropython-lib is very confusing because half the stuff in it won't work on most ports. I'd like to fix this - see https://github.com/micropython/micropython-lib/pull/376
|