Skip to content

kaladim/microeeprommanager

Repository files navigation

mEEM: automatic EEPROM manager for resource-constrained embedded systems.

Why mEEM?

  • Unlike most of the freely available EEPROM libraries, the mEEM provides your application with a non-blocking, immediate-like access to non-volatile data.
  • Guarantees data integrity through checksum verification and provision of default values, so your application would never operate with invalid/undefined data.
  • Configurable via GUI tool and JSON files, so you don't have to deal with EEPROM addresses at all.
  • Platform-independent: can be used on bare metal, with Arduinos or RTOSes. It follows an asynchronous, non-blocking programming model, that fits everywhere. Thread-safe with caution.
  • Hardware-independent: uses unified interface to MCUs' on-chip EEPROMs, external serial EEPROMs/FLASHes, on-chip data FLASHes.
  • Highly scalable, with minimalalistic memory footprint
  • Manages up to 64KiB EEPROM address space
  • Written in C99

Principle of operation (TL;DR)

At startup, the mEEM loads all EEPROM data into RAM (the "cache") and validates it; if data is invalid, default values are loaded; your application uses only the cache, and occasionnaly requests specific caches to be written back to the EEPROM.
For more, see a detailed description.

Get & setup the repo

$ git clone https://github.com/kaladim/microeeprommanager.git
$ cd microeeprommanager
$ git submodule update --init

Prerequisites

Python 3.10 (or newer) + an active virtual environment:
Linux/macOS:

$ source ./setup_venv.sh

Windows:

> .\setup_venv.ps1

Integration

1. Configure & generate:

  • The process is covered in details here.

2. Implement the required interface:

A well-written EEPROM access driver and properly chosen checksum algorithm have crucial role in the proper operation of the mEEM!

3. Include the MEEM.h in your application code.

The provided API consists of two parts:

  • Core: interface to the mEEM's core logic, provided by the MEEM.h header
  • Generated: project-specific interface, provided by the MEEM_GenInterface.h header.
    Since the mEEM is useless without the generated interface, MEEM.h includes also MEEM_GenInterface.h.
  • Although block caches have public visibility, avoid their direct usage. Prefer the generated getters and setters.

4. Update your make configuration/project:

See the provided complete example for reference.

Tools

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

EEPROM manager for resource-constrained embedded systems

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published