mirror of https://github.com/ARMmbed/mbed-os.git
Remove hiding of config errors related to RAM and ROM regions handling.
Currently any misconfiguration of, for example, bootloader feature will cause the build system to just silently drop it and continue building which can lead to completed builds of something the user didn't want to build in worst case and failing builds after compilation (=wasted time) in the best.pull/12059/head
parent
b7c3b35d65
commit
5ec7a0b625
|
@ -895,7 +895,6 @@ class mbedToolchain(with_metaclass(ABCMeta, object)):
|
||||||
"""Add regions to the build profile, if there are any.
|
"""Add regions to the build profile, if there are any.
|
||||||
"""
|
"""
|
||||||
if self.config.has_regions:
|
if self.config.has_regions:
|
||||||
try:
|
|
||||||
regions = list(self.config.regions)
|
regions = list(self.config.regions)
|
||||||
regions.sort(key=lambda x: x.start)
|
regions.sort(key=lambda x: x.start)
|
||||||
self.notify.info("Using ROM region%s %s in this build." % (
|
self.notify.info("Using ROM region%s %s in this build." % (
|
||||||
|
@ -903,23 +902,17 @@ class mbedToolchain(with_metaclass(ABCMeta, object)):
|
||||||
", ".join(r.name for r in regions)
|
", ".join(r.name for r in regions)
|
||||||
))
|
))
|
||||||
self._add_all_regions(regions, "MBED_APP")
|
self._add_all_regions(regions, "MBED_APP")
|
||||||
except ConfigException:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if self.config.has_ram_regions:
|
if self.config.has_ram_regions:
|
||||||
try:
|
|
||||||
regions = list(self.config.ram_regions)
|
regions = list(self.config.ram_regions)
|
||||||
self.notify.info("Using RAM region%s %s in this build." % (
|
self.notify.info("Using RAM region%s %s in this build." % (
|
||||||
"s" if len(regions) > 1 else "",
|
"s" if len(regions) > 1 else "",
|
||||||
", ".join(r.name for r in regions)
|
", ".join(r.name for r in regions)
|
||||||
))
|
))
|
||||||
self._add_all_regions(regions, None)
|
self._add_all_regions(regions, None)
|
||||||
except ConfigException:
|
|
||||||
pass
|
|
||||||
|
|
||||||
Region = namedtuple("Region", "name start size")
|
Region = namedtuple("Region", "name start size")
|
||||||
|
|
||||||
try:
|
|
||||||
# Add all available ROM regions to build profile
|
# Add all available ROM regions to build profile
|
||||||
if not getattr(self.target, "static_memory_defines", False):
|
if not getattr(self.target, "static_memory_defines", False):
|
||||||
raise ConfigException()
|
raise ConfigException()
|
||||||
|
@ -933,9 +926,7 @@ class mbedToolchain(with_metaclass(ABCMeta, object)):
|
||||||
True,
|
True,
|
||||||
suffixes=["_START", "_SIZE"]
|
suffixes=["_START", "_SIZE"]
|
||||||
)
|
)
|
||||||
except ConfigException:
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
# Add all available RAM regions to build profile
|
# Add all available RAM regions to build profile
|
||||||
if not getattr(self.target, "static_memory_defines", False):
|
if not getattr(self.target, "static_memory_defines", False):
|
||||||
raise ConfigException()
|
raise ConfigException()
|
||||||
|
@ -949,8 +940,7 @@ class mbedToolchain(with_metaclass(ABCMeta, object)):
|
||||||
True,
|
True,
|
||||||
suffixes=["_START", "_SIZE"]
|
suffixes=["_START", "_SIZE"]
|
||||||
)
|
)
|
||||||
except ConfigException:
|
|
||||||
pass
|
|
||||||
|
|
||||||
STACK_PARAM = "target.boot-stack-size"
|
STACK_PARAM = "target.boot-stack-size"
|
||||||
TFM_LVL_PARAM = "tfm.level"
|
TFM_LVL_PARAM = "tfm.level"
|
||||||
|
|
Loading…
Reference in New Issue