Correct auto-sizing last region in bl

pull/6017/head
Jimmy Brisson 2018-02-05 14:00:12 -06:00
parent c52d1edd3e
commit 9c3b489bf6
1 changed files with 3 additions and 2 deletions

View File

@ -566,6 +566,7 @@ class Config(object):
def _generate_bootloader_build(self, rom_start, rom_size):
start = rom_start
rom_end = rom_start + rom_size
if self.target.bootloader_img:
if isabs(self.target.bootloader_img):
filename = self.target.bootloader_img
@ -588,10 +589,10 @@ class Config(object):
new_size = Config._align_floor(start + new_size, self.sectors) - start
yield Region("application", start, new_size, True, None)
start += new_size
yield Region("post_application", start, rom_size - start,
yield Region("post_application", start, rom_end - start,
False, None)
else:
yield Region("application", start, rom_size - start,
yield Region("application", start, rom_end - start,
True, None)
if start > rom_start + rom_size:
raise ConfigException("Not enough memory on device to fit all "