From 8876b7ef3878d26717f73af3e6cb39a015720a2a Mon Sep 17 00:00:00 2001 From: Marcus Chang Date: Thu, 27 Oct 2016 10:26:28 +0100 Subject: [PATCH] Removed static declaration for the StorageVolumeManager in the CFStore because this componenent is shared across all users of the flash. Added define guards to the CFStore location and size so that these can be changed from the settings file. --- .../storage/FEATURE_STORAGE/cfstore/source/cfstore_svm.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/features/storage/FEATURE_STORAGE/cfstore/source/cfstore_svm.cpp b/features/storage/FEATURE_STORAGE/cfstore/source/cfstore_svm.cpp index c1c6c72d86..e8fcd853c8 100644 --- a/features/storage/FEATURE_STORAGE/cfstore/source/cfstore_svm.cpp +++ b/features/storage/FEATURE_STORAGE/cfstore/source/cfstore_svm.cpp @@ -29,8 +29,13 @@ * so it can be called by the C-HAL implementation configuration_store.c */ +#ifndef CFSTORE_SVM_VOL_01_START_OFFSET #define CFSTORE_SVM_VOL_01_START_OFFSET 0x80000UL +#endif + +#ifndef CFSTORE_SVM_VOL_01_SIZE #define CFSTORE_SVM_VOL_01_SIZE 0x80000UL +#endif #ifdef CFSTORE_CONFIG_BACKEND_FLASH_ENABLED extern ARM_DRIVER_STORAGE ARM_Driver_Storage_MTD_K64F; @@ -39,7 +44,7 @@ static ARM_DRIVER_STORAGE *cfstore_svm_storage_drv = &ARM_Driver_Storage_MTD_K64 #endif /* CFSTORE_CONFIG_BACKEND_FLASH_ENABLED */ /* the storage volume manager instance used to generate virtual mtd descriptors */ -static StorageVolumeManager volumeManager; +StorageVolumeManager volumeManager; /* used only for the initialization of the volume-manager. */ static void cfstore_svm_volume_manager_initialize_callback(int32_t status)