Skip to content

Commit 4f95298

Browse files
author
Cruz Monrreal
authored
Merge pull request #9361 from yossi2le/yossi_fix_for_tfm
Removing dependency of TDBStore in SystemStorage file and moving some file location - TFM support.
2 parents d0665c8 + 971e29b commit 4f95298

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

features/storage/kvstore/tdbstore/TDBStore.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
#include "mbed_error.h"
2525
#include "mbed_wait_api.h"
2626
#include "MbedCRC.h"
27+
//Bypass the check of NVStore co existance if compiled for TARGET_TFM
28+
#if !(BYPASS_NVSTORE_CHECK)
2729
#include "SystemStorage.h"
30+
#endif
2831

2932
using namespace mbed;
3033

@@ -990,13 +993,18 @@ int TDBStore::init()
990993
goto end;
991994
}
992995

996+
//Bypass the check of NVStore co existance if compiled for TARGET_TFM
997+
#if !(BYPASS_NVSTORE_CHECK)
998+
993999
//Check if we are on internal memory && try to set the internal memory for TDBStore use.
9941000
if (strcmp(_bd->get_type(), "FLASHIAP") == 0 &&
9951001
avoid_conflict_nvstore_tdbstore(TDBSTORE) == MBED_ERROR_ALREADY_INITIALIZED) {
9961002

9971003
MBED_ERROR(MBED_ERROR_ALREADY_INITIALIZED, "TDBStore in internal memory can not be initialize when NVStore is in use");
9981004
}
9991005

1006+
#endif
1007+
10001008
_max_keys = initial_max_keys;
10011009

10021010
ram_table = new ram_table_entry_t[_max_keys];

0 commit comments

Comments
 (0)