logo
0
0
WeChat Login

FBRDB: Flash-Based Record Database

This project aims to achieve a robust record database, which is stored in a flash.

The NOR flash or NAND flash requires an erase action before writing data. At the same time, the storage space in embedded system is extremely limited, and the power is unstable so that the data may be lost anytime.

FBRDB provide these interface to manage your records (with a fixed record size):

  • walk
  • insert
  • update
  • delete
  • free/clean

They will make sure your data will not be lost if the embeded system shutdown at any point.

Compile

Test on Intel/AMD machine

sudo apt-get install -y cmake build-essential
git clone https://e.coding.net/moooc/stm32_samples/fbrdb.git
cd fbrdb/
cmake -DMACHINE=intel .
make
./fbrdb.elf

Test on STM32F1xx machine

sudo apt-get install -y cmake gcc-arm-none-eabi
git clone https://e.coding.net/moooc/stm32_samples/fbrdb.git
cd fbrdb/
cmake -DMACHINE=stm32f1 .
make
# upload to stm32f1xx board and run

TODO

Currently, the sector recycle function is not perfect, and need some further optimize.

Acknowledgement

Licence

Apache Licence 2.0

About

No description, topics, or website provided.
Language
C27.4%
Assembly5%
HTML0.3%
CMake0.1%
Others67.2%