zephyr/doc/application/apps_run.rst
Allan Stephens 7567c979dd unified/doc: Update Application Development Primer
Removes references to nanokernel/microkernel. Corrects numerous
errors in content. Improves consistency in presentation of
information.

Change-Id: I83895d2cb03181da377b23323afc104ae32865a2
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-11-03 20:27:38 +00:00

59 lines
1.7 KiB
ReStructuredText

.. _apps_run:
Run an Application
##################
An appliction image can be run on real or simulated hardware.
The kernel's built-in simulator is QEMU. It allows you to run and test
an application virtually, before (or in lieu of)
loading and running it on actual target hardware.
.. contents:: Procedures
:local:
:depth: 1
Running an Application using QEMU
=================================
Prerequisites
-------------
* Ensure the application can be built successfully using a QEMU-supported
board configuration, such as qemu_cortex_m3 or qemu_x86, as described
in :ref:`apps_build`.
* Ensure the Zephyr environment variables are set for each console terminal;
see :ref:`apps_common_procedures`.
Steps
-----
#. Open a terminal console and navigate to the application directory
:file:`~/appDir`.
#. Enter the following command to build and run the application
using a QEMU-supported board configuration,
such as qemu_cortex_m3 or qemu_x86.
.. code-block:: console
$ make [BOARD=<type> ...] qemu
The Zephyr build system generates a :file:`zephyr.elf` image file
and then begins running it in the terminal console.
#. Press :kbd:`Ctrl A, X` to stop the application from running
in QEMU.
The application stops running and the terminal console prompt
redisplays.
Loading and Running an Application on Target Hardware
=====================================================
The procedure required to load an application image (:file:`zephyr.elf`)
on a target depends on the functionality available on its hardware,
and is often unique to that target board.
For this reason, loading instructions reside with the board-specific
documentation; see :ref:`board`.