mirror of https://github.com/ARMmbed/mbed-os.git
tools: regions only if bootloader is supported
We removed catching and passing, we want to know for any misconfiguration if bootloader is supported. Regions should check if bootloader is supported. In case not, just return. Otherwise we catch any error. This should help us to uncover missing regions or other config error (in case bootloader is enabled via bootloader_supported set to true).pull/12059/head
parent
5ec7a0b625
commit
d7e0012bc7
|
@ -894,6 +894,10 @@ class mbedToolchain(with_metaclass(ABCMeta, object)):
|
|||
def add_regions(self):
|
||||
"""Add regions to the build profile, if there are any.
|
||||
"""
|
||||
|
||||
if not getattr(self.target, "bootloader_supported", False):
|
||||
return
|
||||
|
||||
if self.config.has_regions:
|
||||
regions = list(self.config.regions)
|
||||
regions.sort(key=lambda x: x.start)
|
||||
|
@ -913,6 +917,7 @@ class mbedToolchain(with_metaclass(ABCMeta, object)):
|
|||
|
||||
Region = namedtuple("Region", "name start size")
|
||||
|
||||
|
||||
# Add all available ROM regions to build profile
|
||||
if not getattr(self.target, "static_memory_defines", False):
|
||||
raise ConfigException()
|
||||
|
@ -926,7 +931,6 @@ class mbedToolchain(with_metaclass(ABCMeta, object)):
|
|||
True,
|
||||
suffixes=["_START", "_SIZE"]
|
||||
)
|
||||
|
||||
# Add all available RAM regions to build profile
|
||||
if not getattr(self.target, "static_memory_defines", False):
|
||||
raise ConfigException()
|
||||
|
@ -941,7 +945,6 @@ class mbedToolchain(with_metaclass(ABCMeta, object)):
|
|||
suffixes=["_START", "_SIZE"]
|
||||
)
|
||||
|
||||
|
||||
STACK_PARAM = "target.boot-stack-size"
|
||||
TFM_LVL_PARAM = "tfm.level"
|
||||
XIP_ENABLE_PARAM = "target.xip-enable"
|
||||
|
|
Loading…
Reference in New Issue