3 ms·
SQLite definitely does not require a filesystem interface, or even standard OS interface. It does require some kind of storage, though, but that could be direc
by jly 11y ago
SQLite definitely does not require a filesystem interface, or even standard OS interface. It does require some kind of storage, though, but that could be direct flash, RAM, etc.
I have spent a lot of time with it on ARM Cortex-M-class devices on small RTOSes or even bare metal, and you can adapt it to almost anything by plugging in new VFS interfaces (http://www.sqlite.org/vfs.html http://www.sqlite.org/vfs.html).
It does require at least 10s of kb of RAM as a heap to do pretty much anything, as others have stated.
- to3m 11y agoThe ATmegas only go up to 16KBytes RAM, with 4KBytes or less being usual. As a Harvard architecture device, none of your binary is memory-mapped, which can make porting existing code a bit annoying. sizeof(int)==2, which doesn't help either (however sizeof(void *)==2 as well, so there is at least that). It's rather unusual by today's standards. Certainly quite different from an ARM.
- listic 11y ago...though still the latest and sanest of that crop of micro's, IMHO. Designed in 1996, it was once marketed as "the first new 8-bit architecture designed in 20 years", I believe :-)
- pfalcon 11y agoYou can adapt, or have you adapted? I looked at SQLite internals, and decided that I'll skip that adaptation for now, seeing if someone else would do that. LittleD's author says that he looked into adapting SQLite, and that's how he decided to write LittleD.
- geedy 11y agoHow little memory have you managed? They claim 100KiB, but if it could be even half that then there are some tremendous opportunities to use it. I'd love to hear more about your work adapting SQLite for Cortex-M-class devices.