2017-01-15 07:39:24 +08:00
|
|
|
.. _hello_world:
|
|
|
|
|
2017-01-05 21:56:21 +08:00
|
|
|
Hello World
|
|
|
|
###########
|
|
|
|
|
|
|
|
Overview
|
2017-01-21 07:58:05 +08:00
|
|
|
********
|
2017-01-05 21:56:21 +08:00
|
|
|
|
2020-04-18 02:18:22 +08:00
|
|
|
A simple sample that can be used with any :ref:`supported board <boards>` and
|
|
|
|
prints "Hello World" to the console.
|
2017-01-05 21:56:21 +08:00
|
|
|
|
|
|
|
Building and Running
|
2017-01-21 07:58:05 +08:00
|
|
|
********************
|
2017-01-05 21:56:21 +08:00
|
|
|
|
2020-04-18 02:18:22 +08:00
|
|
|
This application can be built and executed on QEMU as follows:
|
2017-01-05 21:56:21 +08:00
|
|
|
|
2017-11-12 17:11:39 +08:00
|
|
|
.. zephyr-app-commands::
|
|
|
|
:zephyr-app: samples/hello_world
|
2018-01-18 00:32:31 +08:00
|
|
|
:host-os: unix
|
2017-11-12 17:11:39 +08:00
|
|
|
:board: qemu_x86
|
|
|
|
:goals: run
|
|
|
|
:compact:
|
2017-01-05 21:56:21 +08:00
|
|
|
|
2020-04-18 02:18:22 +08:00
|
|
|
To build for another board, change "qemu_x86" above to that board's name.
|
|
|
|
|
2017-01-05 21:56:21 +08:00
|
|
|
Sample Output
|
2017-01-21 07:58:05 +08:00
|
|
|
=============
|
2017-01-05 21:56:21 +08:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
Hello World! x86
|
2019-08-29 06:46:09 +08:00
|
|
|
|
|
|
|
Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`.
|