LEON3 Emulation (QEMU)

Overview

The LEON3 QEMU board configuration is used to emulate the LEON3 processor.

Qemu

Qemu (Credit: qemu.org)

Programming and Debugging

Applications for the qemu_leon3 board configuration can be built and run in the usual way for emulated boards (see Building an Application and Run an Application for more details).

Flashing

While this board is emulated and you can’t “flash” it, you can use this configuration to run basic Zephyr applications and kernel tests in the QEMU emulated environment. For example, with the Synchronization Sample:

# From the root of the zephyr repository
west build -b qemu_leon3 samples/synchronization
west build -t run

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

*** Booting Zephyr OS build zephyr-v2.4.0-27-g7b37fdd5303b  ***
threadA: Hello World from qemu_leon3!
threadB: Hello World from qemu_leon3!
threadA: Hello World from qemu_leon3!
threadB: Hello World from qemu_leon3!
threadA: Hello World from qemu_leon3!
threadB: Hello World from qemu_leon3!
threadA: Hello World from qemu_leon3!
threadB: Hello World from qemu_leon3!
threadA: Hello World from qemu_leon3!
threadB: Hello World from qemu_leon3!

Exit QEMU by pressing CTRL+A x.

Debugging

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