Hello World

Overview

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

This project outputs ‘Hello World’ to the console. It can be built and executed on QEMU as follows:

cd $ZEPHYR_BASE/samples/hello_world
mkdir build && cd build
cmake -GNinja -DBOARD=qemu_x86 ..
ninja run

To build the single thread version, use the supplied configuration file for single thread: prj_single.conf:

cd $ZEPHYR_BASE/samples/hello_world
mkdir build && cd build
cmake -GNinja -DBOARD=qemu_x86 -DCONF_FILE=prj_single.conf ..
ninja run

Sample Output

Hello World! x86