Commit graph

56 commits

Author SHA1 Message Date
Martí Bolívar 488294368f doc: west: link to modules page instead of source code
When this west doc page was written, we didn't have any documentation
for modules. We do now, so point to it instead of CMake.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-08 12:00:44 -05:00
Martí Bolívar 8d5b998582 doc: west: add FAQ for requires_workspace issue #373
This is also a common problem.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-01 13:36:49 +02:00
Martí Bolívar 1c39ed8129 doc: west: add FAQ for missing extension command
"why can't I run west build" is a common enough question to add an FAQ
item for it in the troubleshooting page.

Even if people don't read it, we can still link to it on Slack etc.
when the question gets asked.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-01 13:36:49 +02:00
Martí Bolívar 0206feb6bc doc: west: add pointer to board porting guide for flash/debug
The board porting guide now has useful information on supporting
flash/debug commands. Link to it from the top of the page describing
these commands to hopefully make it easier to find.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-25 19:43:30 +01:00
Martí Bolívar 6e57b42758 doc: dts: revisit documentation
This is joint work with Kumar Gala (see signed-off-by).

Document the changes to the generated node macros in macros.bnf,
moving the old file to legacy-macros.bnf and putting it in its own
section.

The actual generated macros are now a low-level detail, so rewrite the
foregoing sections as examples in terms of the new <devicetree.h> APIs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-24 10:11:20 -05:00
Martí Bolívar 180cbf1a00 doc: more board porting improvements
Incorporate more feedback suggested in #23080.

Suggested-by: Lucian Copeland <hierophect@gmail.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-04 22:37:52 +02:00
Martí Bolívar 90edd01644 doc: west: 'west installation' is now 'west workspace'
This nomenclature change was done in west 0.7 because it seems to be a
lot easier for people to understand. Propagate it to all the west
documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-25 23:08:02 +02:00
Martí Bolívar c3ddea01f2 doc: west: update structure page
The main change is that west 0.7 is not a namespace package anymore.
Make some other improvements while here.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-25 23:08:02 +02:00
Martí Bolívar 62c5b3d198 doc: west: add examples for each topology
Add example west.yml files showing how to build west workspaces of
each type. Split these into separate sections as a result since
they're longer.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-25 23:08:02 +02:00
Martí Bolívar 51b885019e doc: split devicetree docs into multiple pages
The one page on devicetree is too long. Split it into multiple pages
to make it easier to digest and more squintable. This is basically
just moving content around; minimal changes have been made apart from
redoing some transitions and adding a couple of introductory paragraphs.

Rename the 'device-tree' Sphinx :ref: target while we are here.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-20 12:15:27 +02:00
Martí Bolívar b4fde33243 doc: west: 0.7.0 documentation
Reflect changes in the APIs made since 0.6.0. These will also need to
be added to the release notes.

Some automatic directives weren't generating the desired output, so
either do it by hand or let new 0.7.0 docstrings supply the information.

Try to better group the content into sections.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-07 07:25:41 -06:00
Martí Bolívar c20a081423 doc: west: document manifest import feature
West now supports importing other manifest files. Document the basic
behavior.

Add a local table of contents for HTML output, to get a quick index of
the subsections of the "Manifest Imports" section.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-07 07:25:41 -06:00
Martí Bolívar 957476ccae doc: west: add "git." prefix to URL hosts
By request, for clarity.

Suggested-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-07 07:25:41 -06:00
Martí Bolívar 9008578e4f doc: west: add docs for west manifest --validate
This is supported but undocumented.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-07 07:25:41 -06:00
Martí Bolívar 1dafe7aa9c doc: west: move manifest command docs to manifest.rst
This is just a prep work commit for documenting ``west manifest
--merge``.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-07 07:25:41 -06:00
Ulf Magnusson 984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
Martí Bolívar 0186eade51 scripts: add new west build "build.cmake-args" config option
This option, if set, will add arguments to CMake whenever a new build
system is being generated.

It doesn't affect other invocations of CMake, such as when cmake(1) is
run in build tool mode to actually compile the application.

See the documentation changes for details.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2019-12-10 16:19:18 +01:00
Marti Bolivar 52c7df6014 doc: west fixes and updates to manifest.rst
Some of this information is stale and needs to be fixed.

Try to make a few other things clearer while we're here.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-23 21:02:02 -04:00
Marti Bolivar 27e5dd131f doc: s/device tree/devicetree/
DTSpec writes this as a single word, presumably to make it easier to
grep for / more precise. Follow along in the rest of the docs now that
our main DT docs page agrees with this usage.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Marti Bolivar 2fa0c4874a doc: add more cross-references/examples for DT overlays
Device tree overlays are a bit of a stumbling block. Try to add more
cross-references and examples for how to use them to the application
development doc and the west build page.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Marti Bolivar cc8d92c088 doc: west: v0.6.2 fixes a critical v0.6.1 bug
All v0.6.1 users must upgrade. Add release notes blurb.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-09-05 07:28:07 +02:00
Marti Bolivar a09d3d69f9 doc: west: add tl;dr for moving to west and troubleshooting
These are based on user feedback on slack and the mailing list.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-29 10:39:42 +02:00
Marti Bolivar bd4b24810a doc: west: add v0.6.1 documentation
West v0.6.1 has been released. The main feature is that "west update"
now avoids communicating with the network by default when project
revisions have already been fetched.

This allows for offline operation and significantly speeds up the
command (it's 10 times faster on my machine and home network).

There are other miscellaneous changes as well; document them also.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-29 10:37:58 +02:00
Marti Bolivar 1620d29ba6 doc: west: add some missing information
There's missing overview documentation for some miscellaneous
commands. Add it.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-29 10:37:58 +02:00
Carles Cufi a8b208aff7 doc: west: Fix west completion docs
west completion is an extension command, and therefore requires the user
to be in a zephyr installation in order to be available.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-12 09:44:37 -07:00
Marti Bolivar 2b3d9df1d7 west: require v0.6.0 or higher
The main change is the elimination of the bootstrapper, a design flaw
/ misfeature.

Update the documentation to be compatible with the 0.6.x releases as
well. This has to be done atomically, as there were incompatible
changes.  Make use of the versionchanged and versionadded directives
to begin keeping track of how these APIs are evolving.

(Note that west 0.6.0 will remain compatible with the extension
commands in Zephyr v1.14 LTS as long as that is still alive. This
change is targeted towards Zephyr 2.0 users.)

This requires a bump in the shippable container and allows us to
simplify the west_commands test procedure.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-05 15:17:45 +02:00
Marti Bolivar 247047bf21 doc: move runner documentation out of west-apis.rst
Now that the runners package no longer depends on west, we can move
the documentation for it from the orphan west-apis.rst page to the
build-flash-debug.rst page that documents the west extension commands
which use that package.

(This is a more logical place for this information, but it was
previously not possible to put it there since we must be able to build
the documentation on a system without west installed, excepting
content in west-apis.rst. Removing the dependency means the runners
automodule directive can safely appear in build-flash-debug.rst.)

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-05 15:17:45 +02:00
Marti Bolivar 6846de68de doc: add a release notes page for west
This just documents what's already happened.

A subsequent patch will extend it for v0.6.x.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-05 15:17:45 +02:00
Carles Cufi 9b13d51589 doc: Consolidate Python and pip documentation
The documentation that describes how Python and pip interact with the OS
when installing packages used to be under a common section, and was
moved to the west bootstrap one later on. Since this information is
required early on (for example on Linux when installing CMake via pip3),
move the info to its own section and link to it from others.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-26 12:00:19 +02:00
Carles Cufi 41f1f648f6 west: runners: Guess build folder
When using a build folder format with build.dir-fmt that includes any
parameters that need resolving, the west runners cannot find the folder
since the required information (board, source dir or app) is not
available.
Add a very simple heuristic to support the case where a build folder
starts with a hardcoded prefix (for example 'build/') and a single build
is present under that prefix.
The heuristic is gated behind a new configuration option:
build.guess-dir

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-06-26 11:50:26 -04:00
Marti Bolivar ff443c1d23 docs: update west sign docs
Updates for recent changes.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-16 10:16:15 -04:00
Carles Cufi 98980c6b7c west: build: Configurable build folder format
Add the possibility of configuring the build folder format in west's
configuration system.
The build.dir-fmt configuration option controls how west will create
build folders when not specified, the following parameters are currently
accepted:

- board: The board name
- source_dir: The relative path from CWD to the source directory
- app: The name of the source directory

If CWD is below source_dir in the directory hierarchy then source_dir is
set to an empty string.

This means that if one sets:

[build]
dir-fmt = build/{board}/{source_dir}

Then when building samples/hello_world from zephyr's root for the
reel_board the build folder will be:

./build/reel_board/samples/hello_world

but when building it from inside the samples/hello_world folder it will
instead be:

./build/reel_board

Fixes https://github.com/zephyrproject-rtos/west/issues/124

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-11 00:00:34 +02:00
Anas Nashif 9d3be3720a doc: move module related doc to guides
Move to a new guide which will expand on how to submit modules and how
to maintain them.

Also move topology documentation to repository management section where
it fits better.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-21 21:45:00 -04:00
Marti Bolivar 6cb8e3ec53 doc: move sign command docs before catch-all page
The current order makes no sense. Move it earlier in the order, so the
catch-all page appears last.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-16 13:49:10 +02:00
Marti Bolivar 64c6a10bd1 doc: updates to west multi-repo docs
Minor updates.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-16 13:49:10 +02:00
Marti Bolivar 90276c28cd doc: updates for west installation docs
Grammar and formatting improvements, as well as changes requested in
review that weren't made (in particular, the ones recommending using
"pip3 show -f west" to see where west is installed instead of listing
common places that might not be right.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-16 13:49:10 +02:00
Carles Cufi 9cea26ae77 doc: west: Document west installation in-depth
Create a new dedicated section for west installation that details
some of the finer aspects of the process and steps involved.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-05-10 13:08:27 +02:00
Carles Cufi 66fdd48fdd west: Add completion command
Add a completion command that dumps the contents of a shell
completion file present in the zephyr repository.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-05-10 13:08:27 +02:00
Marti Bolivar 3696eccc1a doc: fix west boards tip
Doc fix for an unaddressed review comment from when the feature was
first merged.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-06 16:30:05 -04:00
Marti Bolivar 83a5fd8d4c scripts: make west build -h fit on a screen
The west build --help output no longer fits in a single page.  Move
details and examples into the documentation, so the -h output doesn't
require scrolling around.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-06 16:30:05 -04:00
Marti Bolivar bbe890ab30 scripts: add build.generator config option for west build
This can be used to override the default CMake generator
permanently. Its values are the same as those acceptable to cmake's -G
option.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-06 16:30:05 -04:00
Marti Bolivar 81e005f4d5 doc: re-word and extend west build documentation
Try to make the language simpler. Introduce each example with a
paragraph that says "To <DO XYZ>" to make them easier to find.

Move the config options to the documentation for that command to make
them easier to find.

Add some more examples for use cases we've gotten questions about.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-06 16:30:05 -04:00
Marti Bolivar 88fb8bacfb scripts: improve west build's board handling
- Respect the BOARD environment setting.
- Don't require --force if the board can't be figured out: it might be
  set in CMakeLists.txt, for example. Instead, downgrade to a warning
  which can be disabled with "west config build.board_warn false".
- Add a build.board configuration option used as a final BOARD fallback
  after CACHED_BOARD (in the CMake cache), --board (command line), and
  BOARD (environment).
- Keep the config docs up to date.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-06 16:30:05 -04:00
Carles Cufi d6f033e690 west: Add a boards command
Add a new "boards" command that is able to list all the boards in the
upstream tree. There is currently no support for out-of-tree boards.

The command executes cmake to use the built-in CMake script,
boards.cmake, to list the boards, and then stores the information
retrieved and allows the user to present it in a user-definable format.

Fixes https://github.com/zephyrproject-rtos/west/issues/53

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-05-03 21:55:13 +02:00
Carles Cufi 3a88dce9c5 scripts: west: Run pristine.cmake directly instead of the target
When making a build folder pristine until now we were running the
'pristine' build target. The issue with that is that ninja/make or
whatever build tool is being used might decide to re-run CMake itself if
some of the dependencies have changes. This might trigger an error that
is unfriendly and unnecessary, since the user is explicitly asking for
the build folder to be wiped before starting a fresh build.
To avoid this issue restor to running directly the CMake script that the
'pristine' build target itself uses, so as to make sure that the build
folder is wiped unconditionally regardless of changes made to the tree.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-23 13:24:41 -07:00
Carles Cufi b7c75915e0 west: build: Add new pristine cmd-line and config option
Add a new command-line and build config option, `pristine`, that the
user can pass to `west build` or set in its configuration file(s) in
order to automatically trigger a pristine build on every build or
whenever west considers it required.

The option can take the following values:

- never: Never run the target
- always: Always run the pristine target before building
- auto: Run the pristine target when required

With `auto`, the pristine target will be run when running
west with an existing build folder containing a build system and:

- Selecting a different board from the one currently in the build system
- Selecting a different application from the one currently in the build
  system

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-17 10:02:46 -04:00
David B. Kinder 9d04f03bab doc: add missing doc top labels
All docs should have a label at the top that would
permit cross-document linking via :ref:`labelname`.

Update "testing" label that would have conflicted and fix the only
reference to the old "testing" label in development process
documentation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-16 18:11:30 -04:00
Piotr Mienkowski d38ffedd4d doc: add example of how to build MCUBoot app with west
This commit extends existing documentation by providing an example
of how to build Hello World sample application for MCUboot using
west.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-04-08 19:37:39 -04:00
Marti Bolivar 7eca2568bd doc: additional clarifications on west
Add a missing reference to how west is used to set ZEPHYR_MODULES in
without-west.rst, augmenting the application development guide a bit
to include this in the list of important variables, cleaning that up a
bit while we are here and adding some more west details.

Add a big fat warning in the getting started guide that using Zephyr
without west is not for the faint of heart.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-04-04 08:32:15 -04:00
Marti Bolivar d3bb3cfd7a doc: west: add missing parts for zephyr v1.14
- add glossary terms for important concepts we have to explain often,
  like "west installation"

- add autodoc directives for pulling in west API docs

- add missing documentation for built-in features like west's
  configuration, extension commands, etc.

- add missing documentation for "west sign" extension

- describe the manifest in a self-contained way rather than linking to
  the relevant pykwalify schema, also adding a missing reference to
  "west manifest" in the miscellaneous multi-repo commands list

- move various details regarding history and motivation to why.rst
  among other changes to repo-tool.rst, leaving it closer to a "tell
  me what I really need to know" style overview

- update planned features

Fixes: #14992
Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-03-29 11:24:32 +01:00