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
|
|
|
A simple Hello World example that can be used with any supported board and
|
|
|
|
prints 'Hello World' to the console. This application can be built into modes:
|
|
|
|
|
|
|
|
* single thread
|
|
|
|
* multi threading
|
|
|
|
|
|
|
|
Building and Running
|
2017-01-21 07:58:05 +08:00
|
|
|
********************
|
2017-01-05 21:56:21 +08:00
|
|
|
|
|
|
|
This project outputs 'Hello World' to the console. It can be built and executed
|
|
|
|
on QEMU as follows:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2017-01-07 07:49:24 +08:00
|
|
|
$ cd samples/hello_world
|
2017-01-08 05:31:34 +08:00
|
|
|
$ make run
|
2017-01-05 21:56:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
To build the single thread version, use the supplied configuration file for
|
|
|
|
single thread: :file:`prj_single.conf`:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2017-01-08 05:31:34 +08:00
|
|
|
$ make CONF_FILE=prj_single.conf run
|
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
|