NVStore example for Mbed OS. This is an example of an application that uses the NVStore APIs. The application invokes the NVStore APIs and prints the results after each such invocation.

Required hardware

# Other hardware

Although the board shown in this examples is K64F, the example should work on any Mbed enabled hardware supporting the internal flash driver (has "FLASH" in the "device_has" in targets/target.json file).

Getting started

1. Import the example.

``` mbed import mbed-os-example-nvstore cd mbed-os-example-nvstore ```

2. Keep the default NVStore configuration, which uses the last two sectors (4KB each) as NVStore areas.

3. Compile and generate binary.

For example, for `GCC`:

``` mbed compile -t GCC_ARM -m K64F ```

4. Open a serial console session with the target platform using the following parameters:

  • Baud rate: 115200
  • Data bits: 8
  • Stop bits: 1
  • Parity: None

5. Copy the application `mbed-os-example-nvstore.bin` in the folder `mbed-os-example-nvstore/BUILD/<TARGET NAME>/<PLATFORM NAME>` onto the target board.

6. Press the RESET button on the board to run the program

7. The serial console should now display a series of results following the NVStore API invocations.

8. Now copy `mbed_app-8KB-areas.json` to `mbed_app.json`. This should use 8KB areas (two pairs of last sectors) as NVStore areas.

9. Repeat steps 3-7. Notice the changes in prints of area addresses and sizes and with the amount of possible keys this configuration can hold.

10. To restore the default configuration, copy `mbed_app-default-areas.json` to `mbed_app.json`.

Troubleshooting

If you have problems, you can review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions on what could be wrong and how to fix it.

Revisions of mbed-os.lib

Revision Date Message Actions
28:2186be283b24 2019-02-25 Updating mbed-os to mbed-os-5.11.5 File  Diff  Annotate
27:67cb2a76af94 2019-02-13 Updating mbed-os to mbed-os-5.11.4 File  Diff  Annotate
26:eb17e27ab54b 2019-01-17 Updating mbed-os to mbed-os-5.11.2 File  Diff  Annotate
25:fba8278c680e 2019-01-03 Updating mbed-os to mbed-os-5.11.1 File  Diff  Annotate
24:73f5870799bc 2018-11-17 Updating mbed-os to mbed-os-5.10.4 File  Diff  Annotate
23:5d3c52519198 2018-11-06 Updating mbed-os to mbed-os-5.10.3 File  Diff  Annotate
22:db2d98cf2058 2018-10-21 Updating mbed-os to mbed-os-5.10.2 File  Diff  Annotate
21:1ca7002f733f 2018-10-09 Updating mbed-os to mbed-os-5.10.1 File  Diff  Annotate
20:accd39a66940 2018-09-26 Updating mbed-os to mbed-os-5.10.0 File  Diff  Annotate
19:f1883c5841cb 2018-09-12 Updating mbed-os to mbed-os-5.9.7 File  Diff  Annotate
18:41f7e1bc8d31 2018-08-27 Updating mbed-os to mbed-os-5.9.6 File  Diff  Annotate
17:92f511fb1da8 2018-08-14 Updating mbed-os to mbed-os-5.9.5 File  Diff  Annotate
15:c7b544388e4c 2018-07-31 Updating mbed-os to mbed-os-5.9.4 File  Diff  Annotate
14:3843d13a3fb2 2018-07-17 Updating mbed-os to mbed-os-5.9.3 File  Diff  Annotate
13:9724d5a821f1 2018-07-02 Updating mbed-os to mbed-os-5.9.2 File  Diff  Annotate
12:2b03a2d8be7c 2018-06-19 Updating mbed-os to mbed-os-5.9.1 File  Diff  Annotate
11:516e2a9585c9 2018-06-17 Updating mbed-os to mbed-os-5.9 File  Diff  Annotate
10:b64036e4f4a5 2018-06-06 Updating mbed-os to mbed-os-5.8.6 File  Diff  Annotate
8:75a1504e1ca6 2018-05-21 Merge pull request #14 from adbridge/master File  Diff  Annotate
7:3f53957748cd 2018-05-10 Merge pull request #13 from 0xc0170/master File  Diff  Annotate
6:acc419d26ebb 2018-05-02 Merge pull request #11 from adbridge/master File  Diff  Annotate
5:13baabb74bd2 2018-04-12 Update mbed-os.lib reference to mbed-os-5.8.2 File  Diff  Annotate
4:ee16fe8f874c 2018-03-29 Update mbed-os.lib reference to mbed-os-5.8.1 File  Diff  Annotate
0:6e33ad0eda0c 2018-03-08 Update mbed-os reference to the one in main repo File  Diff  Annotate