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

Improve help for west build target #16202

Closed
galak opened this issue May 16, 2019 · 4 comments
Closed

Improve help for west build target #16202

galak opened this issue May 16, 2019 · 4 comments
Assignees
Labels
area: West West utility Enhancement Changes/Updates/Additions to existing features

Comments

@galak
Copy link
Collaborator

galak commented May 16, 2019

The current help for west build -h gets (for target):

  -t TARGET, --target TARGET
                        Build system target to run

It wasn't at all obvious at first reading what target meant here. Since this is Zephyr specific, I think it would be useful to have an example for how to invoke the 'run' target for qemu. (unfortunately double use of run)

@galak galak added Enhancement Changes/Updates/Additions to existing features area: West West utility labels May 16, 2019
@mbolivar
Copy link
Contributor

It wasn't at all obvious at first reading what target meant here. Since this is Zephyr specific, I think it would be useful to have an example for how to invoke the 'run' target for qemu. (unfortunately double use of run)

The use of west build -t run for QEMU is documented in the getting started guide:

https://docs.zephyrproject.org/latest/getting_started/index.html#run-the-application-in-qemu

Using west:

west build -b qemu_x86 samples/hello_world
west build -t run

Several other usage examples are documented in the page for west build:

https://docs.zephyrproject.org/latest/guides/west/build-flash-debug.html#basics

To specify the build system target to run, use --target (or -t).

For example, on host platforms with QEMU, you can use the run target to build and run the Hello World sample for the emulated qemu_x86 board in one command:

west build -b qemu_x86 -t run samples/hello_world
As another example, to use -t to list all build system targets:

west build -t help
As a final example, to use -t to run the pristine target, which deletes all the files in the build directory:

west build -t pristine

What exactly is missing here? The west build -h output is meant to be a short overview, with full details in the online help.

@mbolivar
Copy link
Contributor

See also #5501 for a related open issue related to the QEMU devices.

I didn't do it because I already faced enough backlash about "forcing" people to use west, and those targets have been special-cased and done their own thing since the Kbuild days.

I think most of that pushback has been resolved, though, and I've heard from 4 people in the past month or so that they'd like to see more west integration with the runners, so I guess the "yeas" are starting to outvote the "nays" on this.

@galak
Copy link
Collaborator Author

galak commented May 16, 2019

What exactly is missing here? The west build -h output is meant to be a short overview, with full details in the online help.

I guess I'm hoping that the help we get from the tool is a bit more useful than having to go to online pages.

@mbolivar
Copy link
Contributor

I guess I'm hoping that the help we get from the tool is a bit more useful than having to go to online pages.

The problem is that if we try to do that, the -h output will be way too long for a command line tool, in my opinion.

There are a lot of tools that make this tradeoff in my experience (short foo -h and details in man foo or the online help).

mbolivar pushed a commit to mbolivar/zephyr that referenced this issue Dec 19, 2019
We have an open request to make the help for the -t option a little
easier. Try to do that without adding too much length to the short
help.

Fixes: zephyrproject-rtos#16202
Signed-off-by: Martí Bolívar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: West West utility Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

2 participants