Lines Matching refs:west

6 Zephyr provides several :ref:`west extension commands <west-extensions>` for
23 Building: ``west build``
26 .. tip:: Run ``west build -h`` for a quick overview.
29 use :ref:`west config <west-config-cmd>` to configure its behavior.
35 run ``west build`` from a Zephyr build directory.
37 - Otherwise, if you run ``west build`` from a Zephyr application's source
44 The easiest way to use ``west build`` is to go to an application's root
48 west build -b <BOARD>
56 You can use the :ref:`west boards <west-boards>` command to list all
60 be compiled there after ``west build`` runs CMake to create a build system in
61 that directory. If ``west build`` finds an existing build directory, the
66 build directory; ``west build`` can figure out the board from the CMake cache.
79 ``west build`` to build multiple domains.
87 ``west build`` to default build using sysbuild.
90 ``west build`` will build all domains through the top-level build folder of the
99 Here are some ``west build`` usage examples, grouped by area.
106 west build -c
111 To configure ``west build`` to build for the ``reel_board`` by default::
113 west config build.board reel_board
126 west build -b <BOARD> path/to/source/directory
130 west build -b <BOARD> --build-dir path/to/build/directory
136 west config build.dir-fmt "build/{board}/{app}"
138 With the above, running ``west build -b reel_board samples/hello_world`` will
140 :ref:`west-building-config` for more details on this option.
151 west build -b qemu_x86 -t run samples/hello_world
155 west build -t help
160 west build -t pristine
170 To force ``west build`` make the build directory pristine before re-running
177 west build -p -b reel_board samples/hello_world
178 west build -p=always -b reel_board samples/hello_world
180 By default, ``west build`` makes no attempt to detect if the build directory
184 Using ``--pristine=auto`` makes ``west build`` detect some of these situations
189 You can run ``west config build.pristine always`` to always do a pristine
190 build, or ``west config build.pristine never`` to disable the heuristic.
191 See the ``west build`` :ref:`west-building-config` for details.
198 To print the CMake and compiler commands run by ``west build``, use the global
199 west verbosity option, ``-v``::
201 west -v build -b reel_board samples/hello_world
209 To pass additional arguments to the CMake invocation performed by ``west
214 Passing additional CMake arguments like this forces ``west build`` to re-run
219 After using ``--`` once to generate the build directory, use ``west build -d
226 ``west build`` uses by default), run::
228 west build -b reel_board -- -G'Unix Makefiles'
232 west build -b reel_board -- -G'Unix Makefiles' -DCMAKE_VERBOSE_MAKEFILE=ON
235 are given. All command-line arguments to ``west build`` after a ``--`` are
244 west build -b reel_board -- -DDTC_OVERLAY_FILE=enable-modem.overlay
249 west build -- -DEXTRA_CONF_FILE=file.conf
256 The previous section describes how to add CMake arguments for a single ``west
257 build`` command. If you want to save CMake arguments for ``west build`` to use
259 ``build.cmake-args`` configuration option. Whenever ``west build`` runs CMake
263 Remember that, by default, ``west build`` **tries to avoid generating a new
266 <west-building-pristine>` after setting ``build.cmake-args`` to make sure it
272 west config build.cmake-args -- -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
275 positional argument. Without it, :ref:`west config <west-config-cmd>` would
281 west config build.cmake-args -- -DCMAKE_VERBOSE_MAKEFILE=ON
284 whose value can be split into distinct arguments (``west build`` uses the
292 west config build.cmake-args -- "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_VERBOSE_MAKEFILE=ON"
306 west config build.cmake-args "-C ~/my-cache.cmake"
322 This works with both ``ninja`` (:ref:`the default <west-building-generator>`)
327 west build -o=-dexplain
331 west build -o=--keep-going
334 ``--foo`` from being treated as a ``west build`` option.
345 west build -o=-j4
355 west build --sysbuild --domain hello_world
360 west build --sysbuild --domain hello_world --target help
372 You can :ref:`configure <west-config-cmd>` ``west build`` using these options.
383 - String. If given, this the board used by :ref:`west build
384 <west-building>` when ``--board`` is not given and ``BOARD``
388 ``west build`` can't figure out the target board.
392 :ref:`west-building-cmake-config`.
395 west whenever it needs to create or locate a build folder. The currently
406 :ref:`above example <west-building-generator>`)
408 - String, instructs west whether to try to guess what build folder to use
418 - String. Controls the way in which ``west build`` may clean the build
423 - ``auto``: ``west build`` will automatically make the build folder
436 Flashing: ``west flash``
439 .. tip:: Run ``west flash -h`` for additional help.
447 west flash
454 west flash --build-dir path/to/build/directory
456 If you don't specify the build directory, ``west flash`` searches for one in
458 ``build.dir-fmt`` configuration option (see :ref:`west-building-dirs`), ``west
470 west flash --runner jlink
480 west build [...] -- -DBOARD_FLASH_RUNNER=jlink
482 See :ref:`west-building-cmake-args` and :ref:`west-building-cmake-config` for
485 See :ref:`west-runner` below for more information on the ``runner``
487 be obtained with ``west flash -H``; if run from a build directory or
503 west flash --hex-file path/to/some/other.hex
505 The ``west flash -h`` output includes a complete list of overrides
519 west flash --context
526 When running West outside of a build directory, ``west flash -H`` just
527 prints a list of runners. You can use ``west flash -H -r
533 west flash -H -r jlink
540 When a :ref:`west-multi-domain-builds` folder is detected, then ``west flash``
550 west flash --domain hello_world
554 Debugging: ``west debug``, ``west debugserver``
559 Run ``west debug -h`` or ``west debugserver -h`` for additional help.
567 west debug
572 west debugserver
579 west debug --build-dir path/to/build/directory
580 west debugserver --build-dir path/to/build/directory
584 ``build.dir-fmt`` configuration option (see :ref:`west-building-dirs`), ``west
596 west debug --runner jlink
597 west debugserver --runner jlink
599 See :ref:`west-runner` below for more information on the ``runner``
601 be obtained with ``west debug -H``; if run from a build directory or
617 west debug --elf-file path/to/some/other.elf
618 west debugserver --elf-file path/to/some/other.elf
620 The ``west debug -h`` output includes a complete list of overrides
634 west debug --context
636 (The command ``west debugserver --context`` will print the same output.)
643 When running West outside of a build directory, ``west debug -H`` just
644 prints a list of runners. You can use ``west debug -H -r
650 west debug -H -r jlink
657 ``west debug`` can only debug a single domain at a time. When a
658 :ref:`west-multi-domain-builds` folder is detected, ``west debug``
664 west build --sysbuild path/to/source/directory
669 west build --sysbuild samples/hello_world
673 west debug
677 west debug --domain hello_world
682 west debug --domain mcuboot
701 Running Robot Framework tests: ``west robot``
704 .. tip:: Run ``west robot -h`` for additional help.
715 west robot --runner=renode-robot --testsuite path/to/testsuite.robot
723west robot --runner=renode-robot --testsuite path/to/testsuite.robot --renode-robot-arg="--show-lo…
732 west robot --runner=renode-robot --context
737 west robot --runner=renode-robot --renode-robot-help
739 Simulating a board with: ``west simulate``
750 west simulate --runner=renode
757 west simulate --runner=renode --renode-command start
762 west simulate --runner=renode --renode-arg="--console"
776 west simulate --runner=renode --context
780 west simulate --runner=renode --renode-help