Comments (13)
What specific problem(s) would this solve?
BTW ZEPHYR_BASE
was a basically a design mistake:
west
is mostly independent of Zephyr and should become totally independent.
from west.
What specific problem(s) would this solve?
Last call before closing?
from west.
@marc-hb to define a standard board for my build, I'd like a west config file. However, as soon as it's defined, zephyr is not found. So i'm forced to manually specify the default board to build for.
from west.
I still don't understand sorry. I ran west config --global build.board qemu_x86
and everything worked fine.
Please provide a specific sequence of commands that is causing an issue.
from west.
Okay, tried it with --local, which works. What I want is for the setting to be project local, i.e. stuff in my local directory, like a .west.config or whatever file.
I'm using the Nordic Connect Zephyr, so I'm guessing it's actually set semi-globally, i.e. for all projects using NCS Zephyr.
I suppose I'm just using West wrong, then...
from west.
Okay, tried it with --local, which works.
So is there any issue left?
What I want is for the setting to be project local, i.e. stuff in my local directory, like a .west.config or whatever file.
"local" directory is unfortunately vague, I guess you mean "in my workspace"?
https://docs.zephyrproject.org/latest/develop/west/config.html
so I'm guessing it's actually set semi-globally, i.e. for all projects using NCS Zephyr.
No, west
has no "semi-global" option and it cannot tell which workspace are NCS versus not.
I suppose I'm just using West wrong, then...
We cannot tell until you share a specific list of commands that reproduces the issue. A reproduction ideally without nrfConnect but much better with nrfConnect than no reproduction at all.
Without a reproduction, I also miss how this can be all related to an absolute zephyr.base
from west.
It's really quite simple. Here's what I want.
- download nRF Connect so I can use Zephyr on the nRF platform
- create a directory for my app, add a bunch of sources, start hacking
- set the default board for use by subsequent invocations of "west build"
- west build
I thought 3) would be solved by creating a .west/west.yml file in my project directory, with build.board set to something causes the issue to occur, for me, using the zephyr provided with nRF Connect.
I did this since I thought it would set default parameters for the west tool when running in this directory - so I could have per-project setting for which board to use. An app directory w/ source code that does not contain the entire 480M of Zephyr checked out. Since I have many apps on-going, that is a solution I very much not want.
But "project" in west != "an application using the zephyr toolkit", but instead something completely else which I'm yet to grasp.
So in summary, what I want to do is not possible.
The soluton I'll be using is a ./build.sh with "west build -p -b my_board".
Thanks for the effort and patience.
from west.
An app directory w/ source code that does not contain the entire 480M of Zephyr checked out. Since I have many apps on-going, that is a solution I very much not want.
OK, now I think I finally understand the problem. What I think you want is to share Zephyr code between multiple apps to save disk space, correct?
There are multiple ways to do this and some of them might even let you have separate west config build.board
but they're all easier if you git checkout your applications inside a west workspace (whether the apps are listed in a west manifest or not). Despite this issue being filed about zephyr.base, I think you still haven't described the directory structure you'd like. Please provide a "picture" similar to one of these:
https://docs.zephyrproject.org/latest/develop/west/workspaces.html#topologies-supported
from west.
My directory structure is simply this.
~/code/goride/fw/zephyr-test:
./CMakeLists.txt
./LICENSE
./prj.conf
./README.md
./src
./src/main.c
That's the same way I write code for other frameworks, such as Flutter, where the framework/lib lives in a read-only directory somewhere on disk, and my code lives in my git repository. I don't have the Flutter framework checked out in my source code directory, nor in any directly ascending parent directories. Instead, it's in /opt/flutter. Which is akin to nRFConnect/Zephyr residing somewhere under /opt/nordic/....
Then I run some sort of build command. For Flutter, it's "flutter build". For Zephyr, I figured out it was "west build". I thought, from the documentation, that there was a way to set default parameters to west, for my specific project. Project, by my definition, is the source code I have written, for the resulting binary I am expecting to be produced by the build command.
Maybe I'm misunderstanding your question.
from west.
Maybe I'm misunderstanding your question.
I don't think that's the main problem. I think the main "communication issue" is you making a ton of assumptions that everyone uses Zephyr and west the same way as you (or... Flutter?!) do. The bad news is: no, a lot of people do NOT use west as you do. This should be pretty obvious after even a very quick look at https://docs.zephyrproject.org/latest/develop/west/workspaces.html#topologies-supported
So you when reporting a bug, you must describe in verbose detail your configuration. When reporting a bug about zephyr.base, you must especially describe your directory structure (which you finally did, thanks!)
Also, suggesting fixes is great but that does not make describing the issue optional https://en.wikipedia.org/wiki/XY_problem
from west.
to define a standard board for my build, I'd like a west config file.
Did you mean a west manifest (e.g. west.yml
) or west config
commands?
However, as soon as it's defined,
How did you define what? Share specific commands, not just plain English.
zephyr is not found.
Copy/paste a specific error message.
So i'm forced to manually specify the default board to build for.
I think you later shared a command for that one, thanks.
Okay, tried it with --local, which works.
I think I guessed what you did but next time copy/paste the complete command AND the directory where you ran it.
So if you don't have time to spend understanding how west
works, just stop there and everything OK? Or is there still some error message?
If you want to go further, read these two pages:
https://docs.zephyrproject.org/latest/develop/west/basics.html
https://docs.zephyrproject.org/latest/develop/west/config.html
I thought 3) would be solved by creating a .west/west.yml file in my project directory,
This is a manifest, it's not a "configuration file". It does nothing until you run west init
, which you do NOT want to run again if you already have. It's unrelated to west config
.
with build.board set to something causes the issue to occur,
How did you set build.board
? It's unrelated to west.yml
.
from west.
I haven't tried it myself but if you don't want to spend time understanding west I've heard good things about https://docs.platformio.org/en/latest/frameworks/zephyr.html
from west.
Let's just call it a day. Thanks for the alternative suggestion and links to the documentation.
from west.
Related Issues (20)
- west init: CLI argument to automatically setup new workspace from template HOT 11
- `already defined as extension command`-error prints wrong spec HOT 1
- west cannot process a git branch name containing a single quote ' HOT 8
- west init access denied on windows HOT 2
- git: Add support for sparse checkout HOT 5
- Investigate if the performance of submodule update could be improved HOT 7
- west update loops infinitely over the first repository HOT 14
- West Re-Implementation - git ws
- west update - AttributeError: 'NoneType' object has no attribute 'err' HOT 1
- menuconfig aborting due to Kconfig warnings HOT 4
- Allow using reference repositories to share objects HOT 8
- Allow import of optional projects from manifest file HOT 7
- Moving from Zephyr 3.2.99 to 3.5.99: `west` cannot find its configuration file HOT 3
- --mr documents argument to be a revision HOT 1
- `pip install` fails on MSYS2 HOT 3
- Infinite loop when building in a moved directory HOT 4
- `die_if_no_git` not listed under west API HOT 2
- Log message in west command __init__ func may cause infinite call stack HOT 3
- fatal: fetch-pack: invalid index-pack output HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from west.