FlashDB: a lightweight embedded database with wear leveling and power-off protection

AI-generated summary of reporting by GitHub Opensource Projects. Read the original for the full story.

Why it matters

Embedded developers can drop in a ready-made C library instead of hand-rolling flash storage that survives power loss and flash wear.

Read this as

FlashDB is a small, free, open-source database for gadgets and machines that store data on flash memory chips. Unlike typical storage code, it spreads writes evenly across the chip so it wears out slowly, and it protects data even if the power is cut mid-save. It works without a file system, so it runs on tiny computers like smart locks or sensor devices. Anyone building battery-powered hardware can grab it from GitHub.

FlashDB, an MIT-style C library from developer armink, removes a recurring cost for device makers: corrupted data after power cuts and flash chips wearing out from repeated writes. It handles both problems internally, replacing the custom flash hacks many teams maintain. Relevant to IoT, smart locks, and industrial controller vendors. No licensing terms, support model, or adoption figures are given in the article.

FlashDB (github.com/armink/FlashDB) is a C library for NOR and NAND flash offering two storage modes: string key-value (KV) for configs and append-only time-series for sensor logs. It performs wear leveling by tracking erase counts and spreading writes, and uses a journal-like rollback for power-off safety on partial writes. Memory is allocated dynamically, no file system or OS is required, and demos exist for STM32, ESP32, and Linux. No benchmark numbers are provided in the article.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

FlashDB armink STM32 ESP32 NOR NAND

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading

datasette-charts 0.5a0

Datasette Charts 0.5a0 adds calendar heatmaps, box plots and active-over-time charts, enabling richer data visualisation directly in the browser without extra libraries.