You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Hans-Erik Floryd d032aaf881 lseek should return the resulting offset 9 years ago
docs Some thoughts for next gen 10 years ago
src lseek should return the resulting offset 9 years ago
LICENSE updated licence and version 10 years ago
README readme update for 0.3.0 10 years ago
files.mk made build a bit more configurable 10 years ago
makefile even moar testrunner updates 10 years ago

README

SPIFFS (SPI Flash File System)
V0.3.0

Copyright (c) 2013-2015 Peter Andersson (pelleplutt1976<at>gmail.com)

For legal stuff, see LICENCE in this directory. Basically, you may do whatever
you want with the source. Use, modify, sell, print it out, roll it and smoke it
- as long as I won't be held responsible.

Love to hear feedback though!


* INTRODUCTION

Spiffs is a file system intended for SPI NOR flash devices on embedded targets.

Spiffs is designed with following characteristics in mind:
- Small (embedded) targets, sparse RAM without heap
- Only big areas of data (blocks) can be erased
- An erase will reset all bits in block to ones
- Writing pulls one to zeroes
- Zeroes can only be pulled to ones by erase
- Wear leveling


* FEATURES

What spiffs does:
- Specifically designed for low ram usage
- Uses statically sized ram buffers, independent of number of files
- Posix-like api: open, close, read, write, seek, stat, etc
- It can be run on any NOR flash, not only SPI flash - theoretically also on
embedded flash of an microprocessor
- Multiple spiffs configurations can be run on same target - and even on same
SPI flash device
- Implements static wear leveling
- Built in file system consistency checks

What spiffs does not:
- Presently, spiffs does not support directories. It produces a flat
structure. Creating a file with path "tmp/myfile.txt" will create a file
called "tmp/myfile.txt" instead of a "myfile.txt" under directory "tmp".
- It is not a realtime stack. One write operation might take much longer than
another.
- Poor scalability. Spiffs is intended for small memory devices - the normal
sizes for SPI flashes. Going beyond ~128MB is probably a bad idea. This is
a side effect of the design goal to use as little ram as possible.
- Presently, it does not detect or handle bad blocks.


* MORE INFO

For integration, see the docs/INTEGRATION file.

For use and design, see the docs/TECH_SPEC file.

For testing and contributions, see the docs/IMPLEMENTING file.

* HISTORY

0.3.0
Added existing namecheck when creating files
Lots of static analysis bugs #6
Added rename func
Fix SPIFFS_read length when reading beyond file size
Added reading beyond file length testcase
Made build a bit more configurable
Changed name in spiffs from "errno" to "err_code" due to conflicts compiling
in mingw
Improved GC checks, fixed an append bug, more robust truncate for very special
case
GC checks preempts GC, truncate even less picky
Struct alignment needed for some targets, define in spiffs config #10
Spiffs filesystem magic, definable in config

New config defines:
SPIFFS_USE_MAGIC - enable or disable magic check upon mount
SPIFFS_ALIGNED_OBJECT_INDEX_TABLES - alignment for certain targets
New API functions:
SPIFFS_rename - rename files
SPIFFS_clearerr - clears last errno
SPIFFS_info - returns info on used and total bytes in fs
SPIFFS_format - formats the filesystem
SPIFFS_mounted - checks if filesystem is mounted