mirror of https://github.com/ARMmbed/mbed-os.git
Correct auto-sizing last region in bl
parent
c52d1edd3e
commit
9c3b489bf6
|
@ -566,6 +566,7 @@ class Config(object):
|
||||||
|
|
||||||
def _generate_bootloader_build(self, rom_start, rom_size):
|
def _generate_bootloader_build(self, rom_start, rom_size):
|
||||||
start = rom_start
|
start = rom_start
|
||||||
|
rom_end = rom_start + rom_size
|
||||||
if self.target.bootloader_img:
|
if self.target.bootloader_img:
|
||||||
if isabs(self.target.bootloader_img):
|
if isabs(self.target.bootloader_img):
|
||||||
filename = 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
|
new_size = Config._align_floor(start + new_size, self.sectors) - start
|
||||||
yield Region("application", start, new_size, True, None)
|
yield Region("application", start, new_size, True, None)
|
||||||
start += new_size
|
start += new_size
|
||||||
yield Region("post_application", start, rom_size - start,
|
yield Region("post_application", start, rom_end - start,
|
||||||
False, None)
|
False, None)
|
||||||
else:
|
else:
|
||||||
yield Region("application", start, rom_size - start,
|
yield Region("application", start, rom_end - start,
|
||||||
True, None)
|
True, None)
|
||||||
if start > rom_start + rom_size:
|
if start > rom_start + rom_size:
|
||||||
raise ConfigException("Not enough memory on device to fit all "
|
raise ConfigException("Not enough memory on device to fit all "
|
||||||
|
|
Loading…
Reference in New Issue