Skip to content

Commit eb60e67

Browse files
authored
Merge pull request #11913 from VeijoPesonen/tdbstore_min_size
LPC55S69_NS default TDBStore size increased to 32kB
2 parents b6edc5b + 8a0af60 commit eb60e67

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

features/storage/kvstore/conf/tdb_internal/mbed_lib.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
"internal_size": "0x8000",
1616
"internal_base_address": "0x00028000"
1717
},
18+
"LPC55S69_NS": {
19+
"internal_size": "0x8000",
20+
"internal_base_address": "0x00090000"
21+
},
1822
"DISCO_H747I": {
1923
"internal_size": "2*FLASH_SECTOR_SIZE",
2024
"internal_base_address": "0x080C0000"

features/storage/kvstore/tdbstore/TDBStore.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ TDBStore::TDBStore(BlockDevice *bd) : _ram_table(0), _max_keys(0),
134134
for (int i = 0; i < _max_open_iterators; i++) {
135135
_iterator_table[i] = { 0 };
136136
}
137+
138+
/* Minimum space required by Reserved area and master record */
139+
MBED_ASSERT(bd->size()
140+
>= (align_up(RESERVED_AREA_SIZE + sizeof(reserved_trailer_t), _prog_size)
141+
+ record_size(master_rec_key, sizeof(master_record_data_t))));
137142
}
138143

139144
TDBStore::~TDBStore()

0 commit comments

Comments
 (0)