Skip to content

Commit 9a0c341

Browse files
nordicjm57300
authored andcommitted
[nrf noup] scripts: west: build: Use sysbuild by default if in NCS dir
Uses sysbuild by default when building an application which resides in an allowed NCS-based directory when the sysbuild config key is not set. Do not use sysbuild if the mps2 board is being used to avoid problems with CI testing. Signed-off-by: Jamie McCrae <[email protected]> Signed-off-by: Grzegorz Swiderski <[email protected]>
1 parent 5ccf7a2 commit 9a0c341

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/west_commands/build.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
import sys
1010
import yaml
1111

12+
from pathlib import Path
13+
from zephyr_ext_common import ZEPHYR_BASE
14+
sys.path.append(os.fspath(Path(__file__).parent.parent))
15+
import zephyr_module
16+
1217
from west import log
1318
from west.configuration import config
1419
from zcmake import DEFAULT_CMAKE_GENERATOR, run_cmake, run_build, CMakeCache
@@ -679,4 +684,13 @@ def _check_sysbuild_default(self):
679684
if config_sysbuild is not None:
680685
return config_sysbuild, 'default, based on west config'
681686

687+
# Check if this is an ncs-repo directory
688+
allow_list = { 'mcuboot', 'sidewalk', 'find-my', 'nrf', 'matter', 'suit-processor',
689+
'memfault-firmware-sdk', 'zscilib', 'uoscore-uedhoc', 'zcbor',
690+
'hal_nordic', 'ncs-example-application' }
691+
692+
for module in zephyr_module.parse_modules(ZEPHYR_BASE, self._manifest):
693+
if module.meta['name'] in allow_list and Path.cwd().is_relative_to(module.project):
694+
return True, 'default for NCS repositories'
695+
682696
return False, 'default'

0 commit comments

Comments
 (0)