File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ static int RAMFUNCTION nvm_select_fresh_sector(int part)
191191 int sel ;
192192 uintptr_t off ;
193193 uint8_t * base ;
194- uint8_t * addrErase ;
194+ uint8_t * addrErase = 0 ;
195195 uint32_t magic_off = 0 ;
196196 uint32_t word_0 ;
197197 uint32_t word_1 ;
@@ -205,8 +205,13 @@ static int RAMFUNCTION nvm_select_fresh_sector(int part)
205205 }
206206 else {
207207 base = (uint8_t * )PART_UPDATE_ENDFLAGS ;
208+ #ifdef FLAGS_HOME
209+ addrErase = (uint8_t * )WOLFBOOT_PARTITION_BOOT_ADDRESS +
210+ WOLFBOOT_PARTITION_SIZE - WOLFBOOT_SECTOR_SIZE ;
211+ #else
208212 addrErase = (uint8_t * )WOLFBOOT_PARTITION_UPDATE_ADDRESS +
209213 WOLFBOOT_PARTITION_SIZE - WOLFBOOT_SECTOR_SIZE ;
214+ #endif
210215 }
211216
212217#ifdef EXT_ENCRYPTED
You can’t perform that action at this time.
0 commit comments