Skip to content

CFStore fix needed for the Cloud Client #3143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was it static previously? shouldn't there be a getter rather than global scope symbol?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, the StorageVolumeManager should be a singleton for each flash region. It is not and people can use it wrong. Getters would be preferable, but reasons.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
I think this is an acceptable change. More work is required in this area as indicated by Marcus C.
Thanks
Simon

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
I think this is an acceptable change. More work is required in this area as indicated by Marcus C.
Thanks
Simon


/* used only for the initialization of the volume-manager. */
static void cfstore_svm_volume_manager_initialize_callback(int32_t status)
Expand Down