Skip to content

Commit

Permalink
Merge pull request #12119 from ARMmbed/release-candidate
Browse files Browse the repository at this point in the history
Release candidate for mbed-os-5.15.0-rc3
  • Loading branch information
adbridge authored Dec 16, 2019
2 parents 5d7f5bd + 034de2f commit 64853b3
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 39 deletions.
2 changes: 1 addition & 1 deletion features/storage/kvstore/conf/kv_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include "components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.h"

#if (STATIC_PINMAP_READY)
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);
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);
#endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion features/storage/system_storage/SystemStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include "components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.h"

#if (STATIC_PINMAP_READY)
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);
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);
#endif
#endif

Expand Down
86 changes: 49 additions & 37 deletions tools/toolchains/mbed_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,51 +899,63 @@ def add_regions(self):
return

if self.config.has_regions:
regions = list(self.config.regions)
regions.sort(key=lambda x: x.start)
self.notify.info("Using ROM region%s %s in this build." % (
"s" if len(regions) > 1 else "",
", ".join(r.name for r in regions)
))
self._add_all_regions(regions, "MBED_APP")
try:
regions = list(self.config.regions)
regions.sort(key=lambda x: x.start)
self.notify.info("Using ROM region%s %s in this build." % (
"s" if len(regions) > 1 else "",
", ".join(r.name for r in regions)
))
self._add_all_regions(regions, "MBED_APP")
except ConfigException as error:
self.notify.info("Configuration error: %s" % str(error))

if self.config.has_ram_regions:
regions = list(self.config.ram_regions)
self.notify.info("Using RAM region%s %s in this build." % (
"s" if len(regions) > 1 else "",
", ".join(r.name for r in regions)
))
self._add_all_regions(regions, None)
try:
regions = list(self.config.ram_regions)
self.notify.info("Using RAM region%s %s in this build." % (
"s" if len(regions) > 1 else "",
", ".join(r.name for r in regions)
))
self._add_all_regions(regions, None)
except ConfigException as error:
self.notify.info("Configuration error: %s" % str(error))

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()
rom_available_regions = self.config.get_all_active_memories(
ROM_ALL_MEMORIES
)
for key, value in rom_available_regions.items():
rom_start, rom_size = value
self._add_defines_from_region(
Region("MBED_" + key, rom_start, rom_size),
True,
suffixes=["_START", "_SIZE"]
self.notify.info("Configuration error: 'static_memory_defines' is not defined.")
return

try:
# Add all available ROM regions to build profile
rom_available_regions = self.config.get_all_active_memories(
ROM_ALL_MEMORIES
)
# Add all available RAM regions to build profile
if not getattr(self.target, "static_memory_defines", False):
raise ConfigException()
ram_available_regions = self.config.get_all_active_memories(
RAM_ALL_MEMORIES
)
for key, value in ram_available_regions.items():
ram_start, ram_size = value
self._add_defines_from_region(
Region("MBED_" + key, ram_start, ram_size),
True,
suffixes=["_START", "_SIZE"]
for key, value in rom_available_regions.items():
rom_start, rom_size = value
self._add_defines_from_region(
Region("MBED_" + key, rom_start, rom_size),
True,
suffixes=["_START", "_SIZE"]
)
except ConfigException as error:
self.notify.info("Configuration error: %s" % str(error))

try:
# Add all available RAM regions to build profile
ram_available_regions = self.config.get_all_active_memories(
RAM_ALL_MEMORIES
)
for key, value in ram_available_regions.items():
ram_start, ram_size = value
self._add_defines_from_region(
Region("MBED_" + key, ram_start, ram_size),
True,
suffixes=["_START", "_SIZE"]
)
except ConfigException as error:
self.notify.info("Configuration error: %s" % str(error))

STACK_PARAM = "target.boot-stack-size"
TFM_LVL_PARAM = "tfm.level"
Expand Down

0 comments on commit 64853b3

Please sign in to comment.