Skip to content

Commit d747682

Browse files
committed
Add init table initialization for scratch bd
1 parent 500550c commit d747682

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

envie/ota.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,11 @@ mbed::BlockDevice* get_secondary_bd(void) {
386386

387387
mbed::BlockDevice* get_scratch_bd(void) {
388388

389+
if(!BlockTableLoaded) {
390+
initBlockTable();
391+
BlockTableLoaded = true;
392+
}
393+
389394
if(block_info[SCRATCH_BLOCK_DEVICE].raw_flag) {
390395
return block_info[SCRATCH_BLOCK_DEVICE].log_bd;;
391396
} else {

0 commit comments

Comments
 (0)