out-of-installation use of west
See original GitHub issueUser feedback noted that it’s not possible by default to use west commands outside of the installation (i.e. not in a subdirectory of the directory containing .west).
Options:
- One way to do this is to allow the user to specify the default west installation in a system- or user-level west configuration file. Their locations are described in this comment: https://github.com/zephyrproject-rtos/west/blob/master/src/west/config.py#L27
- We may also be able to use the WEST_DIR environment variable to cover this case, so build, flash, etc. work normally even if things like the build directory are outside of the installation.
- Another alternative if WEST_DIR is missing and west is invoked from outside an installation is to fall back on searching inside ZEPHYR_BASE, should that be defined.
Some notes for context:
- you can already build with something like
west build -s /tmp/app-source -d /tmp/build
and flash withwest flash -d /tmp/build
even if/tmp/app-source
and/tmp/build
are outside of the west installation. Just west itself has to be run from inside the installation to find thebuild
andflash
commands themselves. - the use of a west installation, which is found by looking for a
.west
directory, is a deliberate design decision which allows users to keep parallel installations, cd around between them, and have them ‘just work’, without requiring environment variables which are cumbersome for some, and error-prone in general (since they can point to the wrong place).
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (13 by maintainers)
Top Results From Across the Web
4 Strategies to Reduce Jobsite Framing Waste - Weyerhaeuser
Excess or unused wood accounts for up to 40% of jobsite waste, according to estimates from the NAHB. Too many builders, contractors and ......
Read more >Code of Decatur Township
The enactment and application of this ordinance, coupled with the publication ... RUBBISH — Solid waste not considered to be highly flammable or...
Read more >Borough Zoning Rules On Cannabis Establishments, 'Granny ...
Borough Zoning Chair Doug Nelson began by saying, “'Cannabis' shall mean marijuana as defined in section 21a-240 of the Connecticut General ...
Read more >Project Management Consultation - EV Connect
Value-engineered solutions from experts that meet your needs from site assessment to your first EV charging session. We Take the Complexity Out of...
Read more >Hinckley introduces OutboardCare & Standardizes Hunt ...
... the experience to take the complexity out of installation and the ... The new outboard platforms use digital throttle control and auto ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
CMake is already capable of calling out to
west
ifwest
is present, examples:and in PR/13067
so if
west
exposes those settings through a call, eg.west config --get <TOOLCHAIN>
then CMake can use that info. Environment varibles and command line arguments can take precedence overwest config --get
, so it stays consistent with what has been discussed earlier and agreed, see https://github.com/zephyrproject-rtos/west/issues/175#issuecomment-459687134 and https://github.com/zephyrproject-rtos/west/issues/175#issuecomment-460299808Also environment settings can be used if people don’t want to use
west
On second thought, I think we need to drop this one. The problem is that the bootstrapper needs to find west, and it doesn’t have access to the config module.
Once we have a unified multi-repo tool in what gets shipped via pypi, rather than just the bootstrapper, we can add that. For now I want to just support ZEPHYR_BASE as a fallback. That should be enough to support backwards compatibility with existing use cases.