Giter Club home page Giter Club logo

ringfs's Introduction

RingFS, a small Flash-based ring buffer.

Build Status

RingFS is a persistent, Flash-based ring buffer designed for embedded software. It's aimed at storing non-critical data that can be expunged on the FIFO basis as needed. Typical uses include:

  • telemetry data,
  • debug logs,
  • stack traces.

RingFS has been designed to run on NOR Flash memory, which exhibits the following semantics:

  1. Bits are programmed by flipping them from 1 to 0 with byte granularity.
  2. Bits are erased by flipping them from 0 to 1 with sector granularity.

Features

  • Designed and optimized for NOR Flash memory.
  • Stores fixed-size objects in a FIFO buffer.
  • Written in ISO C99.
  • No dynamic memory allocation.
  • Basic robustness features for error recovery.

Usage

  1. Add ringfs.c and ringfs.h to your project.
  2. Implement the required Flash ops (sector_erase, program, read).
  3. Glue your Flash ops with ringfs using struct ringfs_flash_partition.

See example.c if this sounds complicated.

Documentation

See Doxygen-generated documentation at http://cloudyourcar.github.io/ringfs/.

Non-Features

The ring buffer has been designed to be as simple as possible. Therefore, the following are non-features that will not be implemented:

  • Variable object sizes (makes things much more complicated).
  • Complicated error recovery (we can lose data in edge cases).
  • Upgrades (complex, also unnecessary in our use cases).

Actually, on the second thought, I may consider adding support for variable object sizes some day.

License

Copyright © 2014 Kosma Moczek <[email protected]>

This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See the COPYING file for more details.

ringfs's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.