Coder Social home page Coder Social logo

flashiap-driver's Introduction

Block Device driver build on top of FlashIAP API

Warning

This driver is EXPERIMENTAL and improper usage could kill your board's flash.

This driver should only be used on platforms where the FlashIAP implementation is using external flash or in conjunction with a filesystem with wear leveling, that can operate on a page size granularity.

Additional concerns:

  • The BlockDevice API assumes a uniform erase size so the underlying flash must also have uniform sectors.
  • The FlashIAP may freeze code execution for a long period of time while writing to flash. Not even high-priority irqs will be allowed to run, which may interrupt background processes.

Configuration

The driver must be configured with the starting address for the internal flash area reserved for the block device and it's size in bytes. In the application's mbed_app.json, add the following lines:

{
    "target_overrides": {
        "K64F": {
            "flashiap-block-device.base-address": "<internal flash address where the block device starts>",
            "flashiap-block-device.size": "<number of bytes allocated to the internal flash block device>"
        }
    }
}

Tested on

  • Realtek RTL8195AM
  • K64F

flashiap-driver's People

Contributors

geky avatar

Stargazers

Jongmin Kim avatar Brynn Davis avatar Martino Facchin avatar MaskedW avatar James Wang avatar

Watchers

James Cloos avatar Kevin Gilbert avatar  avatar Russ Butler avatar Jussi Vatjus-Anttila avatar Marcus Chang avatar Sam Taylor avatar Shay Almog avatar Pasi Viitanen avatar  avatar

flashiap-driver's Issues

Confusing documentation

I am trying to see if it is possible to use an nRF52 board (actually a UBLOX NINA-B112) and its internal flash to store the BLE Keys for bonding on power reset. The documentation is a bit confusing/fuzzy. It states:

This driver should only be used on platforms where the FlashIAP implementation is using external flash or in conjunction with a filesystem with wear leveling, that can operate on a page size granularity.

First off, why does a platform require the FlashIAP implementation to use external flash? Doesn't this defeat the entire purpose of using In Application Programming to use the internal flash of the processor? I was under the impression from reading the documentation of FlashIAP, that it uses the internal flash to do reads and writes. So what does having external flash have anything to do with the FlashIAP?

Secondly, it states I need to use a filesystem with wear leveling that can operate on a page size granularity. I would need a FileSystem to mount the FlashIAPBLockDevice in order to use the internal security manager that is built in to store the BLE keys for you. If I used the LittleFileSystem wouldn't I get the wear leveling? Not sure about the page size granularity though.

My point is if I don't have external flash available on the NRF52, will I be able to use this FlashIAP driver with the LittleFileSystem in order to store bonded keys (to be used on resets) using the BLE Security Manager?

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.