Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nrf noup] scripts: west: build: Use sysbuild by default if in NCS dir #1713

Closed
wants to merge 1 commit into from

Conversation

nordicjm
Copy link
Contributor

Uses sysbuild by default when building an application which resides in an allowed NCS-based directory when the sysbuild config key is not set

Uses sysbuild by default when building an application which resides in
an allowed NCS-based directory when the sysbuild config key is not set

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Copy link
Contributor

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick glance.

I don't see the need to go though zephyr_module.py, just fetch the manifest projects directly.

@@ -9,6 +9,11 @@
import sys
import yaml

from pathlib import Path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pathlib is already imported above:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not work without this line

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does, you just have to use pathlib.Path(...) instead of Path(...).

from pathlib import Path
from zephyr_ext_common import ZEPHYR_BASE
sys.path.append(os.fspath(Path(__file__).parent.parent))
import zephyr_module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why importing zephyr_module and not the native Manifest provided by west ?

like this:

from west.manifest import Manifest

and then simply fetch the projects using a manifest.get_projects([]) call ?

iirc you can even pass list of project to return, like:

manifest.get_projects([allow_list])

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this does not work with optional modules

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does not work ?
Modules passed with -DEXTRA_ZEPHYR_MODULES ?
Or inactive Zephyr projects ?

The manifest.get_projects([]) should return projects if they are active.

@nordicjm nordicjm requested a review from tejlmand May 14, 2024 13:59
@nordicjm nordicjm closed this May 14, 2024
@nordicjm
Copy link
Contributor Author

Has been moved to #1706

@nordicjm nordicjm deleted the sysbuildwest branch November 6, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants