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.

Changes

RevisionDateWhoCommit message
29:226b38fd84c6 2019-06-03 mbed_official Merge pull request #40 from 0xc0170/fix_license default tip
28:2186be283b24 2019-02-25 mbed_official Updating mbed-os to mbed-os-5.11.5
27:67cb2a76af94 2019-02-13 mbed_official Updating mbed-os to mbed-os-5.11.4
26:eb17e27ab54b 2019-01-17 mbed_official Updating mbed-os to mbed-os-5.11.2
25:fba8278c680e 2019-01-03 mbed_official Updating mbed-os to mbed-os-5.11.1
24:73f5870799bc 2018-11-17 mbed_official Updating mbed-os to mbed-os-5.10.4
23:5d3c52519198 2018-11-06 mbed_official Updating mbed-os to mbed-os-5.10.3
22:db2d98cf2058 2018-10-21 mbed_official Updating mbed-os to mbed-os-5.10.2
21:1ca7002f733f 2018-10-09 mbed_official Updating mbed-os to mbed-os-5.10.1
20:accd39a66940 2018-09-26 mbed_official Updating mbed-os to mbed-os-5.10.0
19:f1883c5841cb 2018-09-12 mbed_official Updating mbed-os to mbed-os-5.9.7
18:41f7e1bc8d31 2018-08-27 mbed_official Updating mbed-os to mbed-os-5.9.6
17:92f511fb1da8 2018-08-14 mbed_official Updating mbed-os to mbed-os-5.9.5
16:ca085f3b6ad4 2018-07-31 mbed_official When printing the return code, tell if it's expected.
15:c7b544388e4c 2018-07-31 mbed_official Updating mbed-os to mbed-os-5.9.4
14:3843d13a3fb2 2018-07-17 mbed_official Updating mbed-os to mbed-os-5.9.3
13:9724d5a821f1 2018-07-02 mbed_official Updating mbed-os to mbed-os-5.9.2
12:2b03a2d8be7c 2018-06-19 mbed_official Updating mbed-os to mbed-os-5.9.1
11:516e2a9585c9 2018-06-17 mbed_official Updating mbed-os to mbed-os-5.9
10:b64036e4f4a5 2018-06-06 mbed_official Updating mbed-os to mbed-os-5.8.6
9:41427d643b56 2018-06-05 mbed_official Add configuration instructions to readme
8:75a1504e1ca6 2018-05-21 mbed_official Merge pull request #14 from adbridge/master
7:3f53957748cd 2018-05-10 mbed_official Merge pull request #13 from 0xc0170/master
6:acc419d26ebb 2018-05-02 mbed_official Merge pull request #11 from adbridge/master
5:13baabb74bd2 2018-04-12 mbed_official Update mbed-os.lib reference to mbed-os-5.8.2
4:ee16fe8f874c 2018-03-29 mbed_official Update mbed-os.lib reference to mbed-os-5.8.1
3:60267c5e2348 2018-03-12 mbed_official Add newline conversion parameter to configuration for proper display of line breaks
2:0a3e19b12855 2018-03-09 mbed_official Rename 8KB config file to have K64F in the name and clarify in README file.
1:5dde5d5f11d5 2018-03-09 mbed_official Fix example program for boards on which NVStore is disabled.
0:6e33ad0eda0c 2018-03-08 mbed_official Update mbed-os reference to the one in main repo