mirror of https://github.com/ARMmbed/mbed-os.git
Removing the dependency of TDBStore in SystemStorage.h and NVStore co-existence checkup if compile for target TFM
parent
41ecde9c30
commit
eb7cbc1432
|
@ -24,7 +24,10 @@
|
||||||
#include "mbed_error.h"
|
#include "mbed_error.h"
|
||||||
#include "mbed_wait_api.h"
|
#include "mbed_wait_api.h"
|
||||||
#include "MbedCRC.h"
|
#include "MbedCRC.h"
|
||||||
|
//Bypass the check of NVStore co existance if compiled for TARGET_TFM
|
||||||
|
#if !(TARGET_TFM_BYPASS_NVSTORE_CHECK)
|
||||||
#include "SystemStorage.h"
|
#include "SystemStorage.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace mbed;
|
using namespace mbed;
|
||||||
|
|
||||||
|
@ -990,6 +993,9 @@ int TDBStore::init()
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Bypass the check of NVStore co existance if compiled for TARGET_TFM
|
||||||
|
#if !(TARGET_TFM_BYPASS_NVSTORE_CHECK)
|
||||||
|
|
||||||
//Check if we are on internal memory && try to set the internal memory for TDBStore use.
|
//Check if we are on internal memory && try to set the internal memory for TDBStore use.
|
||||||
if (strcmp(_bd->get_type(), "FLASHIAP") == 0 &&
|
if (strcmp(_bd->get_type(), "FLASHIAP") == 0 &&
|
||||||
avoid_conflict_nvstore_tdbstore(TDBSTORE) == MBED_ERROR_ALREADY_INITIALIZED) {
|
avoid_conflict_nvstore_tdbstore(TDBSTORE) == MBED_ERROR_ALREADY_INITIALIZED) {
|
||||||
|
@ -997,6 +1003,8 @@ int TDBStore::init()
|
||||||
MBED_ERROR(MBED_ERROR_ALREADY_INITIALIZED, "TDBStore in internal memory can not be initialize when NVStore is in use");
|
MBED_ERROR(MBED_ERROR_ALREADY_INITIALIZED, "TDBStore in internal memory can not be initialize when NVStore is in use");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
_max_keys = initial_max_keys;
|
_max_keys = initial_max_keys;
|
||||||
|
|
||||||
ram_table = new ram_table_entry_t[_max_keys];
|
ram_table = new ram_table_entry_t[_max_keys];
|
||||||
|
|
Loading…
Reference in New Issue