From 9c3b489bf6ea00ebc6d2bd695c6de431293693d0 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Mon, 5 Feb 2018 14:00:12 -0600 Subject: [PATCH] Correct auto-sizing last region in bl --- tools/config/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/config/__init__.py b/tools/config/__init__.py index 15a958b83b..70d2e58813 100644 --- a/tools/config/__init__.py +++ b/tools/config/__init__.py @@ -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 "