You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following is the complete list of storage configuration parameters and how to use and override default implementation if needed.
11
-
For more details regarding configuration parameters please refer [the configuration system documentation](configuration.md).
10
+
Below is the complete list of storage configuration parameters, as generated by `mbed compile --config -v`, and how to use and override default implementation. For more details regarding configuration parameters, please refer to [the configuration system documentation](configuration.md).
12
11
13
12
### LittleFS configuration
14
13
@@ -99,20 +98,23 @@ Name: nvstore.max_keys
99
98
```
100
99
101
100
### BlockDevice - default configuration
102
-
Mbed-os configuration allows you to add block devices as components using the targets json file or target overrides in application config file.
103
101
104
-
When one of the following components is enabled a default block device will be set in the system.
102
+
The Mbed OS configuration allows you to add block devices as components using the `targets.json` file or target overrides in the application configuration file.
105
103
106
-
1. SPIF component.
107
-
2. DATAFLASH component.
108
-
3. SD component.
104
+
When one of the following components is enabled, a default block device is set in the system:
105
+
106
+
1. SPIF component.
107
+
1. DATAFLASH component.
108
+
1. SD component.
109
109
110
110
Components can coexist in the system. A device can have SPIF and SD or any combination of block devices enabled but only one default block device.
111
111
112
-
The list above is in precedence order and show which block device will be the default one if more than one component will be enabled.
112
+
The list above is in the order of precedence shows which block device is the default one if more than one component is enabled.
113
+
114
+
#### Configuring components
113
115
114
-
#### configuring component:
115
116
Adding "components": ["???"] in targets.json:
117
+
116
118
```
117
119
"K64F": {
118
120
"supported_form_factors": ["ARDUINO"],
@@ -134,7 +136,9 @@ Adding "components": ["???"] in targets.json:
134
136
}
135
137
},
136
138
```
139
+
137
140
Adding "target.components_add": ["???"] in application config file:
The get default instance is implemented as [MBED_WEAK](https://github.com/ARMmbed/mbed-os/blob/40058871de290edc758a21ae6d8f2ec1d1b3533d/platform/mbed_toolchain.h#L120) at features/storage/system_storage/SystemStorage.cpp. That means that it can be overridden by implementing the function without MBED_WEAK and change the default block device for a given application.
The get default instance is implemented as [MBED_WEAK](https://github.com/ARMmbed/mbed-os/blob/40058871de290edc758a21ae6d8f2ec1d1b3533d/platform/mbed_toolchain.h#L120) at `features/storage/system_storage/SystemStorage.cpp`. That means that can override it by implementing the function without `MBED_WEAK` and change the default block device for a given application.
Mbed-os configuration allows you to add block devices as components using the targets json file or target overrides in application config file.
164
-
When a component of SPIF, DATAFLASH or SD are configured then the system will support one default file system.
168
+
The Mbed OS configuration allows you to add block devices as components using the `targets.json` file or target overrides in the application configuration file. When you configure a component of SPIF, DATAFLASH or SD, the system supports one default file system.
165
169
166
-
Please note that while a default file system exists an application is not enforced to use it and can create its own one.
170
+
Please note that while a default file system exists, an application is not forced to use it and can create its own one.
167
171
168
-
The default file system will be created based on the default block device due to performance considerations.
169
-
SPIF and DATAFLASH block devices will support Little file system while SD block device will support FAT file system.
172
+
The default file system is created based on the default block device due to performance considerations.
173
+
174
+
SPIF and DATAFLASH block devices support the Little file system, and the SD block device supports the FAT file system. However, the application can ovveride this behavior.
The get default instance is implemented as MBED_WEAK at features/storage/system_storage/SystemStorage.cpp. That means that it can be overridden by implementing the function without MBED_WEAK and change the default block device for a given application.
178
+
The get default instance is implemented as `MBED_WEAK` at `features/storage/system_storage/SystemStorage.cpp`. That means you can overridde it by implementing the function without `MBED_WEAK` and change the default block device for a given application.
174
179
175
-
The following example will override the get default instance of and will always return a FAT file system regardless of the block device type.
180
+
The following example overrides the get default instance of and always returns a FAT file system regardless of the block device type:
0 commit comments