From cda8a9d3c832e082ee799fe69d05c77b1f1207e0 Mon Sep 17 00:00:00 2001 From: ccli8 Date: Mon, 18 Nov 2024 10:52:36 +0800 Subject: [PATCH] Support override of memory_bank_config in mbed_app.json (#381) memory_bank_config can be defined in targets.json or custom_targets.json per-target, but cannot by application. This enables this override by adding "target.memory_bank_config" config in target_overrides section of mbed_app.json as usual. --- tools/python/mbed_tools/build/_internal/config/config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/python/mbed_tools/build/_internal/config/config.py b/tools/python/mbed_tools/build/_internal/config/config.py index 7444c9324aa..946bb74a258 100644 --- a/tools/python/mbed_tools/build/_internal/config/config.py +++ b/tools/python/mbed_tools/build/_internal/config/config.py @@ -41,6 +41,11 @@ def _handle_overrides(self, overrides: Iterable[Override]) -> None: _apply_override(self.data, override) continue + # Support override of memory_bank_config in mbed_app.json + if override.namespace == "target" and override.name == "memory_bank_config": + _apply_override(self.data, override) + continue + setting = next( filter( lambda x: x.name == override.name and x.namespace == override.namespace,