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

1 .. _beyond-gsg:
6 The :ref:`getting_started` gives a straight-forward path to set up
7 your Linux, macOS, or Windows environment for Zephyr development. In
8 this document, we delve deeper into Zephyr development setup
11 .. _python-pip:
16 Python 3 and its package manager, pip\ [#pip]_, are used extensively by Zephyr
17 to install and run scripts required to compile and run Zephyr
18 applications, set up and maintain the Zephyr development environment,
22 ``--user`` flag to the ``pip3`` command when installing new packages. This is
25 information about pip\ [#pip]_, including `information on -\\-user`_.
27 - On Linux, make sure ``~/.local/bin`` is at the front of your :envvar:`PATH`
28 :ref:`environment variable <env_vars>`, or programs installed with ``--user``
29 won't be found. Installing with ``--user`` avoids conflicts between pip
30 and the system package manager, and is the default on Debian-based
33 - On macOS, `Homebrew disables -\\-user`_.
35 - On Windows, see the `Installing Packages`_ information on ``--user`` if you
38 On all operating systems, pip's ``-U`` flag installs or updates the package if the
62 Zephyr binaries are compiled and linked by a *toolchain* comprised of
63 a cross-compiler and related tools which are different from the compiler
67 You can install the :ref:`Zephyr SDK <toolchain_zephyr_sdk>` to get toolchains for all
70 :ref:`board-level documentation <boards>`).
72 You can configure the Zephyr build system to use a specific toolchain by
79 Updating the Zephyr SDK toolchain
82 When updating Zephyr SDK, check whether the :envvar:`ZEPHYR_TOOLCHAIN_VARIANT`
85 * If the variables are not set, the latest compatible version of Zephyr SDK will be selected
89 at build time. Zephyr SDK is identified by the value ``zephyr``.
90 If the :envvar:`ZEPHYR_TOOLCHAIN_VARIANT` environment variable is not ``zephyr``, then either
91 unset it or change its value to ``zephyr`` to make sure Zephyr SDK is selected.
94 the default lookup location for Zephyr SDK. If you install Zephyr SDK to one
98 For more information about these environment variables in Zephyr, see :ref:`env_vars_important`.
100 Cloning the Zephyr Repositories
103 The Zephyr project source is maintained in the `GitHub zephyr repo
104 <https://github.com/zephyrproject-rtos/zephyr>`_. External modules used
105 by Zephyr are found in the parent `GitHub Zephyr project
106 <https://github.com/zephyrproject-rtos/>`_. Because of these
107 dependencies, it's convenient to use the Zephyr-created :ref:`west
108 <west>` tool to fetch and manage the Zephyr and external module source
109 code. See :ref:`west-basics` for more details.
112 initialize, and download sources from the zephyr and external module
116 .. code-block:: console
123 :file:`zephyrproject` folder in sync with the code in the local zephyr
128 You must run ``west update`` any time the :file:`zephyr/west.yml`
129 changes, caused, for example, when you pull the :file:`zephyr`
133 Keeping Zephyr updated
136 To update the Zephyr project source code, you need to get the latest
140 .. code-block:: console
143 cd zephyrproject/zephyr
147 Export Zephyr CMake package
153 .. _gs-board-aliases:
162 .. code-block:: cmake
173 ``cmake -DBOARD=pca10028`` and ``west -b pca10028``.
178 You can build, flash, and run Zephyr applications on real
188 Let's build the :zephyr:code-sample:`blinky` sample application.
190 Zephyr applications are built to run on specific hardware, called a
197 #. Go to the zephyr repository:
199 .. code-block:: console
201 cd zephyrproject/zephyr
205 .. zephyr-app-commands::
206 :zephyr-app: samples/basic/blinky
210 The main build products will be in :file:`build/zephyr`;
211 :file:`build/zephyr/zephyr.elf` is the blinky application binary in ELF
216 documented in :zephyr:code-sample-category:`samples`.
220 add the parameter ``-p=auto`` to ``west build`` to clean out settings
226 Most hardware boards supported by Zephyr can be flashed by running
227 ``west flash``. This may require board-specific tool installation and
233 .. _setting-udev-rules:
246 permission by non-root users to certain USB-connected devices.
248 The OpenOCD (On-Chip Debugger) project conveniently provides a rules
249 file that defined board-specific rules for most Zephyr-supported
250 arm-based boards, so we recommend installing this rules
252 installed the Zephyr SDK there is a copy of this rules file in the SDK
258 …wget -O 60-openocd.rules https://sf.net/p/openocd/code/ci/master/tree/contrib/60-openocd.rules?for…
259 sudo cp 60-openocd.rules /etc/udev/rules.d
261 * or copy the rules file from the Zephyr SDK folder::
263 …sudo cp ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/x86_64-pokysdk-linux/usr/share/openocd/contrib/60-openo…
267 sudo udevadm control --reload
271 board-specific documentation (:ref:`boards`) for further information if
277 On Linux and macOS, you can run Zephyr applications via emulation on your host
279 the x86 or ARM Cortex-M3 architectures. (QEMU is included with the Zephyr
280 SDK installation.)
289 For example, you can build and run the :zephyr:code-sample:`hello_world` sample using
292 .. zephyr-app-commands::
293 :zephyr-app: samples/hello_world
294 :host-os: unix
298 To exit QEMU, type :kbd:`Ctrl-a`, then :kbd:`x`.
300 Use ``qemu_cortex_m3`` to target an emulated Arm Cortex-M3 sample.
308 on Linux. See :ref:`native_sim` for more information. On 64-bit host operating systems, you
309 need to install a 32-bit C library, or build targeting :ref:`native_sim/native/64<native_sim32_64>`.
313 .. zephyr-app-commands::
314 :zephyr-app: samples/hello_world
315 :host-os: unix
321 .. code-block:: console
323 west build -t run
324 # or just run zephyr.exe directly:
325 ./build/zephyr/zephyr.exe
327 Press :kbd:`Ctrl-C` to exit.
329 You can run ``./build/zephyr/zephyr.exe --help`` to get a list of available
344 The package versions requested by Zephyr's :file:`requirements.txt` may
346 want to set up a virtualenv for Zephyr development.
352 board, Zephyr also supports using QEMU to run targets built for other
354 binaries that implement Zephyr's driver interfaces with POSIX APIs, and even
355 running different Zephyr-based binaries on CPU cores of differing
360 .. _information on -\\-user:
361 https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
362 .. _Homebrew disables -\\-user:
363 https://docs.brew.sh/Homebrew-and-Python#note-on-pip-install---user
365 https://packaging.python.org/tutorials/installing-packages/