-
Notifications
You must be signed in to change notification settings - Fork 118
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
Support use cases other than Zephyr RTOS #246
Comments
I'm trying to use west to manage a closed source project and I'm noticing a few things when I try to use my own manifest file. This may belong in its own issue as it doesn't seem related to the ZEPHYR_BASE issue itself. First, the init script complains about the command "post-init." I can't tell why it's trying to run this command, if it's a custom command defined in zephyr somewhere, or what I don't get this error when using a zephyr manifest file.
I'm assuming this leaves the west installation in a bad state, because after this it complains about west config settings:
Which makes sense, as I haven't defined a .westconfig file, but the zephyr manifest seem to at least create a default .west/config correctly, and I also can't tell where, if anywhere, in the repo that's coming from. Any suggestions on how to resolve this issues would be welcome. |
I updated to the master instead of the 0.5.8, and it seems like both these issues are resolved. Possibly as a side-effect of removing bootstrapping. So probably no reason to clean track these unless someone sees them in 0.6.0+. |
I've been thinking about this a bit more.
Since Zephyr's build system enforces a minimum west revision when it finds that the tool is installed, I think we can get away with this by moving |
@mbolivar I think there's a bit of a bootstrapping problem for non-Zephyr projects when you don't already have a west config file defined somewhere in the search path, with a |
I think the "trick" here is that So if I'm not misunderstanding you, I think there's no issue with that. |
No. :) I was doing |
We're getting increasing interest in west being its own tool, to be used standalone from Zephyr. Unfortunately we are still too tightly coupled for that to be possible, but the current behavior of erroring out is not correct. Let's downgrade that to a warning and have the warning print the current workaround. Relates to: zephyrproject-rtos#246 Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
We're getting increasing interest in west being its own tool, to be used standalone from Zephyr. Unfortunately we are still too tightly coupled for that to be possible, but the current behavior of erroring out is not correct. Let's downgrade that to a warning and have the warning print the current workaround. Relates to: #246 Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
BTW west documentation is not even a first level item in https://docs.zephyrproject.org/2.1.0/guides/index.html This really doesn't make it look like something that can be used outside Zephyr. |
The idea would be to host its documentation on readthedocs instead. But that will take quite some doing. We want the code to be ready before we try to do that. |
If the source's name is 'zephyr' some internal West logic activates that cause it to try writing something into the workspace's config file. Because that config file is located in the Nix store however, hardly any West command can be used as a result (update works, which is why this went unnoticed at first). The West code that causes this behavior can be found here: https://github.com/zephyrproject-rtos/west/blob/v0.14.0/src/west/app/main.py#L415 The removal of this behavior is tracked as part of zephyrproject-rtos/west#246 Signed-off-by: Niklas Wimmer <mail@nwimmer.me>
West can be already used for other purposes than Zephyr development, even without sacrificing the parts of it that make it convenient for Zephyr.
This issue tracks first-class support for that.
The main issue I'm aware of is an error about a missing zephyr base, which appears if you have a manifest without a zephyr project, and is annoying but can be safely ignored
For now, to work around this, run something like:
The error is:
It would be nice to generalize the existing mechanism for setting configuration variables based on the contents of the manifest so you could do something like this:
Where the
config-vars
key in the manifest'sself
subsection (or anyproject
element) would be a list ofconfig_variable: value
pairs, where eachvalue
is a format string like that passable towest list --format
. These values would be set atwest update
time, as if withwest config --local config_variable $(west list --format="value" path_to_project)
, provided that they do not already have values.With that, we could move the ZEPHYR_BASE environment setting down into each of the zephyr-specific extension commands, or do some other reasonable thing if we want to keep it inside west, and get rid of the error (and the zephyr-specific error).
The text was updated successfully, but these errors were encountered: