Lines Matching +full:zephyr +full:- +full:sdk +full:-

8 - Set up a command-line Zephyr development environment on Ubuntu, macOS, or
11 - Get the source code
12 - Build, flash, and run a sample application
23 .. group-tab:: Ubuntu
28 .. code-block:: bash
33 .. group-tab:: macOS
39 <https://support.apple.com/en-us/HT201541>`_.
41 .. group-tab:: Windows
46 .. _install-required-tools:
55 .. list-table::
56 :header-rows: 1
58 * - Tool
59 - Min. Version
61 * - `CMake <https://cmake.org/>`_
62 - 3.20.5
64 * - `Python <https://www.python.org/>`_
65 - 3.10
67 * - `Devicetree compiler <https://www.devicetree.org/>`_
68 - 1.4.6
72 .. group-tab:: Ubuntu
81 A detailed explanation of ``kitware-archive.sh`` can be found here
82 `kitware third-party apt repository <https://apt.kitware.com/>`_:
84 .. code-block:: bash
86 wget https://apt.kitware.com/kitware-archive.sh
87 sudo bash kitware-archive.sh
91 .. code-block:: bash
93 sudo apt install --no-install-recommends git cmake ninja-build gperf \
94 ccache dfu-util device-tree-compiler wget \
95 python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
96 make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
100 .. code-block:: bash
102 cmake --version
103 python3 --version
104 dtc --version
110 .. group-tab:: macOS
116 .. code-block:: bash
118 … /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
120 #. After the Homebrew installation script completes, follow the on-screen
125 .. code-block:: bash
134 .. code-block:: bash
136 brew install cmake ninja gperf python3 python-tk ccache qemu dtc libmagic wget openocd
141 .. code-block:: bash
143 … (echo; echo 'export PATH="'$(brew --prefix)'/opt/python/libexec/bin:$PATH"') >> ~/.zprofile
146 .. group-tab:: Windows
150 Due to issues finding executables, the Zephyr Project doesn't
153 <https://msdn.microsoft.com/en-us/commandline/wsl/install_guide>`_
174 type ``cmd.exe``, right-click the :guilabel:`Command Prompt` search result, and choose
180 .. code-block:: bat
182 choco feature enable -n allowGlobalConfirmation
186 .. code-block:: bat
188 choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
189 choco install ninja gperf python311 git dtc-msys2 wget 7zip
193 As of November 2024, Python 3.13 is not recommended for Zephyr development on Windows,
202 .. _clone-zephyr:
206 Get Zephyr and install Python dependencies
209 Next, clone Zephyr and its :ref:`modules <modules>` into a new :ref:`west
210 <west>` workspace named :file:`zephyrproject`. You'll also install Zephyr's
217 .. group-tab:: Ubuntu
221 .. code-block:: bash
223 sudo apt install python3-venv
227 .. code-block:: bash
229 python3 -m venv ~/zephyrproject/.venv
233 .. code-block:: bash
248 .. code-block:: bash
252 #. Get the Zephyr source code:
254 .. code-block:: bash
260 #. Export a :ref:`Zephyr CMake package <cmake_pkg>`. This allows CMake to
261 automatically load boilerplate code required for building Zephyr
264 .. code-block:: bash
266 west zephyr-export
268 #. The Zephyr west extension command, ``west packages`` can be used to install Python
271 .. code-block:: bash
273 west packages pip --install
275 .. group-tab:: macOS
279 .. code-block:: bash
281 python3 -m venv ~/zephyrproject/.venv
285 .. code-block:: bash
300 .. code-block:: bash
304 #. Get the Zephyr source code:
306 .. code-block:: bash
312 #. Export a :ref:`Zephyr CMake package <cmake_pkg>`. This allows CMake to
313 automatically load boilerplate code required for building Zephyr
316 .. code-block:: bash
318 west zephyr-export
320 #. The Zephyr west extension command, ``west packages`` can be used to install Python
323 .. code-block:: bash
325 west packages pip --install
327 .. group-tab:: Windows
333 .. code-block:: bat
336 python -m venv zephyrproject\.venv
340 .. code-block:: bat
355 .. code-block:: bat
359 #. Get the Zephyr source code:
361 .. code-block:: bat
367 #. Export a :ref:`Zephyr CMake package <cmake_pkg>`. This allows CMake to
368 automatically load boilerplate code required for building Zephyr
371 .. code-block:: bat
373 west zephyr-export
375 #. The Zephyr west extension command, ``west packages`` can be used to install Python
378 .. code-block:: bat
380 west packages pip --install
382 Install the Zephyr SDK
385 The :ref:`Zephyr Software Development Kit (SDK) <toolchain_zephyr_sdk>`
386 contains toolchains for each of Zephyr's supported architectures, which
388 Zephyr applications.
391 that are used to emulate, flash and debug Zephyr applications.
396 .. group-tab:: Ubuntu
398 Install the Zephyr SDK using the ``west sdk install``.
400 .. code-block:: bash
402 cd ~/zephyrproject/zephyr
403 west sdk install
407 Using the command options, you can specify the SDK installation destination
409 See ``west sdk install --help`` for details.
411 .. group-tab:: macOS
413 Install the Zephyr SDK using the ``west sdk install``.
415 .. code-block:: bash
417 cd ~/zephyrproject/zephyr
418 west sdk install
422 Using the command options, you can specify the SDK installation destination
424 See ``west sdk install --help`` for details.
426 .. group-tab:: Windows
428 Install the Zephyr SDK using the ``west sdk install``.
430 .. code-block:: bat
432 cd %HOMEPATH%\zephyrproject\zephyr
433 west sdk install
437 Using the command options, you can specify the SDK installation destination
439 See ``west sdk install --help`` for details.
443 If you want to install Zephyr SDK without using the ``west sdk`` command,
453 :zephyr:code-sample:`blinky` is compatible with most, but not all, :ref:`boards`. If your board
454 does not meet Blinky's :ref:`blinky-sample-requirements`, then
455 :zephyr:code-sample:`hello_world` is a good alternative.
458 can be used to obtain a list of all boards Zephyr supports.
460 Build the :zephyr:code-sample:`blinky` with :ref:`west build <west-building>`, changing
461 ``<your-board-name>`` appropriately for your board:
465 .. group-tab:: Ubuntu
467 .. code-block:: bash
469 cd ~/zephyrproject/zephyr
470 west build -p always -b <your-board-name> samples/basic/blinky
472 .. group-tab:: macOS
474 .. code-block:: bash
476 cd ~/zephyrproject/zephyr
477 west build -p always -b <your-board-name> samples/basic/blinky
479 .. group-tab:: Windows
481 .. code-block:: bat
483 cd %HOMEPATH%\zephyrproject\zephyr
484 west build -p always -b <your-board-name> samples\basic\blinky
486 The ``-p always`` option forces a pristine build, and is recommended for new
487 users. Users may also use the ``-p auto`` option, which will use
497 For example to build :zephyr:code-sample:`blinky` for the ``cpuapp`` core on
508 Then flash the sample using :ref:`west flash <west-flashing>`:
510 .. code-block:: shell
516 You may need to install additional :ref:`host tools <flash-debug-host-tools>`
524 Please also see :ref:`setting-udev-rules`.
528 .. figure:: img/ReelBoard-Blinky.png
530 :name: reelboard-blinky
537 Here are some next steps for exploring Zephyr:
539 * Try other :zephyr:code-sample-category:`samples`
541 * Find out about west's :ref:`flashing and debugging <west-build-flash-debug>`
543 * Check out :ref:`beyond-GSG` for additional setup alternatives and ideas
544 * Discover :ref:`project-resources` for getting help from the Zephyr
556 Double Check the Zephyr SDK Variables When Updating
559 When updating Zephyr SDK, check whether the :envvar:`ZEPHYR_TOOLCHAIN_VARIANT`
563 For more information about these environment variables in Zephyr, see :ref:`env_vars_important`.
601 developers; some are major Zephyr contributors. `Accessibility`_ has been
609 .. _GitHub issues: https://github.com/zephyrproject-rtos/zephyr/issues