Skip to content

Commit c6810a6

Browse files
theotherjimmyadbridge
authored andcommitted
Correct auto-sizing last region in bl
1 parent 0dc3132 commit c6810a6

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
@@ -549,6 +549,7 @@ def regions(self):
549549

550550
def _generate_bootloader_build(self, rom_start, rom_size):
551551
start = rom_start
552+
rom_end = rom_start + rom_size
552553
if self.target.bootloader_img:
553554
if isabs(self.target.bootloader_img):
554555
filename = self.target.bootloader_img
@@ -571,10 +572,10 @@ def _generate_bootloader_build(self, rom_start, rom_size):
571572
new_size = Config._align_floor(start + new_size, self.sectors) - start
572573
yield Region("application", start, new_size, True, None)
573574
start += new_size
574-
yield Region("post_application", start, rom_size - start,
575+
yield Region("post_application", start, rom_end - start,
575576
False, None)
576577
else:
577-
yield Region("application", start, rom_size - start,
578+
yield Region("application", start, rom_end - start,
578579
True, None)
579580
if start > rom_start + rom_size:
580581
raise ConfigException("Not enough memory on device to fit all "

0 commit comments

Comments
 (0)