PlatformStorage: skip LittleFileSystem on internal flash with non-uniform sectors

pull/13593/head
Lingkai Dong 2020-09-10 16:12:42 +01:00
parent 84f3444691
commit 577d450c7b
1 changed files with 7 additions and 0 deletions

View File

@ -156,10 +156,17 @@ MBED_WEAK FileSystem *FileSystem::get_default_instance()
#elif COMPONENT_FLASHIAP
// To avoid alignment issues, initialize a filesystem if all sectors have the same size
// OR the user has specified an address range
#if MBED_CONF_TARGET_INTERNAL_FLASH_UNIFORM_SECTORS || \
(MBED_CONF_FLASHIAP_BLOCK_DEVICE_SIZE != 0) && (MBED_CONF_FLASHIAP_BLOCK_DEVICE_BASE_ADDRESS != 0xFFFFFFFF)
static LittleFileSystem flash("flash", BlockDevice::get_default_instance());
flash.set_as_default();
return &flash;
#else
return NULL;
#endif
#else