Skip to content

Commit 64853b3

Browse files
authored
Merge pull request #12119 from ARMmbed/release-candidate
Release candidate for mbed-os-5.15.0-rc3
2 parents 5d7f5bd + 034de2f commit 64853b3

File tree

3 files changed

+51
-39
lines changed

3 files changed

+51
-39
lines changed

features/storage/kvstore/conf/kv_config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#include "components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.h"
5252

5353
#if (STATIC_PINMAP_READY)
54-
constexpr spi_pinmap_t static_spi_pinmap = get_spi_pinmap(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, NC);
54+
const spi_pinmap_t static_spi_pinmap = get_spi_pinmap(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, NC);
5555
#endif
5656
#endif
5757

features/storage/system_storage/SystemStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include "components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.h"
4242

4343
#if (STATIC_PINMAP_READY)
44-
constexpr spi_pinmap_t static_spi_pinmap = get_spi_pinmap(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, NC);
44+
const spi_pinmap_t static_spi_pinmap = get_spi_pinmap(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, NC);
4545
#endif
4646
#endif
4747

tools/toolchains/mbed_toolchain.py

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -899,51 +899,63 @@ def add_regions(self):
899899
return
900900

901901
if self.config.has_regions:
902-
regions = list(self.config.regions)
903-
regions.sort(key=lambda x: x.start)
904-
self.notify.info("Using ROM region%s %s in this build." % (
905-
"s" if len(regions) > 1 else "",
906-
", ".join(r.name for r in regions)
907-
))
908-
self._add_all_regions(regions, "MBED_APP")
902+
try:
903+
regions = list(self.config.regions)
904+
regions.sort(key=lambda x: x.start)
905+
self.notify.info("Using ROM region%s %s in this build." % (
906+
"s" if len(regions) > 1 else "",
907+
", ".join(r.name for r in regions)
908+
))
909+
self._add_all_regions(regions, "MBED_APP")
910+
except ConfigException as error:
911+
self.notify.info("Configuration error: %s" % str(error))
909912

910913
if self.config.has_ram_regions:
911-
regions = list(self.config.ram_regions)
912-
self.notify.info("Using RAM region%s %s in this build." % (
913-
"s" if len(regions) > 1 else "",
914-
", ".join(r.name for r in regions)
915-
))
916-
self._add_all_regions(regions, None)
914+
try:
915+
regions = list(self.config.ram_regions)
916+
self.notify.info("Using RAM region%s %s in this build." % (
917+
"s" if len(regions) > 1 else "",
918+
", ".join(r.name for r in regions)
919+
))
920+
self._add_all_regions(regions, None)
921+
except ConfigException as error:
922+
self.notify.info("Configuration error: %s" % str(error))
917923

918924
Region = namedtuple("Region", "name start size")
919925

920-
921-
# Add all available ROM regions to build profile
922926
if not getattr(self.target, "static_memory_defines", False):
923-
raise ConfigException()
924-
rom_available_regions = self.config.get_all_active_memories(
925-
ROM_ALL_MEMORIES
926-
)
927-
for key, value in rom_available_regions.items():
928-
rom_start, rom_size = value
929-
self._add_defines_from_region(
930-
Region("MBED_" + key, rom_start, rom_size),
931-
True,
932-
suffixes=["_START", "_SIZE"]
927+
self.notify.info("Configuration error: 'static_memory_defines' is not defined.")
928+
return
929+
930+
try:
931+
# Add all available ROM regions to build profile
932+
rom_available_regions = self.config.get_all_active_memories(
933+
ROM_ALL_MEMORIES
933934
)
934-
# Add all available RAM regions to build profile
935-
if not getattr(self.target, "static_memory_defines", False):
936-
raise ConfigException()
937-
ram_available_regions = self.config.get_all_active_memories(
938-
RAM_ALL_MEMORIES
939-
)
940-
for key, value in ram_available_regions.items():
941-
ram_start, ram_size = value
942-
self._add_defines_from_region(
943-
Region("MBED_" + key, ram_start, ram_size),
944-
True,
945-
suffixes=["_START", "_SIZE"]
935+
for key, value in rom_available_regions.items():
936+
rom_start, rom_size = value
937+
self._add_defines_from_region(
938+
Region("MBED_" + key, rom_start, rom_size),
939+
True,
940+
suffixes=["_START", "_SIZE"]
941+
)
942+
except ConfigException as error:
943+
self.notify.info("Configuration error: %s" % str(error))
944+
945+
try:
946+
# Add all available RAM regions to build profile
947+
ram_available_regions = self.config.get_all_active_memories(
948+
RAM_ALL_MEMORIES
946949
)
950+
for key, value in ram_available_regions.items():
951+
ram_start, ram_size = value
952+
self._add_defines_from_region(
953+
Region("MBED_" + key, ram_start, ram_size),
954+
True,
955+
suffixes=["_START", "_SIZE"]
956+
)
957+
except ConfigException as error:
958+
self.notify.info("Configuration error: %s" % str(error))
947959

948960
STACK_PARAM = "target.boot-stack-size"
949961
TFM_LVL_PARAM = "tfm.level"

0 commit comments

Comments
 (0)