Skip to content

Commit

Permalink
Merge pull request #9237 from yossi2le/yossi_remove_num_entreies
Browse files Browse the repository at this point in the history
Refactoring and fixing some issues in KVStore configuration.
  • Loading branch information
0xc0170 authored Jan 8, 2019
2 parents 63eca29 + 71afcf6 commit b833bbd
Show file tree
Hide file tree
Showing 5 changed files with 236 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ The following is a list of all storage parameters available and their descriptio
* `TDB_EXTERNAL_NO_RBP`.
* `FILESYSTEM`.
* `FILESYSTEM_NO_RBP`.
* `default`
If default is set, the system will choose the type of storage base on the block device component set in target.json. For QSPIF, SPIF and DATAFLASH block devices TDB_EXTERNAL will be used. If SD is set a FILESYSTEM storage is set and if only FLASHIAP exists as the only block device component, a TDB_INTERNAL will be used.
* `default_kv` - This is a string representing the path for the default KVStore instantiation. Applications can pass an empty path (only the key name) or pass the generated name for this parameter (`MBED_CONF_STORAGE_DEFAULT_KV`) as the path to use this configuration.
* `internal_size` - The size in bytes for the internal FlashIAP block device. This, together with the `internal_base_address`, adjusts exactly the size and location where the block device resides on memory. If not defined, the block device will try to get the maximum size available.
* `internal_base_address` - The address where the internal FlashIAP blockDevice starts. This helps to prevent collisions with other needs, such as firmware updates. If not defined, the start address will be set to the first sector after the application code ends in `TDB_internal`. In any external configurations with rollback protection support, it will be set to end of flash - `rbp_internal_size`.
Expand All @@ -83,7 +85,7 @@ Below is the main storage configuration `mbed_lib.json` file:
"name": "storage",
"config": {
"storage_type": {
"help": "Options are TDB_INTERNAL, TDB_EXTERNAL, TDB_EXTERNAL_NO_RBP, FILESYSTEM or FILESYSTEM_NO_RBP.",
"help": "Options are TDB_INTERNAL, TDB_EXTERNAL, TDB_EXTERNAL_NO_RBP, FILESYSTEM, FILESYSTEM_NO_RBP or default. If default, the storage type will be chosen according to the component defined in targets.json",
"value": "NULL"
},
"default_kv": {
Expand Down
6 changes: 1 addition & 5 deletions features/storage/kvstore/conf/filesystem/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
"name": "storage_filesystem",
"config": {
"rbp_internal_size": {
"help": "If default the size will be 4K*#entries/32",
"help": "Default is the size of the 2 last sectors of internal flash",
"value": "0"
},
"rbp_number_of_entries": {
"help": "If not defined default is 64",
"value": "64"
},
"internal_base_address": {
"help": "If default, base address is the first sector after the application code",
"value": "0"
Expand Down
Loading

0 comments on commit b833bbd

Please sign in to comment.