Building outside of .west workspace with ZEPHYR_BASE not properly documented? #33521
-
According to the "Troubleshooting West" documentation, there is only one way to build outside of a However, the "Getting Started Guide" never mentions this variable, and the "Application Development" page doesn't specify that this variable is required (it is listed on that page, but not stated that it's required for the instructions on that page to work). If you follow the instructions on the "Application Development" without setting I don't think either page talks about how the west workspaces work either. I feel like the information regarding west workspaces in "Troubleshooting West" should be part of the "beginners information" on using west. I would expect that on the "Application Development" page, there would be a step or blue note box stating "You must set the When I was initially starting Zephr I was pretty confused about how west was meant to work (I thought it would remember where your main "install" was automatically, since I didn't see the docs state you need to specify the The reason I'm raising this as a question instead of an issue/PR is I feel like I'm missing something here (or missed part of the documentation). I'm also not sure if zephyr is meant to set the Edit 1: Interestingly, 2.2.0 versions of the docs told you to run the The old "Application" page also briefly mentions you should run the According to the 2.3.0 release notes in this commit, the I did try re-running Edit 2: Building without |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 14 replies
-
@mbolivar-nordic and @tejlmand FYI |
Beta Was this translation helpful? Give feedback.
-
You are basically running into disagreement between maintainers that never got resolved, unfortunately. My original design for west envisioned that everybody would put their applications inside the workspace, as part of a general process of removing zephyr-env.sh. Others objected to this and I added the ZEPHYR_BASE hack to west in a hurry to smooth things over. Then we never really got around to resolving the situation. Sorry for the inconvenience and thanks for your west PR. |
Beta Was this translation helpful? Give feedback.
-
I don't remember seeing any concept of a "main" workspace in the documentation, so no one should expect that. On the other hand, I suspect some (mostly Windows) users could expect west to remember where their "only" workspace is. Other (mostly Unix) users would take for granted the ability to have multiple workspaces and to switch between them with a mere
... which of course feels like an unnecessary constraint when you restrict yourself to a single workspace.
+1 |
Beta Was this translation helpful? Give feedback.
-
What's the status of freestanding projects? These are very useful if you don't want dozens of checkouts of zephyr (and you can't put all your code into one zephyr fork). This seems to work fine on my Linux machine, but am having issues on my osx machine. machinehum@walkers-MacBook-Pro pl02-firmware % source ~/zephyr/zephyr-env.sh
machinehum@walkers-MacBook-Pro pl02-firmware % west build -b esp32 esp32-app --build-dir build/esp32
usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
west: unknown command "build"; do you need to run this inside a workspace?
machinehum@walkers-MacBook-Pro pl02-firmware % |
Beta Was this translation helpful? Give feedback.
@mbolivar-nordic and @tejlmand FYI