|
| 1 | +.. _qemu_riscv32e: |
| 2 | + |
| 3 | +RISCV32E Emulation (QEMU) |
| 4 | +######################### |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +The RISCV32E QEMU board configuration is used to emulate the RISCV32 (RV32E) architecture. |
| 10 | + |
| 11 | +.. figure:: qemu_riscv32.png |
| 12 | + :width: 600px |
| 13 | + :align: center |
| 14 | + :alt: Qemu |
| 15 | + |
| 16 | + Qemu (Credit: qemu.org) |
| 17 | + |
| 18 | +Programming and Debugging |
| 19 | +************************* |
| 20 | + |
| 21 | +Applications for the ``qemu_riscv32e`` board configuration can be built and run in |
| 22 | +the usual way for emulated boards (see :ref:`build_an_application` and |
| 23 | +:ref:`application_run` for more details). |
| 24 | + |
| 25 | +Flashing |
| 26 | +======== |
| 27 | + |
| 28 | +While this board is emulated and you can't "flash" it, you can use this |
| 29 | +configuration to run basic Zephyr applications and kernel tests in the QEMU |
| 30 | +emulated environment. For example, with the :ref:`synchronization_sample`: |
| 31 | + |
| 32 | +.. zephyr-app-commands:: |
| 33 | + :zephyr-app: samples/synchronization |
| 34 | + :host-os: unix |
| 35 | + :board: qemu_riscv32e |
| 36 | + :goals: run |
| 37 | + |
| 38 | +This will build an image with the synchronization sample app, boot it using |
| 39 | +QEMU, and display the following console output: |
| 40 | + |
| 41 | +.. code-block:: console |
| 42 | +
|
| 43 | + *** Booting Zephyr OS build v3.1.0-rc1-59-g0d66cc1f6645 *** |
| 44 | + thread_a: Hello World from cpu 0 on qemu_riscv32e! |
| 45 | + thread_b: Hello World from cpu 0 on qemu_riscv32e! |
| 46 | + thread_a: Hello World from cpu 0 on qemu_riscv32e! |
| 47 | + thread_b: Hello World from cpu 0 on qemu_riscv32e! |
| 48 | + thread_a: Hello World from cpu 0 on qemu_riscv32e! |
| 49 | + thread_b: Hello World from cpu 0 on qemu_riscv32e! |
| 50 | + thread_a: Hello World from cpu 0 on qemu_riscv32e! |
| 51 | + thread_b: Hello World from cpu 0 on qemu_riscv32e! |
| 52 | + thread_a: Hello World from cpu 0 on qemu_riscv32e! |
| 53 | + thread_b: Hello World from cpu 0 on qemu_riscv32e! |
| 54 | + thread_a: Hello World from cpu 0 on qemu_riscv32e! |
| 55 | + thread_b: Hello World from cpu 0 on qemu_riscv32e! |
| 56 | +
|
| 57 | +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. |
| 58 | + |
| 59 | +Debugging |
| 60 | +========= |
| 61 | + |
| 62 | +Refer to the detailed overview about :ref:`application_debugging`. |
0 commit comments