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.

History

Merge pull request #40 from 0xc0170/fix_license default tip

2019-06-03, by mbed_official [Mon, 03 Jun 2019 15:02:15 +0100] rev 29

Merge pull request #40 from 0xc0170/fix_license

add contributing + license files
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nvstore


Updating mbed-os to mbed-os-5.11.5

2019-02-25, by mbed_official [Mon, 25 Feb 2019 16:45:58 +0000] rev 28

Updating mbed-os to mbed-os-5.11.5

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nvstore


Updating mbed-os to mbed-os-5.11.4

2019-02-13, by mbed_official [Wed, 13 Feb 2019 18:36:55 +0000] rev 27

Updating mbed-os to mbed-os-5.11.4

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nvstore


Updating mbed-os to mbed-os-5.11.2

2019-01-17, by mbed_official [Thu, 17 Jan 2019 13:30:30 +0000] rev 26

Updating mbed-os to mbed-os-5.11.2

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nvstore


Updating mbed-os to mbed-os-5.11.1

2019-01-03, by mbed_official [Thu, 03 Jan 2019 14:00:31 +0000] rev 25

Updating mbed-os to mbed-os-5.11.1

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nvstore


Updating mbed-os to mbed-os-5.10.4

2018-11-17, by mbed_official [Sat, 17 Nov 2018 16:15:28 +0000] rev 24

Updating mbed-os to mbed-os-5.10.4

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nvstore


Updating mbed-os to mbed-os-5.10.3

2018-11-06, by mbed_official [Tue, 06 Nov 2018 15:30:26 +0000] rev 23

Updating mbed-os to mbed-os-5.10.3

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nvstore


Updating mbed-os to mbed-os-5.10.2

2018-10-21, by mbed_official [Sun, 21 Oct 2018 11:30:21 +0100] rev 22

Updating mbed-os to mbed-os-5.10.2

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nvstore


Updating mbed-os to mbed-os-5.10.1

2018-10-09, by mbed_official [Tue, 09 Oct 2018 15:15:30 +0100] rev 21

Updating mbed-os to mbed-os-5.10.1

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nvstore


Updating mbed-os to mbed-os-5.10.0

2018-09-26, by mbed_official [Wed, 26 Sep 2018 09:15:22 +0100] rev 20

Updating mbed-os to mbed-os-5.10.0

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-nvstore