Skip to content

Refactoring and fixing some issues in KVStore configuration. #9237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AnotherButler this addition to docs is confusing, could you help us reword it a bit to make it clearer?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Amanda is not available this week, can this be addressed separately (@yossi2le can you make sure it will be updated )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, I will take for that next week,

* `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