PhoenixPilot/PhoenixPilot — pull request #87 by solidgoldbomb (2012-12-12 07:07:03+00:00)
Title: stac/log structured fs

PLEASE DO NOT MERGE THIS INTO YOUR DEVELOPMENT BRANCHES UNTIL THIS REVIEW IS COMPLETED.

This series is directly or indirectly related to the addition of a log-structured filesystem.
* Defines an API that all filesystems provide to the UAVObject manager
* Defines an API that all flash devices provide to filesystems
* Refactors the flash layer to support plugable flash devices using the new flash driver API
* Maps the SPI+JEDEC external flash driver to the new flash driver API
* Provides a log-structured filesystem that sits on top of the new common flash layer
* Activates the new logfs on all boards that have external SPI flash
* Removes the old objlist filesystem
* Adds a new flash driver for the STM32 internal flash (F4-only so far since I don't have an F3)
* Adds a bare-bones board target for the discoveryF4 so I had something to test the F4 filesystem on
* Makes discoveryF4 board use the STM32 internal flash driver on 2 of the 16KB flash sectors between the BL and FW banks.
* misc bug fixes

The filesystem needs documentation in the wiki.

This patch set needs serious testing before merging anywhere. It worked for me during some fairly extensive testing.

A few notes:
* Currently configured to wear-level over the entire external SPI flash.
* Currently limited to use only ONE of (a) internal flash or (b) external SPI flash at a time.
* Max saved object size is 256 - 12 = 244 bytes per slot.
* Requires all sectors within the filesystem to be the same size.
* Requires a minimum of 2 equal sized sectors.
* Internal flash driver currently always uses byte-writes. Could be more efficient to do word writes.