Skip to content

Commit 9c3b489

Browse files
committed
Correct auto-sizing last region in bl
1 parent c52d1ed commit 9c3b489

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/config/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ def regions(self):
566566

567567
def _generate_bootloader_build(self, rom_start, rom_size):
568568
start = rom_start
569+
rom_end = rom_start + rom_size
569570
if self.target.bootloader_img:
570571
if isabs(self.target.bootloader_img):
571572
filename = self.target.bootloader_img
@@ -588,10 +589,10 @@ def _generate_bootloader_build(self, rom_start, rom_size):
588589
new_size = Config._align_floor(start + new_size, self.sectors) - start
589590
yield Region("application", start, new_size, True, None)
590591
start += new_size
591-
yield Region("post_application", start, rom_size - start,
592+
yield Region("post_application", start, rom_end - start,
592593
False, None)
593594
else:
594-
yield Region("application", start, rom_size - start,
595+
yield Region("application", start, rom_end - start,
595596
True, None)
596597
if start > rom_start + rom_size:
597598
raise ConfigException("Not enough memory on device to fit all "

0 commit comments

Comments
 (0)