We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84f3444 commit 577d450Copy full SHA for 577d450
storage/platform/source/PlatformStorage.cpp
@@ -156,10 +156,17 @@ MBED_WEAK FileSystem *FileSystem::get_default_instance()
156
157
#elif COMPONENT_FLASHIAP
158
159
+// To avoid alignment issues, initialize a filesystem if all sectors have the same size
160
+// OR the user has specified an address range
161
+#if MBED_CONF_TARGET_INTERNAL_FLASH_UNIFORM_SECTORS || \
162
+ (MBED_CONF_FLASHIAP_BLOCK_DEVICE_SIZE != 0) && (MBED_CONF_FLASHIAP_BLOCK_DEVICE_BASE_ADDRESS != 0xFFFFFFFF)
163
static LittleFileSystem flash("flash", BlockDevice::get_default_instance());
164
flash.set_as_default();
165
166
return &flash;
167
+#else
168
+ return NULL;
169
+#endif
170
171
#else
172
0 commit comments