mirror of https://github.com/ARMmbed/mbed-os.git
PlatformStorage: skip LittleFileSystem on internal flash with non-uniform sectors
parent
84f3444691
commit
577d450c7b
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue