The Quick Start Guide is now comprised by Installing, Building and Running the Zephyr Kernel Guides. The Installing Guide contains all the procedures needed to install the required components and get access to the code. The Building Guide contains the procedure to build the kernel using a sample application. The Running Guide contains the procedures to run an application using QEMU or the Galileo 2 board. Files and folders were renamed. The toctree directives were updated to reflect the new names. Change-Id: I4398befd4a24b12a50970c21a5288afa5c533fc8 Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
60 lines
1.9 KiB
ReStructuredText
60 lines
1.9 KiB
ReStructuredText
.. _building_zephyr:
|
|
|
|
Building the Zephyr Kernel
|
|
############################
|
|
|
|
This section describes the procedure to build the kernel with a sample
|
|
application. in a development system and describes how to get access to the
|
|
kernel's source code.
|
|
|
|
Building a Sample Application
|
|
*****************************
|
|
|
|
You can speed up builds by optionally using the :program:`ccache` utility.
|
|
|
|
.. code-block:: bash
|
|
|
|
$ export USE_CCACHE=1
|
|
|
|
To build an example application follow these steps:
|
|
|
|
#. Go to the root directory of the |project|.
|
|
|
|
#. Set the paths properly in the :file:`$ZEPHYR_BASE` directory,
|
|
type:
|
|
|
|
.. code-block:: bash
|
|
|
|
$ source zephyr-env.sh
|
|
|
|
#. Build the example project, type:
|
|
|
|
.. code-block:: bash
|
|
|
|
$ cd $ZEPHYR_BASE/samples/microkernel/apps/hello_world
|
|
|
|
$ make pristine && make
|
|
|
|
.. note::
|
|
|
|
You can override the default BSP with the one you want by adding
|
|
:makevar:`BSP=`. The complete options available for the BSP flag
|
|
can be found at :file:`$ZEPHYR_BASE/arch` under the respective
|
|
architecture, for example :file:`$ZEPHYR_BASE/arch/x86/generic_pc`.
|
|
You need to override the ARCH flag with the architecture that
|
|
corresponds to your BSP by adding :makevar:`ARCH=` and the options
|
|
you need to the make command, for example:
|
|
|
|
:command:`make BSP=generic_pc ARCH=x86`
|
|
|
|
The complete options available for the ARCH flag can be found at
|
|
:file:`$ZEPHYR_BASE`, for example :file:`$ZEPHYR_BASE/arch/x86`.
|
|
|
|
The sample projects for the microkernel are found
|
|
at :file:`$ZEPHYR_BASE/samples/microkernel/apps`. After building the
|
|
application successfully, the results can be found in the :file:`outdir`
|
|
directory in the application root directory.
|
|
:file:`$SAMPLE_PROJECT/outdir/microkernel.elf`.
|
|
|
|
For sample projects in the :file:`$ZEPHYR_BASE/samples/nanokernel/apps`
|
|
directory, the results can be found at :file:`$SAMPLE_PROJECT/outdir/nanokernel.elf`. |