1.. _qemu_leon3:
2
3LEON3 Emulation (QEMU)
4######################
5
6Overview
7********
8
9The LEON3 QEMU board configuration is used to emulate the LEON3 processor.
10
11Programming and Debugging
12*************************
13
14Applications for the ``qemu_leon3`` board configuration can be built and run in
15the usual way for emulated boards (see :ref:`build_an_application` and
16:ref:`application_run` for more details).
17
18Flashing
19========
20
21While this board is emulated and you can't "flash" it, you can use this
22configuration to run basic Zephyr applications and kernel tests in the QEMU
23emulated environment. For example, with the :zephyr:code-sample:`synchronization` sample:
24
25.. zephyr-app-commands::
26   :zephyr-app: samples/synchronization
27   :host-os: unix
28   :board: qemu_leon3
29   :goals: run
30
31This will build an image with the synchronization sample app, boot it using
32QEMU, and display the following console output:
33
34.. code-block:: console
35
36        *** Booting Zephyr OS build zephyr-v2.4.0-27-g7b37fdd5303b  ***
37        threadA: Hello World from qemu_leon3!
38        threadB: Hello World from qemu_leon3!
39        threadA: Hello World from qemu_leon3!
40        threadB: Hello World from qemu_leon3!
41        threadA: Hello World from qemu_leon3!
42        threadB: Hello World from qemu_leon3!
43        threadA: Hello World from qemu_leon3!
44        threadB: Hello World from qemu_leon3!
45        threadA: Hello World from qemu_leon3!
46        threadB: Hello World from qemu_leon3!
47
48Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`.
49
50Debugging
51=========
52
53Refer to the detailed overview about :ref:`application_debugging`.
54