Xtensa Emulation (QEMU)

Overview

The QEMU board configuration is used to emulate the Xtensa architecture. This board configuration provides support for the Xtensa simulation environment.

Qemu

Qemu (Credit: qemu.org)

Programming and Debugging

Use this configuration to run basic Zephyr applications and kernel tests in the QEMU emulated environment, for example, with the Synchronization Sample:

Using west:

# From the root of the zephyr repository
west build -t run

Using CMake and ninja:

# From the root of the zephyr repository
# Use cmake to configure a Ninja-based buildsystem:
cmake -B build -GNinja -DBOARD=qemu_xtensa samples/synchronization

# Now run ninja on the generated build system:
ninja -C build run

This will build an image with the synchronization sample app, boot it using QEMU, and display the following console output:

***** BOOTING ZEPHYR OS v1.8.99 - BUILD: Jun 27 2017 13:09:26 *****
threadA: Hello World from xtensa!
threadB: Hello World from xtensa!
threadA: Hello World from xtensa!
threadB: Hello World from xtensa!
threadA: Hello World from xtensa!
threadB: Hello World from xtensa!
threadA: Hello World from xtensa!
threadB: Hello World from xtensa!
threadA: Hello World from xtensa!
threadB: Hello World from xtensa!

Debugging

Refer to the detailed overview about Custom Board, DeviceTree and SOC Definitions.